|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Extract string from CDATA value
> how can i extract "test" from <value><![CDATA[test]]></value>? In exactly the same way as from <value>test</value>. The CDATA makes no difference, it's just wasted bandwidth. > The problem is that i don't know how many > <value><![CDATA[test]]></value> there will be, so i can't use > variables. A curious statement. You don't need variables, but the fact that you have multiple occurrences is no obstacle to using variables. A variable can hold a node-set. > I know that <xsl:value-of select="value" /> works, but i need > the result of extraction in my comparison with another > attribute and you can't say: <xsl:if test="@id = > <xsl:value-of select="value" />">. > Sometimes people make things far more difficult than they are. <xsl:if test="@id = value"> will test if the @id attribute of the current element is equal to the content of any <value> element child of the current element. Michael Kay http://www.saxonica.com/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








