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

beginner problem with attlist

Subject: beginner problem with attlist
From: "Christoph Linn" <c.linn@xxxxxxxxxx>
Date: Sun, 16 Jan 2000 21:54:48 +0100
xsl attlist
Hi,
I'm new to XSL and I have a problem with it, which i think shouldn't be difficult to be solved but I can't find a solution:
 
I have a DTD which looks like:
 
<!ELEMENT Dokument (Adresse, von_nr, Positionen, Endsumme, Bankverbindung)+>
  <!ATTLIST Dokument art (Rechnung|Bestellung) #REQUIRED>
 
<!ELEMENT Adresse (Name, Strasse, Plz, Ort)>
 <!ATTLIST Adresse art (Ersteller|Empfaenger) #REQUIRED>
   <!ELEMENT Name (#PCDATA)>
   <!ELEMENT Strasse (#PCDATA)>
   <!ELEMENT Plz (#PCDATA)>
   <!ELEMENT Ort (#PCDATA)>
 
 (....)
 
the first version of my document looks like this and it works:
 
(...)
<xsl:for-each select="Dokument">
 <xsl:choose>
 <xsl:when match=".[@Art='Rechnung']">
 <H1 STYLE="font-size:30pt" align="center">Rechnung</H1>
 </xsl:when>
 
 <xsl:when match=".[@Art='Bestellung']">
 <H1 STYLE="font-size:30pt" align="center">Bestellung</H1>
 </xsl:when>
 </xsl:choose>
</xsl:for-each>
 
(...)
 
 
<xsl:for-each select="Dokument/Adresse">
    <xsl:choose>
     <xsl:when match=".[@Art='Ersteller']">
(...) 
    </xsl:when>
   </xsl:choose> 
</xsl:for-each>
 
Now I want to distinguish if Art='Ersteller'  matches Art='Rechnung' or Art='Bestellung'
 
I tried several thinks like the following, but nothing works.
 
<xsl:for-each select="Dokument">
 <xsl:choose>
  <xsl:when match=".[@Art='Rechnung']">
 
    <xsl:for-each select="Dokument/Adresse">
       <xsl:choose>
        <xsl:when match=".[@Art='Ersteller']">
(...) 
        </xsl:when>
      </xsl:choose> 
    </xsl:for-each>
 
   </xsl:when>
 </xsl:choose>  
</xsl:for-each>
 
 
Can anyone help me?
 
 
Thanks
 
Christoph Linn
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.