Sign Up
Search
Options
search
Chat
Help
News
Log in
Not Logged in
Home
»
Boards
»
Stylus Studio Developer Network
»
XSLT Help and Discussion
»
Outputing the actual XML issue.
Topic
Topic Page
1
2
3
4
5
6
7
8
9
Prev Topic
Next Topic
next
Subject:
Outputing the actual XML issue.
Author:
David N
Date:
07 Jun 2006 11:47 AM
Here's what I'm trying to do:
I have 2 possible input XML documents.
If
1:
<X>
<A>12345</A>
<B>54321</B>
</X>
Then Output
<Z>
<V>12345</V>
<W>54321</W>
</Z>
My stylesheet already does this. No help needed here. But:
If
2:
<Y>
<A>12345</A>
<B>54321</B>
</Y>
Then Output:
<Y>
<A>12345</A>
<B>54321</B>
</Y>
Basically, if the document is encapsulated by <Y>, I need to output a copy of the document as it is. I've tried:
<xsl:for-each select="/Y">
<xsl:value-of select="current()"/>
</xsl:for-each>
But the output looks like:
12345
54321
I get all the data to output, but the tags don't come with it. Is there an easy way to output the data with their tags? Any help would be very appreciated.
David
next
Subject:
Outputing the actual XML issue.
Author:
Minollo I.
Date:
07 Jun 2006 01:42 PM
You may want to do:
<xsl:for-each select="/Y">
<xsl:value-of select="copy-of(.)"/>
</xsl:for-each>
next
Subject:
Outputing the actual XML issue.
Author:
David N
Date:
07 Jun 2006 01:52 PM
Thank you so much. I ended up doing this:
<xsl:for-each select="/Y">
<xsl:copy-of select="."/>
</xsl:for-each>
I really appreciate it!
David.
top
Subject:
Outputing the actual XML issue.
Author:
Minollo I.
Date:
07 Jun 2006 02:10 PM
Sorry, of course; I typed without turning on the brain first.
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.