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)
-> + Dynamic i18n translation (2)
-> + Convert Image to Mime Base64 u... (2)
-> + Output window fails to show re... (2)
-> + Bitmap Graphic Problem (2)
-> - node comparision (1)
-> - Issue (1)
-> + How to select distinct values (2)
-> + IDE for simple XSLT utility de... (4)
-> + Hard Problem in XSLT (2)
-> + Same name and different proper... (5)
-> - Outputing the actual XML issue... (4)
-> ->Outputing the actual XML ...
-> ->Outputing the actual XML ...
-> ->Outputing the actual XML ...
-> + Generating flexible multi-leve... (3)
-> + Finding Duplicate IDs in XML d... (2)
-> + Displaying Text in XSLT only i... (2)
-> + Using javascript to transform ... (2)
-> - Only showing xml data with cer... (1)
-> + Trying to insert XML data into... (3)
-> + Need help with xsl:param probl... (2)
-> + printing in arabic (2)
-> + Filtering out results by two a... (2)
-- Previous [1441-1460] [1461-1480] [1481-1500] Next
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
David NSubject: 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

Postnext
Minollo I.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>

Postnext
David NSubject: 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.

Posttop
Minollo I.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.

   
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.