Subject: [xsl] How to use xsl:substring-before in XSLT 2.0 From: Selva Ganesh <selvaganesh1985@xxxxxxxxx> Date: Sun, 10 May 2009 08:12:38 +0530 |
Hi All, This is my input: <p class="LegLevel3Amend">“ “the Framework Directive” means Directive 2007/46/EC of the European Parliament and of the Council of 5 September 2007 establishing such vehicles(<a class="LegFootnoteRef" href="#f00003" title="Go to footnote 3" id="Backf00003">3</a>);” ;</p> Actually I expected output: <defl> <defli>“<termd href="d001">“the Framework Directive”</termd> means <def id="d001"><cit><loc>Directive 2007/46/EC of the European Parliament and of the Council of 5 September 2007</loc></cit> establishing such vehicles </def>;”;</defli> I wrote the xslt coding: <hov:template match="p[@class[.='LegLevel3Amend']]"> <defl> <defli> <hov:apply-templates select="text()"></hov:apply-templates> </defli> </defl> </hov:template> <hov:template match="text()"> <hov:value-of select="substring-before(.,' ')"></hov:value-of> <termd> <hov:value-of select="substring-before(substring-after(.,' “'),'”')"></hov:value-of> </termd> <dif> <hov:value-of select="substring-after(.,'” ')"></hov:value-of> </dif> </hov:template> I got the output from xslt executed <defl><defli>“<termd>the Framework Directive</termd><dif>means Directive 2007/46/EC of the European Parliament and of the Council of 5 September 2007 establishing such vehicles(</dif>);”<termd></termd><dif>;</dif></defli></defl> The text() function was executed unnecessary location, and remove the some content, can you correct the coding or suggest any other function Thanks, Selva
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] How to use following-sibl, Michael Kay | Thread | [xsl] XSL: multiple element come to, Selva Ganesh |
[xsl] How to use following-sibling , Selva Ganesh | Date | [xsl] XSL: multiple element come to, Selva Ganesh |
Month |