Subject: [xsl] Filter content of a node without the content of his child node? From: "Silvia Liberto" <SLiberto@xxxxxx> Date: Wed, 25 Oct 2006 16:21:55 +0200 |
Hello, I have this .xml file: <?xml version="1.0" encoding="iso-8859-1" ?> <Uebungen> <Vorlesung>Web Programmierung</Vorlesung> <Uebung Nummer="1"> <Titel>Erste Beispiele</Titel> <Aufgabe Nummer="1"> <Titel>Hello World!</Titel> <Frage> Hello...soll ausgegeben werden! <Fixed> Hello! </Fixed> </Frage> <Loesung> <Listing><fileref name="Uebungen/bash/default.xml"/></Listing> </Loesung> </Aufgabe> </Uebung> </Uebungen> and this xslt (xslt 1.0) <article> <xsl:attribute name="role">uebungsaufgabe</xsl:attribute> <xsl:for-each select="Uebungen/Uebung"> <xsl:if test="@Nummer='1'"> <xsl:call-template name="HauptTitle"/> <xsl:for-each select="Aufgabe"> <section> <xsl:call-template name="Aufgabe"/> <xsl:call-template name="Antwort"/> </section> </xsl:for-each> </xsl:if> </xsl:for-each> </article> </xsl:template> <xsl:template name="HauptTitle"> <title><xsl:value-of select="Titel"/></title> </xsl:template> <xsl:template name="Aufgabe"> <title><xsl:value-of select="Titel"/></title> <simplesect> <xsl:attribute name="role">frage</xsl:attribute> <title></title> <para> <xsl:value-of select="Frage"/> </para> </simplesect> </xsl:template> --> how can i realise this output: ... <section> <title>Hello World!</title> <simplesect role="frage"> <title/> <para> Hello...soll ausgegeben werden! <programlisting>Hello!<programlisting> </para> </simplesect> ... I have the problem to create a <para>-tag with the content of <Frage> but WITHOUT the content of the tag <Fixed>. This content should be inside of the tag <programlisting>-tag within of <para>! can anybody give me an idea? thanks a lot! regards Silvia -- GMX DSL-Flatrate 0,- Euro* - \berall, wo DSL verf|gbar ist! NEU: Jetzt bis zu 16.000 kBit/s! http://www.gmx.net/de/go/dsl
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Error in MSXML processor , Michael Kay | Thread | Re: [xsl] Filter content of a node , David Carlisle |
RE: [xsl] Error in MSXML processor , Michael Kay | Date | Re: [xsl] Filter content of a node , David Carlisle |
Month |