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 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Charles SteinhardtSubject: Newbie question...
Author: Charles Steinhardt
Date: 24 Sep 2004 11:10 AM
I am simply wrapping some well formed XML with a new top root tag. I wish it would shw it in the output text with linebreaks after the new tags (and keep the linebreaks as is with the wrapped XML code)

For example,

The original XML is:

<OriginalTags>
<stuff>
</stuff>
<OriginalTags>



My XSLT is:

<xsl:template match="/">
<SuperDataSet>
<p><xsl:apply-templates/></p>
</SuperDataSet>
</xsl:template>



My result is:

<SuperDataSet><OriginalTags>
<stuff>
</stuff>
<OriginalTags></SuperDataSet>


I expected:

<SuperDataSet>
<OriginalTags>
<stuff>
</stuff>
<OriginalTags>
</SuperDataSet>


Thanks for any help...

Postnext
Ivan PedruzziSubject: Newbie question...
Author: Ivan Pedruzzi
Date: 24 Sep 2004 11:17 AM
Hi Charles,

Using the indent attribute should do what you are looking for

<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>

<xsl:template match="/">
<SuperDataSet>
<p><xsl:apply-templates/></p>
</SuperDataSet>
</xsl:template>

</xsl:stylesheet>

Posttop
Charles SteinhardtSubject: Newbie question...
Author: Charles Steinhardt
Date: 24 Sep 2004 12:50 PM
Thank you. I had tried this but something must've been wrong

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 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.