Here's a sample XML file (created by saving a dataset):
<?xml version "1.0" standalone="yes "?>
<dsData xmlns="http://tempuri.org/DataSchema.xsd" >
<Configuratio n>
</Configuration>
<Data>
<ID>0</ID>
<Title>Test #1</Title>
</Data>
<Data>
<ID>1</ID>
<Title>Test #2</Title>
</Data>
</dsData>
And my XSLT style sheet:
<xsl:styleshe et xmls:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0" xmlns:my="http://my.com">
<my:Parameter >
<name value="value1" />
<name value="value2" />
</my:Parameter>
<xsl:output method="html" />
<xsl:template match="*">
<html>
<body>
<table>
Sample Table
<xsl:for-each select="Data" >
<tr>
<td>Title:</td>
<td><xsl:valu e-of select="Title" /></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
My problem is when the attribute xmlns="http://tempuri.org/DataSchema.xsd"
is in the XML file, the data is not included in the output when I do the
transformation. If, I remove the attribute, everything works fine.
Therefore, I'm suspecting I might need to specify the namespace somewhere,
somehow.
But, I've been unable to find any such examples of how to do that. I'm
using the book "XSLT 2nd Edition" by Michael Kay. I also searched the web a
little to no avail.
Can someone help me out here?
TIA,
Richard Rosenheim