Ben aşağıdaki XML Kodu:xslt
<root>
<Kursstamm>
<Texteinmischdefinitionen>
<Texteinmischung Typ="Text" Position="Vorlauftext">Text A</Texteinmischung>
</Texteinmischdefinitionen>
<KursstammID>Text B
</KursstammID>
<Kursstammtitel>Text C</Kursstammtitel>
<Kurztext>Text D</Kurztext>
<Kursgebühr>Price</Kursgebühr>
<Trainerprosa>Text E</Trainerprosa>
<Texteinmischdefinitionen>
<Texteinmischung Typ="Text" Position="Hinweistext">Text F </Texteinmischung>
</Texteinmischdefinitionen>
</Kursstamm>
</root>
Ve ben XSLT ile işlemek istiyorum:
Text A
Text B
Text C
Text D
Text E
Text F
Ben Metin A'nın ile ilgili sorunlar ve Metin F!
bu XSLT kullanabilirsiniz:<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" version="1.0" encoding="UTF-8" indent="no"/>
<xsl:template match="/root/Kursstamm">
<xsl:copy-of select="Texteinmischung[@Typ='Vorlauftext']" />
<xsl:copy-of select="KursstammID"/>
<xsl:copy-of select="Kurztext"/>
<xsl:copy-of select="Kursgebühr"/>
<xsl:copy-of select="Trainerprosa"/>
<xsl:copy-of select="Nachlauf"/>
<xsl:copy-of select="Texteinmischung[@Typ='Hinweistext']" />
</xsl:template>
</xsl:stylesheet>
Ama
<Texteinmischung Typ="Text" Position="Vorlauftext">
veya
<Texteinmischung Typ="Text" Position="Hinweistext">
nasıl özelliklere sahip etiketleri alabilirsiniz bulamadık?
Yardımlarınız için teşekkür ederiz! sorunlu copy-of için
Eğer '@ Tipi = "Hinweistext"' ile bir şey sorarsanız, neden bulmak beklenir @ Position = "Hinweistext" 'ile bir şey? –