Xpath problem - yikes!

C

cyphos

Hi,

I'm trying to display the data from my typed dataset on a page using
the Xml web control.

I have the following code:


Xm1.Document = new XmlDataDocument(ds);


Using the debugger, I found that the xml representation of my dataset
looks like the following:

[code:1:cd392f2d6e]
<dsData>
<Entry>
<Title>Test</Title>
<Description>This is a test</Description>
</Entry>
</dsData>
[/code:1:cd392f2d6e]

My xsl file looks like this

[code:1:cd392f2d6e]
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each select="dsData/Entry">
<div class="Entry">
<div class="EntryTitle">
<xsl:value-of select="Title"/>
</div>
<div class="EntryDescription">
<xsl:value-of select="Description"/>
</div>
</div>
</xsl:for-each>
</xsl:template>
</xsl"stylesheet>
[/code:1:cd392f2d6e]

Using this stylesheet, nothing is displayed/transformed. I know that
it must be a stylesheet problem because if I don't set the
TransformSource property of the Xml control the raw xml of the
dataset (XmlDataDocument) is displayed.

I hope that someone understands this, as I'm lost.

Thanks,
Cyp.

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
 
B

Bryce Budd

Try

<xsl:for-each select="//Entry">

assuming dsData is your root node

Regards,

Bryce
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top