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

Re: [XSL] copying namesapces with prefix "xmlns:".

Subject: Re: [XSL] copying namesapces with prefix "xmlns:".
From: siva <siva@xxxxxxx>
Date: Fri, 26 Aug 2005 16:47:48 +0530
siva david
here they are ...

My xsl file:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xpdl="http://www.wfmc.org/2002/XPDL1.0" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://test.de/schemas/wfdl/">
<xsl:output method="xml"/> <xsl:template match="*">
<xsl:element name="definitions">
<xsl:copy-of select="namespace::*"/>
<xsl:element name="FlowModel"/>
</xsl:element> </xsl:template> </xsl:stylesheet>


Input.xml :

<?xml version="1.0" encoding="UTF-8"?>
<Package Id="typeoperation" Name="typeoperation" xmlns="http://www.wfmc.org/2002/XPDL1.0" xmlns:bo="http://test.de/bo/" xmlns:h2w="http://test.de/h2w/bo/" xmlns:xpdl="http://www.wfmc.org/2002/XPDL1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wfmc.org/2002/XPDL1.0 http://wfmc.org/standards/docs/TC-1025_schema_10_xpdl.xsd">
<PackageHeader>
<XPDLVersion>1.0</XPDLVersion>
<Vendor>Together</Vendor>
<Created>2005-08-23 17:23:04</Created>
</PackageHeader>
</Package>


And Output.xml without xmlns:bo="http://test.de/bo/" xmlns:h2w="http://test.de/h2w/bo/":

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://test.de/schemas/wfdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xpdl="http://www.wfmc.org/2002/XPDL1.0">
<FlowModel/>
</definitions>



Regards, Siva


David Carlisle wrote:

and this command copied all the attributes except the attributes starts with "xmlns:". This is okay.



yes, namespace declarations are not attributes to XSLT.




But nothing is copied if i use this.

<xsl:copy-of select="namespace::*"/>




Then either there is a bug in your system (which are you using) or there
is a bug in your stylesheet (post a 3 line input file and complete, small,
stylesheet that shows the problem. Without seeing more, we can't say.

David


________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________

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-2013 All Rights Reserved.