Subject: Re: xsl:comment and xsl:pi containing template elements? From: Tyler Baker <tyler@xxxxxxxxxxx> Date: Fri, 18 Dec 1998 17:13:21 -0500 |
I know quoting myself is silly but I need to clarify something here that I overlooked. Tyler Baker wrote: > In looking at the DTD for the recently released XSL spec I noticed that > besides xsl:element containing template data (character data, > instructions, and result elements), the elements xsl:comment, xsl:pi, > and xsl:attribute can contain template data. > > For xsl:comment I can kind of understand how this would be useful. > Through macros you could use this as a sloppy version of ifdefing > output. For xsl:pi I suppose you could make the same argument. For > these two elements you open a lot of holes with producing correct > output. For example, how do you embed a comment within a comment > without escaping (is this the desired way to process output?). The same > goes for embedding pi's within pi's. > > However, how on earth could you have a literal result element inside an > attribute? The draft says: ///////////////////////////////////////////////////// The following are all errors: Adding an attribute to an element after children have been added to it; implementations may either signal the error or ignore the attribute. Including nodes other than text nodes in the value of an attribute; implementations may either signal the error or ignore the added nodes. Adding an attribute that has the same name as an attribute already added; implementations may either signal the error or ignore the duplicate attribute. Adding an attribute to a node that is not an element; implementations may either signal the error or ignore the attribute. /////////////////////////////////////////////////// Why not just have the DTD section for xsl:attribute be changed from: <!ELEMENT xsl:attribute %template;> <!ATTLIST xsl:attribute name CDATA #REQUIRED %space-att; > to: <!ELEMENT xsl:attribute #PCDATA> <!ATTLIST xsl:attribute name CDATA #REQUIRED %space-att; > The only reason I can think of for this not being the case now is some future idea for extending this mechanism. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
xsl:comment and xsl:pi containing t, Tyler Baker | Thread | Re: xsl:comment and xsl:pi containi, Chris Maden |
RE: Does the XSL processors within , Markor, John (Non-HP | Date | Re: xsl:comment and xsl:pi containi, Chris Maden |
Month |