Re: [Editorial] xml:id LC - 4 Processing xml:id Attributes

On Wednesday, December 8, 2004, 5:46:35 PM, Karl wrote:


KD> Hi,

KD> http://www.w3.org/TR/2004/WD-xml-id-20041109/#processing

KD> [[[

KD>         1. The attribute's value is normalized according to the rules for
KD> attribute-value normalization on attributes of type ID. For xml:id 
KD> processors operating on an infoset or some other output from an XML 
KD> parser, the value will already be normalized, but unless the parser 
KD> normalized it as a value of type ID it will still be necessary for the
KD> processor to trim leading and trailing space (#x20) characters and 
KD> replace sequences of space characters by a single space.
KD> ]]]

KD> I encourage Daniel Veillard to translate this sentence in French to see
KD> the difficulties of understanding it.

Doesn't French have dependent clauses? :)

But yes, it needs to be split up a little to improve clarity - there is
a parenthetical reminder of ID normalization rules, getting in the way
of the statement about possibly needing to re-normalize - and this
detracts, unfortunately, from the clarity which might otherwise be
attained.

(ducks at using convoluted sentences in email)

How about this (reworded, added example)

1. The attribute's value is normalized according to the rules for
attribute-value normalization on attributes of type ID (trim leading and
trailing space (#x20) characters and replace sequences of space
characters by a single space). Note: For xml:id processors operating on
an infoset or some other output from an XML parser, the value will
already be normalized, but unless it is already recognized as type ID,
it will need to be normalized again prior to ID assignment.

2. as per spec

Example:
  <!DOCTYPE toto [
  <!ATTLIST foo xml:id ID #IMPLIED>
  ]>
  <toto xml:space="preserve" xml:id="   one
    ">
    <foo xml:id="   two
    "/>
  </toto>

In this example, the XML parser already knows that xml:id attribute on
the foo element is of type ID and thus, in the infoset, the value is
normalized to "one". However, it has no information about the xml:id
attribute on the element toto and will preserve leading and trailing
spaces in the infoset. The xml:id processor will thus need to
renormalize the value to "two" before performing ID assignment.

KD> Please make clear, short and simple statements. The sentence is too 
KD> long and we loose the meaning of it in the middle.

Is the suggested rewording plus example better?




-- 
 Chris Lilley                    mailto:chris@w3.org
 Chair, W3C SVG Working Group
 Member, W3C Technical Architecture Group

Received on Wednesday, 8 December 2004 19:19:20 UTC