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 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Sushant PrabhuSubject: how to sneak a tag in xml conversion
Author: Sushant Prabhu
Date: 23 Nov 2006 07:50 PM
Hi All,

Currently I am using XSLT to convert one xml format to another.
Now after converting all the processing as required I need to embed all the xml into 1 opening & closing tag say something like

*****************************
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.test.com/xmlschemas" xsi:schemaLocation="http://www.test.com/xmlschemas/packageBody.xsd">

ALL THE CONVERTED XML STUFF

</packageBody>

*****************************

My problem is I do not want to interspere the xml tag within this <xsl:template match="node"> as then it would apply to each processed node. I just want it once globally at the top & then at the bottom when all processing is done.

***************************************************
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
<xsl:template match="node">

<myownxml>

<customxml>

</customxml>
</myownxml>

<xsl:apply-templates select="node"/>

</xsl:template>

</xsl:stylesheet>

***************************************************

Do post your thoughts


Regards

Postnext
Minollo I.Subject: how to sneak a tag in xml conversion
Author: Minollo I.
Date: 24 Nov 2006 09:33 AM
What version and build of Stylus Studio (Help > About) are you running?
Thanks.

Posttop
James DurningSubject: how to sneak a tag in xml conversion
Author: James Durning
Date: 24 Nov 2006 10:19 AM
Try using a template which only applies to the root node, and put your namespaces in there.
<xsl:template match="/">

 
Topic Page 1 2 3 4 5 6 7 8 9 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.