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

RE: xmlns print and enumerate

Subject: RE: xmlns print and enumerate
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 9 Mar 2006 19:15:19 -0000
enumerate xslt
In XSLT 2.0 you use <xsl:namespace name="{@prefix}" select="@uri"/>

In XSLT 1.0 there's a circumlocution something like:

<xsl:variable name="temp">
  <xsl:element name="{@prefix}.dummy" namespace="{@uri}"/>
</xsl:variable>
<ns>
  <xsl:copy-of select="xx:node-set($temp)//namespace::*"/>
</ns>

but even this needs the node-set() extension; I don't think there's a pure
XSLT 1.0 solution. It also relies on an erratum to the original XSLT 1.0
spec concerning copying of namespace nodes.

Michael Kay
http://www.saxonica.com/

 

> -----Original Message-----
> From: Michele Vivoda [mailto:idmichele@xxxxxxxx] 
> Sent: 09 March 2006 19:04
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE:  xmlns print and enumerate
> 
> Thank you very much, exactly what I was looking for,
> I was missing the namespace operator.
> 
> For my mistake, I made a "wrong" question (the number
> 1),
> what I would like to know additionally is, 
> how do I transform the final result of question 2:
> 
> <b>
>  <ns prefix='h' uri='http://foo'/>
> </b>
> 
> "back" to the source:
> 
> <a xmlns:h='http://foo'/> 
> 
> I am dealing with qnames in attribute values...
> (lower case to distinguish them from QNames of node
> names ;-)
> 
> Thanks again,
> Michele Vivoda
> 
> 
> 	
> 
> 	
> 		
> ___________________________________ 
> Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
> http://mail.yahoo.it

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.