Assigning value to a variable returning from Umbraco library Options
SADIK
Posted: Monday, July 07, 2008 8:33:36 AM
Rank: Newbie

Joined: 6/6/2008
Posts: 23
Location: INDIA
I have a url that returns an XML data which contains repeating values and the data it is returning is from a RSS source. I write a method in c# to returns a string that contains the XML without repeating values.Instead of using umbraco.library:GetXmlDocumentByUrl($url1)//document [position() > 0]" i want to fetch the data from the XML based on the document node in the XML

I tried to assign to a variable like this

<xsl:variable name="Xmldata"><xsl:copy-of select="VictorMethods:XmltoString('1824')"/> </xsl:variable>

<xsl:if test="string($Xmldata) != ''">

<xsl:for-each select="Xmldata//document [position() &gt; 0]">

--------remaining code--------------

</xsl:for-each>

but it is not working

Can any body tell how i can fetch the values from the varible and display it

Thanks
Petr Snobelt
Posted: Monday, July 07, 2008 9:02:30 AM
Rank: Aficionado

Joined: 10/2/2007
Posts: 149
Location: Czech Republic
It looks like you need use node-set function,
try look here http://forum.umbraco.org/yaf_postst5352_Xpath-query-question-about-distinct-values.aspx
for example.

BTW:you also don't need filter nodes by c# if you need distinct values, you can do it in xslt...

Petr
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.