[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: xsl:comment and xsl:pi containing template elements?

Subject: Re: xsl:comment and xsl:pi containing template elements?
From: Tyler Baker <tyler@xxxxxxxxxxx>
Date: Fri, 18 Dec 1998 17:13:21 -0500
xsl comment
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.