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: ignoring unwanted blank xmlns attributes in xml elements
Author: Sushant Prabhu
Date: 26 Nov 2006 08:33 PM
Hi All,

I am using xslt to render xml. Currently the xml element which I render is adding some unnecessary <importChannel xmlns=""> attribute but what i want is just <importChannel>.

Here is my code
*********************************

<?xml version="1.0" encoding="UTF-8"?>


<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>

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

<xsl:template match="rootnode">

<packageBody xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.vignette.com/xmlschemas/importexport"
xsi:schemaLocation="http://www.vignette.com/xmlschemas/importexport 7202/packageBody.xsd"
>

<xsl:for-each select="//node">

<xsl:call-template name="node"/>

</xsl:for-each>

</packageBody>

</xsl:template>



<xsl:template name="node" match="node">

<importChannel> all internal xml stuff</importChannel>

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

I tried to include something like this
<importChannel xmlns="http://www.vignette.com/xmlschemas/importexport"/>

but it did not help but is still generating the tags as
<importChannel xmlns="">

But if i remove the xmlns="http://www.vignette.com/xmlschemas/importexport" from the <packageBody> declaration & include
<importChannel xmlns="http://www.vignette.com/xmlschemas/importexport"/>

the tag is rendered properly as <importChannel> but i need the xmlns="http://www.vignette.com/xmlschemas/importexport" in the <pacakgeBody> tag mentioned above.


How can I get it in the specific way

Do post your thoughts

Regards,

Posttop
Tony LavinioSubject: ignoring unwanted blank xmlns attributes in xml elements
Author: Tony Lavinio
Date: 27 Nov 2006 09:01 AM
Which version of Stylus Studio, and which processor are you
using? And also, what does the input document look like?

Providing complete functional code and data makes it more
likely you will get a quick resolution.

 
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.