Sign Up
Search
Options
search
Chat
Help
News
Log in
Not Logged in
Home
»
Boards
»
Stylus Studio Developer Network
»
XSLT Help and Discussion
»
XSLT: Traversing XML twice for XML + Text outputs
Topic
Topic Page
1
2
3
4
5
6
7
8
9
Prev Topic
Next Topic
next
Subject:
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.
next
Subject:
XSLT: Traversing XML twice for XML + Text outputs
Author:
(Deleted User)
Date:
11 Jan 2008 09:41 AM
Please do not post twice
next
Subject:
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.
next
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
next
Subject:
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.
top
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
Prev Topic
Next Topic
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 to Conference:
Select Conference
Stylus Studio Feature Requests
Stylus Studio Technical Forum
Website Feedback
XSLT Help and Discussion
XQuery Help and Discussion
Stylus Studio FAQs
Stylus Studio Code Samples & Utilities
Stylus Studio Announcements
go
Log In Options
Username:
Password:
Site Map
|
Privacy Policy
|
Terms of Use
|
Trademarks
Stylus Scoop XML Newsletter:
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.