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

Re: XPath to get value of xmlns attribute

Subject: Re: XPath to get value of xmlns attribute
From: "Emmanuil Batsis (Manos)" <mbatsis@xxxxxxxxxxx>
Date: Tue, 09 Mar 2004 15:38:27 +0200
xmlns xpath
namespace declarations are not visible as attributes. You may want to check out about the namespace-uri function and the namespace axis.

Munna D wrote:

Hi,
Say I have an xml document beginning as follows:
<!--extract for example-->
<?xml version="1.0" encoding="utf-8"?>
<feed version="0.2" xmlns="http://purl.org/atom/ns#"
xmlns:tt="http://www.tt.org/ns#">
<!--end of extract-->

I want to make a list of all atttributes (including namespace declaration ones). However, both of the templates below fail to pick up the xmlns and xmlns:tt attributes:
	<xsl:template match='@*'>	
		<xsl:value-of select="name()"/>
                ='<xsl:value-of select="."/>'
        </xsl:template>

and

	<xsl:template match="@*[starts-with(name(.),'xmlns')]" >			
		<xsl:value-of select="name()"/>
                ='<xsl:value-of select="."/>'
        </xsl:template>

Can someone please tell me how I can get these values?

Thanks,
Munna



-- Manos Batsis

    _  __    __                    __
   / |/ /__ / /____ __ _ ___ _____/ /_
  /    / -_) __(_-</  ' Y _ `/ __/ __/
 /_/|_/\__/\__/___/_/_/_|_,_/_/  \__/


http://www.netsmart.gr mailto:mbatsisSPAM_TRAP@xxxxxxxxxxx tel:+302103240940 http://forte.netsmart.gr/foaf/manos_foaf.rdf



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.