XSL Transform in .NET? - TechRepublic
Question
October 6, 2011 at 02:32 AM
soundbomber

XSL Transform in .NET?

by soundbomber . Updated 14 years, 8 months ago

Hi,
I am using an xsl stylesheet to transform a xml file (an iPod library plist to xml code that my app can handle). I have succesfully applied the transform in VB.NET using an Xsl.XslCompiledTransform object, and this results in an xml file that I can successfully use with my app. My problem is this, all the values return to the new xml file are string values, I require the numbers to be numbers, strings to be strings. I havein my xslt file applied a test to the value thus:

xsl:when test=”number(following-sibling::node()[1]) = following-sibling::node()[1]”
xsl:value-of select=”number(following-sibling::node()[1])”/
/xsl:when
xsl:otherwise
xsl:value-of select=”following-sibling::node()[1]”/
/xsl:otherwise

this successfully finds number formated values, but the resulting xml file still returns all string values. Does anyone have any pointers? I have virtually no xml knowledge.
Thanks in advance.

This discussion is locked

All Comments