[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Copy namespace definition to the result tree using

Subject: RE: Copy namespace definition to the result tree using xslt
From: Kishorerc@xxxxxxxxxxx
Date: Tue, 13 Mar 2001 02:46:38 -0800
xslt copy namespace
Hi Mike,

Is there no way I can output the element as
<xsd:schema xmlns:xsd="http://www.w3.org/1999/XMLSchema">

instead of just <xsd:schema>.

I understand that it is redundant and hence it does not output the xmlns
attribute. But it is required for the application I am working on. I also
tried adding the xmlns attribute using <xsl:attribute> element but even the
the transformer does not output the xmlns attribute. It seems that xmlns is
a reserved attribute or QName and hence the transformer ignores it. Any
ideas???

Thanks
Kishore


-----Original Message-----
From: Michael Kay [mailto:mhkay@xxxxxxxxxxxx]
Sent: Tuesday, March 13, 2001 2:00 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  Copy namespace definition to the result tree using
xslt


> I am not able to output the namespace definition to the result tree.
>
> The EXPECTED OUTPUT file from the XSLT file should look like this:
> <?xml version="1.0" encoding="UTF-8"?>
> 	<transactions xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> 	<mytesting>
> 		<xsd:schema
> xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> <-- problem line

I don't see anything in your XSLT that outputs the <transactions> element,
but never mind. The xmlns:xsd declaration on your <xsd:schema> element is
completely redundant according to the XPath data model (you get the same
XPath tree whether it is there or not) and therefore an XSLT processor will
not normally generate it.

Mike Kay
Software AG


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.