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

Re: beginner problem with attlist

Subject: Re: beginner problem with attlist
From: "element" <element@xxxxxxxxxxx>
Date: Mon, 17 Jan 2000 11:29:13 +0800
xsl when match
There are 3 mode for pattern nodes operation in XSL:
Template Definition:
  <xsl:template match="pattern"> ... </xsl:template>
Select Operation:
  <xsl:apply-template select="pattern"/>
  <xsl:for-each select="pattern"
Conditional Test:
  <xsl:when/if test="pattern"> ... <xsl:when/if>
Ji Yuchun
1370 8989 632
----- Original Message -----
Sent: Monday, January 17, 2000 4:54 AM
Subject: beginner problem with attlist

I'm new to XSL and I have a problem =ith it, which i think shouldn't be difficult to be solved but I can't find a solution:
I have a DTD which looks =ike:
<!ELEMENT Dokument (Adresse, von_nr, =ositionen, Endsumme, Bankverbindung)+>
  <!ATTLIST Dokument art (Rechnung|Bestellung) #REQUIRED>
<!ELEMENT Adresse (Name, Strasse, =lz, Ort)>
 <!ATTLIST Adresse art (Ersteller|Empfaenger) #REQUIRED>
   <!ELEMENT Name =#PCDATA)>
   <!ELEMENT Strasse (#PCDATA)>
the first version of my document looks =ike this and it works:
<xsl:for-each select="Dokument">
 <xsl:when=20 match=".[@Art='Rechnung']">
 <H1 =TYLE="font-size:30pt" align="center">Rechnung</H1>
 <xsl:when match=".[@Art='Bestellung']">
 <H1 =TYLE="font-size:30pt" align="center">Bestellung</H1>
<xsl:for-each select="Dokument/Adresse">
     <xsl:when match=".[@Art='Ersteller']">
Now I want to distinguish if Art='Ersteller'  matches Art='Rechnung' or =rt='Bestellung'
I tried several thinks like the =ollowing, but nothing works.
<xsl:for-each select="Dokument">
  =lt;xsl:when match=".[@Art='Rechnung']">
    <xsl:for-each select="Dokument/Adresse">
        =lt;xsl:when match=".[@Art='Ersteller']">
Can anyone help me?
Christoph =inn
Current Thread


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.
First Name
Last Name
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.