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

Subject: RE: [xsl] substitute &#13; with <br/>
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 7 Aug 2003 23:54:34 +0100

> 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


Current Thread