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

Re: xsl:namespace

Subject: Re: xsl:namespace
From: "Vladimir Nesterovsky" <vladimir@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 21 Feb 2009 09:02:28 +0200
 Re: xsl:namespace
> Can you please clarify on how to eliminate xsl:namespace in the example > I've
> provided?


If we take your code and expand it into a full example, it could look like this:
...

No. It could be a function building element with attribute of type xs:QName. The goal is to ensure that one can reconstruct QName with resolve-QName().


If you cannot reliably know that namespace declaration appears somewhere higher in the tree, then you neen to declare namespace at element level.

Consider:

<xsl:function name="t:create-schema-element" as="element()">
 <xsl:param name="name" as="xs:string"/>
 <xsl:param name="type" as="xs:QName"/>

<xs:element name="{$name}" type="{$type}">
<xsl:namespace name="{prefix-from-QName($type)}"
select="namespace-uri-from-QName($type)"/>
<xs:element>
<xsl:function>
--
Vladimir Nesterovsky
http://www.nesterovsky-bros.com/


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.