Hallo Michael,
Hallo,
Ich stehe gerade komplett auf dem Schlauch, weil ein XSLT Transformation mir wilde Ergebnisse ausgibt. Ich kann leider nicht den vollen Code hier ausführen, deshalb nur meine Fragestellung, wenn zum Beispiel folgendes XML existiert:
<root> <one></one> <two>first text</two> <two>second text</two> </root>
im xslt code gibt es u.a. diese templates
<xsl:template match="node()|@*"> <xsl:copy> <xsl:apply-templates select="node()|@*"/> </xsl:copy> </xsl:template> <xsl:template match="root""> <body> <xsl:apply-templates/> </body> </xsl:template> <xsl:template match="one"> <h1> <xsl:apply-templates/> </h1> </xsl:template> <xsl:template match="two"> <h2> <xsl:apply-templates/> </h2> </xsl:template>
Ich erhalte nun als Ergebnis:
<body> <h1> <h2>first text</h2> <h2>second text</h2> </h1> </body>
ich hätte aber folgendes Ergebnis erwartet:
<body> <h1></h1> <h2>first text</h2> <h2>second text</h2> </body>
Ja, das erhalte ich auch (mit Saxon-HE 12.8 und als XSLT ≥1.0 formuliert). Wobei das zunächst gar nicht funktioniert hat, da hier ein " zuviel stand:
<xsl:template match="root"">
Grüße,
Thomas