I'm new to XSLT (just got into XML and have been using XML DOM with ASP) and I'm trying to display this response I get back from the eBay API.
The response I get is this:
<?xml version="1.0" encoding="UTF-8"?>
<GeteBayOfficialTimeResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2005-08-12T02:33:09.184Z</Timestamp>
<Ack>Success</Ack>
<CorrelationID>00000000-00000000-00000000-00000000-00000000-00000000-0000000000</CorrelationID>
<Version>421</Version>
<Build>e421_core_Bundled_1630320_R1</Build>
</GeteBayOfficialTimeResponse>
I've setup a very basic XSLT file to try and display the page but I'm having issues because of the xmlns=... attribute on the GeteBayOfficialTimeResponse element. My .xsl file is as such:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="
<xsl:template match="/">
<html>
<body bgcolor="cccccc">
<p><xsl:value-of select="GeteBayOfficialTimeResponse/Timestamp"/></p>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
When I link to that .xsl file from my .xml and open it up I get a blank gray page. If I remove the attribute from the GeteBayOfficialTimeResponse element and try it it displays the Timestamp value perfectly.
What do I need to do to handle that attribute on the root element? I can't find anything about this at w3schools.com or any other tutorial sites. Any information would be greatly appreciated. Thanks!
The response I get is this:
<?xml version="1.0" encoding="UTF-8"?>
<GeteBayOfficialTimeResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2005-08-12T02:33:09.184Z</Timestamp>
<Ack>Success</Ack>
<CorrelationID>00000000-00000000-00000000-00000000-00000000-00000000-0000000000</CorrelationID>
<Version>421</Version>
<Build>e421_core_Bundled_1630320_R1</Build>
</GeteBayOfficialTimeResponse>
I've setup a very basic XSLT file to try and display the page but I'm having issues because of the xmlns=... attribute on the GeteBayOfficialTimeResponse element. My .xsl file is as such:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="
<xsl:template match="/">
<html>
<body bgcolor="cccccc">
<p><xsl:value-of select="GeteBayOfficialTimeResponse/Timestamp"/></p>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
When I link to that .xsl file from my .xml and open it up I get a blank gray page. If I remove the attribute from the GeteBayOfficialTimeResponse element and try it it displays the Timestamp value perfectly.
What do I need to do to handle that attribute on the root element? I can't find anything about this at w3schools.com or any other tutorial sites. Any information would be greatly appreciated. Thanks!