[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Global namespace prefixes (Corrected Examples)
On Nov 13, 2008, at 3:30 PM, Michael Kay wrote:
I'm stuck with XSLT 1.0 With XSLT 1.0, you can use xsl:copy-of to copy a namespace node from the But that only works if the namespace exists in the source document. In my situation I am using information found in the source document to create a new namespace. The intention is that every Attribute element gets recast to a new element in a namespace that is unique to the base.document. So these: <?xml version="1.0" encoding="UTF-8"?> <Dataset xmlns="http://xml.opendap.org/ns/DAP/3.2#" base="http://base.document "> <Attribute name="Conventions" >CF-1.0</Attribute> <Attribute name="logname" >olson</Attribute> <Attribute name="host" >bb0001en</Attribute> </Dataset> Currently become this: <?xml version="1.0" encoding="UTF-8"?> <output xmlns:dap="http://xml.opendap.org/ns/DAP/3.2#"> <ns0:Conventions xmlns:ns0="http://base.document/att#">CF-1.0</ ns0:Conventions> <ns1:logname xmlns:ns1="http://base.document/att#">olson</ns1:logname> <ns2:host xmlns:ns2="http://base.document/att#">bb0001en</ns2:host> </output> Which is correct, but what I am trying to get is this: <?xml version="1.0" encoding="UTF-8"?> <output xmlns:dap="http://xml.opendap.org/ns/DAP/3.2#" xmlns:att="http://base.document/att# "> <att:Conventions>CF-1.0</ttt:Conventions> <att:logname>olson</att:logname> <att:host>bb0001en</att:host> </output>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|