Mega Code Archive

 
Categories / XML / XSLT StyleSheet
 

Namespace axis

File: Data.xml <test xmlns:snee="http://www.rntsoft.com/dtds/test"       xmlns:demo2s="http://www.demo2s.com/dtds/test"       xmlns:domain="http://www.domain.com/dtds/test"> this is a test. </test> File: Transform.xslt <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"   version="1.0">   <xsl:output method="xml" omit-xml-declaration="yes" indent="no" />   <xsl:template match="test">     <xsl:for-each select="namespace::*">       <xsl:value-of select="name()" />       <xsl:text> </xsl:text>     </xsl:for-each>   </xsl:template>    </xsl:stylesheet> Output:  snee demo2s domain