xsl-list
[Top] [All Lists]

RE: substitute &#13; with <br/>

2003-08-07 15:54:34


As DC always says 'the reference and the character are one and the same
thing' - you could write your entire xml file in character references
(if you were mad). 

Ah, but DC's mother always says "its the exception that proves the rule"
In this case the exception is that an explict #13 character will be
normalised by the XML parser to a #10 but a &_#13; character reference
will be reported as a #13 character.

Which is why Markus isn't actually correct to state:
&_#13; cannot be matched or replaced with XSLT functions, as it has
been deleted by the XML parser.

if all references to #13 were changed to #10s by the XML parser a
template matching .=&_#13; would work as expected (as the stylesheet's
xml parser would change it to a test for #10, and it would match
newlines in teh source)
However the character ref is reported as character 13, and so
_probably_) never matches anything in the source. It would not match
newlines in the source, but would match explicit &_#13; references.

David

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>