|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: substring-after Not Working in apply-templates
> From: Ahsan Abbas ASGHAR [mailto:S3047382@xxxxxxxxxxxxxxxxxxx] > I am trying this statement: > > <xsl:apply-templates select="substring-after(@rdf:about,'#')"> > </xsl:apply-templates> > > But this gives an error saying: > MyXSLFile.xsl:39: value of expression cannot be converted to a node-set The error message is correct and clear. Apply-templates works on a node-set, but your expression returns a string (what else would you expect "substring-after" to return?). > Can anyone guide me how can I write the result of this substring-after > thing into an XML file. Do I have to use any other tag rather than > xsl:apply-templates or what? Without knowing any more details of what you are starting with and what you want to achieve, we can only offer some generic advice. In this case, you need to qualify or filter the nodes you select. You could do this somewhat as follows - select ="*[substring-after(@rdf:about,'#')]" This would select all nodes, whatever their names, that contain an rdf:about attribute that has some text after the "#" character. Cheers, Tom P
|
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








