Hi everyone
as I don't think I'll ever figure this out on my own (even with all the doc I read), please tell me what I do wrong, even if it is strictly speaking a xslt-problem. But as XMLSpy evaluates my XPath how I want it to, but not the built-in XSLT-processor in 5.2.6-2ubuntu4.1...:
I've got a html-fragment like this:
<h5><b>Art. 1</b> Persoenlicher Geltungsbereich</h5>
As result of the transformation I'd like to have something as:
<articleMetadata>
<articleNumber>Art. 1</articleNumber>
<articleHeader><text>
Persoenlicher Geltungsbereich
</text></articleHeader>
I try to achieve this by using:
<xsl:template match="h5">
<articleMetadata>
<xsl:apply-templates select="b"/>
<articleHeader><text>
<xsl:value-of select="text()"/>
</text></articleHeader>
</articleMetadata>
</xsl:template>
<!-- Artikelnummer -->
<xsl:template match="b">
<articleNumber>
<xsl:value-of select="."/>
</articleNumber>
</xsl:template>
Unfortunately, text() only gives me an empty string. If I try out the full XPath in XMLSpy, text() points me to "Persoenlicher Geltungsbereich".
What don't I understand? Thanks for your help!
Daniel