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
Ramon AldanaSubject: XSLT: Traversing XML twice for XML + Text outputs
Author: Ramon Aldana
Date: 11 Jan 2008 03:48 AM
Hello,

I have both routines to traverse an XML and generate a true XML copy + a string concatenation as follows.

To get true XML copy of input document:

<xsl:template match="/">
<xsl:copy><xsl:copy-of select="*|@*"/><xsl:apply-templates/></xsl:copy>
</xsl:template>

To get string concatenation

<xsl:template match="/" >
<xsl:for-each select="procedure/parameters/attributes">
<xsl:if test="position()!=1">,</xsl:if>
@<xsl:value-of select="@name"/> <xsl:value-of select="@type"/> <xsl:if test="@required='No'">= NULL</xsl:if>
</xsl:for-each>
</xsl:template>


The problem is that I need the TEXT generated in the second xsl:template at the bottom of the XML generated by the first xsl:template.


Thanks.

Postnext
Alberto MassariSubject: XSLT: Traversing XML twice for XML + Text outputs
Author: Alberto Massari
Date: 11 Jan 2008 09:41 AM
Please do not post twice

Postnext
Ramon AldanaSubject: XSLT: Traversing XML twice for XML + Text outputs
Author: Ramon Aldana
Date: 11 Jan 2008 12:16 PM
I did not see a way to answer privately as I would've preferred.

Not only it is my first post ever in this forum, but I am a brand new member who just happen to find this site yesterday.

You must be confusing me with someone else.

Postnext
Alberto MassariSubject: XSLT: Traversing XML twice for XML + Text outputs
Author: Alberto Massari
Date: 11 Jan 2008 12:32 PM
I am referring to this post: http://www.stylusstudio.com/SSDN/default.asp?action=9&read=7328&fid=48
It's identical to the message that started this thread.

Alberto

Postnext
Ramon AldanaSubject: XSLT: Traversing XML twice for XML + Text outputs
Author: Ramon Aldana
Date: 11 Jan 2008 01:50 PM
you are right. I am not sure how that happens. It sure was not intentional.

Sorry.

Posttop
Minollo I.Subject: XSLT: Traversing XML twice for XML + Text outputs
Author: Minollo I.
Date: 11 Jan 2008 01:53 PM
You probably hit "Refresh" on your browser after having posted your message; it can easily happen.

 
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.