xsl-list
[Top] [All Lists]

RE: [xsl] extract namespace

2008-05-08 13:47:15
If you can do it in JAXP, it'd probably be a lot quicker. The XPath
would be along the lines of the node selected in the <value-of/> below.
That said, here's the XSLT:

<stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform";>
        <output method="text" encoding="utf-8" />
        <template match="*">
                <value-of select="concat('Default namespace: ',
namespace::*[name() = ''])" />
        </template>
</stylesheet>


If you run this against itself, you'll get:

Default namespace: http://www.w3.org/1999/XSL/Transform


Hope that helps. Cheers!

~ Scott


-----Original Message-----
From: IZASKUN GUTIERREZ GUTIERREZ 
[mailto:igutierrez027(_at_)ikasle(_dot_)ehu(_dot_)es] 
Sent: Thursday, May 08, 2008 3:25 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] extract namespace

Hello everybody!

I need extract from the one document .xml the namesmace that dont have
prefix

for example

xmlns = http://...

Can I extract with JAXP or I need one template in XSLT to extract the  
namespace?

Anybody can help me?

Regards

Izaskun





--~------------------------------------------------------------------
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>