xsl-list
[Top] [All Lists]

RE: [xsl] xmlns print and enumerate

2006-03-09 12:15:40
In XSLT 2.0 you use <xsl:namespace name="{(_at_)prefix}" select="@uri"/>

In XSLT 1.0 there's a circumlocution something like:

<xsl:variable name="temp">
  <xsl:element name="{(_at_)prefix}(_dot_)dummy" namespace="{(_at_)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(_at_)yahoo(_dot_)it] 
Sent: 09 March 2006 19:04
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] 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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>