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

Re: Referencing namespace prefixes within an XSD Schem

Subject: Re: Referencing namespace prefixes within an XSD Schema generated by XSL transform
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 11 Aug 2006 22:33:12 +0100
matt zumwalt
if you were using xslt2 you could directly generate a namespace node
(and so a namespace declaration) with teh new xsl:namespace instruction
that works just like xsl:attribute but makes namespaces instead of
attributes, allowing both the nameand value to be generated dynamically.

In XSLT1 the usual trick is to just use xsl:attribute to put a spurious
attribute in the required namespace. so if you go
<schema>
 <xsl:attribute name="tns:wibble" namespace="{$targetNS}"/>
then you get a spurious tns:wibble="" attribute which I think the schema
validator will ignore and a namespace declaration for tns: will get
added automatically. If you need to remove the tns:wibble the you can do
this into a variable and then use xx:node-set extension to extact teh
element and its attributes and namespace nodes, but don't copy the
tns:wibble attribute.

David

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.