xsl-newb
04-14-2009, 07:38 PM
I have researched the forums and elsewhere and am now comfortable with using "substring-before". However, I am unable to figure out how to use it in a specific scenario.
Here is a piece of the XML I'm looking to transform:
<prize prize_no="6221" prize_name="Big Winner">
<winning_digits>154-902-342-542-991, Extra: 840</winning_digits>
</prize>
Here is a piece of my XSL code:
<WinningNumbers>
<xsl:attribute name="dt:dt">string</xsl:attribute>
<xsl:value-of select="winning_digits" />
</WinningNumbers>
What I'm trying to do is only parse the following from <winning_digits>: 154-902-342-542-991. Basically, everything before the comma. I can't figure out how to get substring-before to work with the specific selection of "winning_digits".
Thanks in advance for any help here...
Here is a piece of the XML I'm looking to transform:
<prize prize_no="6221" prize_name="Big Winner">
<winning_digits>154-902-342-542-991, Extra: 840</winning_digits>
</prize>
Here is a piece of my XSL code:
<WinningNumbers>
<xsl:attribute name="dt:dt">string</xsl:attribute>
<xsl:value-of select="winning_digits" />
</WinningNumbers>
What I'm trying to do is only parse the following from <winning_digits>: 154-902-342-542-991. Basically, everything before the comma. I can't figure out how to get substring-before to work with the specific selection of "winning_digits".
Thanks in advance for any help here...