XSLT select text and tags after some elements
this might sound easy problem to you, but somehow Im stuck with it, here is the scenario, I have an xml doc that looks smth like:
<doc>
<id>25147</id>
<article>Peggy Lee</article>
<url>http://en.wikipedia.org/wiki/Peggy_Lee</url>
Peggy Lee (May 26, 1920 – January 21, 2002) was an <a href="United_States">American</a> <a href="Jazz">jazz</a> and ...
</doc>
Now, I'm interested to select the text such as Peggy Lee...., plust the a href tags and all other tags, but not , nor article and other previous tags, as I've selected those before. Any solution?
So the output should be:
Peggy Lee (May 26, 1920 – January 21, 2002) was an <a href="United_States">American</a> <a href="Jazz">jazz</a> and ...
开发者_JS百科thanx in advance
Try something like this:
<xsl:template match="doc">
<xsl:copy-of select="url/following::node()"/>
</xsl:template>
精彩评论