[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Filter content of a node without the content of his ch

Subject: 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
his.ch
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.