Good morning all,
I have the following xml :
<?xml version="1.0" encoding="UTF-8"?>
<anchor>
<title>Seconde classe</title>
<content>
<P> Hello World, <b>here is a text in bold</b> and this is the rest
of the text</P>
<P> Hello World 2, this is the second paragraph ! <b>here is a text
in bold</b> and this is the rest of the text</P>
</content>
</anchor>
What I want is to remove the <P> and </P>
I try with the following xsl :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mydoctype[<!ENTITY nbsp " ">]>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="ISO-8859-1"
omit-xml-declaration="yes" standalone="yes" indent="yes"/>
<xsl:template match="anchor">
<font class="copy"><b><xsl:value-of select="title" /></b></font><br/>
<xsl:apply-templates select="content"/>
</xsl:template>
<xsl:template match="content">
coucou
<xsl:if test="contains(., '<P>')">
coucou2
<xsl:value-of select="substring-before(substring-after(., '<P>'),
'</P>')"/>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
but it doesn't work either.
Do you have an idea of how I should do it ?
Thanks in advance for your help,
Alexandra