Re: XPath Transform, 3rd version

In message "XPath Transform, 3rd version"
    on 00/04/06, "John Boyer" <jboyer@PureEdge.com> writes:
> <li><b>Namespace and Attribute Nodes-</b> a space, the node's QName, an equals sign,
> an open double quote, the modified string value, and a close double quote.
> The string value of the node is modified by replacing all ampersands (&amp;)
> with <code>&amp;amp;</code>, 
> and all double quote characters with <code>&amp;quot;</code>.</li>
> 
> <li><b>Text Nodes-</b> the string value, except all ampersands are replaced
> by <code>&amp;amp;</code>,
> and all open angle brackets (&lt;) are replaced by <code>&amp;lt;</code>.</li>

For the attribute value, we have to replace U+000D (CARRIAGE
RETURN), U+000A (LINE FEED) and U+0009 (HORIZONTAL TABULATION)
by character references because an XML processor nomalizes these
character to U+0020 (SPACE).
(See 3.3.3 Attribute-Value Normalizatoin in XML1.0.)

For the text node, we have to replace U+000D by the character
reference because an XML processor normalizes U+000D to U+000A.
(See 2.11 End-of-Line Handling in XML 1.0.)

-- 
TAMURA Kent @ Tokyo Research Laboratory, IBM

Received on Tuesday, 11 April 2000 01:19:50 UTC