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

RE: Transferring xmlns aliases to result tree.

Subject: RE: Transferring xmlns aliases to result tree.
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Sat, 7 Jun 2003 18:06:27 +0100
xmlns impl
When you use a literal result element, the element that is created in
the result tree should have namespace declarations for all the
namespaces that were in scope for the literal result element in the
stylesheet.

It's difficult to tell from your example, but perhaps you are declaring
the namespace "impl" in the source document and using the prefix "impl:"
in the stylesheet? That won't work. If it's used in the stylesheet it
must be declared in the stylesheet.

Michael Kay


> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Tom Rybak
> Sent: 06 June 2003 17:39
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE:  Transferring xmlns aliases to result tree.
> 
> 
> Sure, here's the definition.
> 
> <wsdl:definitions targetNamespace="http://someurl/" 
> xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:impl="http://someurl/">
> 
> So, the problem is that someType is defined within the WSDL 
> document as
> 
> <complexType name="someType">
> </complexType>
> 
> so it ends up being defined in targetNamespace, which is 
> equivalent to the impl namespace. This type is later used by 
> the line I gave before.
> 
> <element name="someElement" type="impl:someType"/>
> 
> and is referred to as impl:someType. What I meant when I said 
> "appears as text" is that "impl" is only used withing the txt 
> value of the type attribute. It's never explicitly used in 
> the name of an element or the name of an attribute. Hence, it 
> is never evaluated by the xslt engine, and the namespace 
> alias is not copied into the result tree.
> 
> I have tried the following.
> 
> <xsl:for-each select="namespace::*">
> 	<xsl:copy/>
> </xsl:for-each>
> 
> But, it does not work very well, since the attribute will be 
> copied over as 'impl="http://someurl/"' and not as 
> 'xmlns:impl="http://someurl/"'.
> 
> -----Original Message-----
> From: Lars Huttar [mailto:lars_huttar@xxxxxxx]
> Sent: Friday, June 06, 2003 12:40 AM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE:  Transferring xmlns aliases to result tree.
> 
> 
> > I am having trouble transferring the xml namespace aliases
> > from a source tree to the result tree. Specifically I would 
> > like to transfer some aliases that are used only within the 
> > value of an attribute.
> > 
> > <element name="someElement" type="impl:someType"/>
> > 
> > I have a mapping at the top of the document for impl, but
> > it's not used anywhere else except the type attribute. Is 
> > there a way to force this mapping to appear in the result 
> > tree? It does not seem to be transferred. I assume it's 
> > because it appears as text.
> 
> What do you mean, it appears as text?
> 
> Can you show us your declaration of the "impl" prefix
> at the top of the document?
> 
> Lars
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 
>  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-2013 All Rights Reserved.