[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] more elegant way to process element with default value?


Subject: RE: [xsl] more elegant way to process element with default value?
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Mon, 16 Jun 2003 11:03:39 -0400

[David Carlisle]

> Yes you are mistaken. All character data that is allowed in element
> content is allowed in attributes (although newlines are normalised
> differently: to #10 in element content and #20 (usually) in 
> attributes.
> What doesn't happen is that the string is _Parsed_ looking for element
> start tags, etc. Of course you have to quote " if using " to surround
> teh value, but that is the only difference.
> 

I would differ a bit from what David said here (just in a pedantic way).
The character data in an attribute value is in fact parsed - if it were
not parsed there would be no need to escape angle brackets, etc.  The
parsing does look for "element start tags, etc" in a sense (at least, it
looks for the "<" delimiter, the beginning of a start tag) - it just
signals an error if they are found because they are illegal there.  The
xml processor  also plays its games replacing entities and character
references, and normalizing whitespace, which it could not do if it
werer not parsing the character data.

But this is just nitpicking.  Forgive me...

Cheers,

Tom P

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



Current Thread
Keywords
xml