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
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
- XSLT Help and Discussion (7625)
-> + Use of before and after string (3) Sticky Topic
-> - How do I substitute element ty... (1)
-> + How does one add working days ... (4)
-> - Help, I have existing XLT and... (1)
-> + Need help on XSLT issue - (2)
-> + EDI to XML Conversion (7)
-> - XML To JSON Conversion using X... (1)
-> + Formatting Paragraphs to same ... (2)
-> - Grouping of records (1)
-> + Problems with xsd 1.1 (4)
-> + XML to HL7 mapping (3)
-> + XSLT 3 and Iterate (2)
-> + XSL-FO to PDF preview (3)
-> + java.lang.RuntimeException: Er... (2)
-> + Create Acroforms with Stylus X... (2)
-> + How to change XSLT parameter s... (3)
-> + how to change format of the da... (2)
-> + Search "Next 8 Results " doesn... (2)
-> - Support for Git (1)
-> + newbee (8)
-- [1-20] [21-40] [41-60] Next
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
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
(Deleted User) Subject: XSLT: Traversing XML twice for XML + Text outputs
Author: (Deleted User)
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
(Deleted User) Subject: XSLT: Traversing XML twice for XML + Text outputs
Author: (Deleted User)
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.

   
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.