Hi,
I am trying to parse an xml which i am getting in a variable in my xsl. till the time i do not have any namespace in my xml i can parse all the tags of my xml from my xsl, however, for any tag with a namespace i could not parse it. not sure why is it so.. Please assist.
XML:-
<?xml version="1.0" encoding="utf-16"?>
<feed xmlns:es="http://ucmservice">
<Title>XSL</Title>
<Updated>2010-2-23T12:00:00Z</Updated>
<Author><Name>UCM</Name></Author>
<element>
<Link>http://ucmservice</Link>
<Id>001</Id>
<Updated>2010-2-23T12:00:00Z</Updated>
<es:RepositoryDetails>
<es:Repository Type="Test" />
</es:RepositoryDetails>
<es:DocProperties>
<es:DocProperty propertyName="Title">
<es:PropValues>
<es:PropValue>22172</es:PropValue>
</es:PropValues>
</es:DocProperty>
</es:DocProperties>
</element>
</feed>
XSL:-
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns="http://www.w3.org/2005/Atom"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:es="http://ucmservice"
exclude-result-prefixes="java wcm">
<xsl:output method="html" omit-xml-declaration="yes" indent="yes"/>
<xsl:param name="relatedDocumentsXML" /> <!-- in this variable i am getting the XML-->
<xsl:template match="/">
<xsl:apply-templates select="$relatedDocumentsXML/feed" />
</xsl:template>
<xsl:template match="feed">
<xsl:for-each select="element">
<xsl:apply-templates select="."></xsl:apply-templates>
</xsl:for-each>
</xsl:template>
<xsl:template match="element">
<xsl:for-each select="Id"> <xsl:value-of select="." /> <!-- i am getting the value for this ID-->
</xsl:for-each>
<xsl:for-each select="es:RepositoryDetails/es:Repository">
<xsl:value-of select="@Type" /> <!-- not able to get the value for this. Seems like an issue with namespace. Please assist-->
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
TIA