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

RE: xsl transform question

Subject: RE: xsl transform question
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Mon, 16 Dec 2002 20:00:06 -0000
transform creates invalid xml
> I am trying to create another xsl after processing one xsl.
> The reason I need this because the element "name" will be 
> availabale in another xml. In the first xsl, I have s/th like this :
> 
>    <xsl:attribute name="value"><xsl:text 
> disable-output-escaping="yes"><![CDATA[<xsl:value-of
> select="name"/>]]></xsl:text></xsl:attribute>
> 
> The output of this in my new xsl is :
> value="&lt;xsl:value-of select=&quot;name&quot;/&gt;"
> 
> I want it to be like :
> value="<xsl:value-of select="name"/>"
> because then only it would be a valid xsl.


Why are you trying to generate invalid XML? XML does not allow elements
to appear within attributes.

It is an error (in XSLT 1.0) to use disable-output-escaping for text
within an attribute node. In 2.0 (if you really need to produce invalid
XML) you can do it using <xsl:attribute disable-output-escaping="yes">.

It is also an error in 1.0 to have any instructions within <xsl:text>

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 



 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.