[Bug 3474] [XQueryX] constructing attribute values with the less than character

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3474





------- Comment #2 from davidc@nag.co.uk  2006-07-18 10:32 -------
to fix this one and bug #3446 the stylesheet will need to quote <, #9, #10,
#13, in addition to & and { that are already handled. In xslt1 that's a deeply
nested set of calls to the replace template. If xslt2 isn't an option (which
could do this all with a single regexp-replace) another possiblity would be to 
translate

 <xqx:attributeValue>&amp;&lt;&gt;</xqx:attributeValue>

to

<elem attr="{"&amp;<>"}"></elem>
            ^^        ^^

the extra {"..."} mean that you only need to take care of string-quoting rather
than attribute constructor quoting (which I think the stylesheet already gets
right) and the XQuery serialiser will then take care of the attribute value
quoting rules for < and white space.

Received on Tuesday, 18 July 2006 10:32:20 UTC