XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Sushant PrabhuSubject: XSLT not acceptable
Author: Sushant Prabhu
Date: 14 Nov 2006 10:58 PM
Hi All

I am rendering a new xml from an existing xml using XSLT.
In the xslt i was able to create the xml document when all I had to do was fetch values from the source xml & create just new elements in the destination xml.

Now I have to create an xml element which also has an attribute
& because the java SAX parser transformation fails giving errors like expected to terminate element tag started earlier.

If I remove this piece everything goes well
This is the part which is creating the problem in the xsl

------------
<channel
channelType="subChannel"
vcmName="<xsl:value-of select='$includeParent'/><xsl:value-of select='node_name'/>">
</channel>
------------


First of all it errors out saying < cannot be used & to use "&lt;" which i did.

If i use the same xsl piece as element value & not attributes everything works fine.
The problem occurs only when I m trying to create element attribute values

Do post your thoughts on the same

Regards,

Posttop
Ivan PedruzziSubject: XSLT not acceptable
Author: Ivan Pedruzzi
Date: 14 Nov 2006 11:21 PM

Assuming that $includeParent is a variable in scope and node_name is an XPath expression use the following

<channel
channelType="subChannel"
vcmName="{concat($includeParent,node_name)}">
</channel>


Ivan Pedruzzi
Stylus Studio Team

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.