<xsl:template match="pattern"> ... </xsl:template>
<xsl:when/if test="pattern"> ... <xsl:when/if>
----- Original Message -----
Sent: Monday, January 17, 2000 4:54 AM
Subject: beginner problem with attlist
Hi,
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)>
<!ELEMENT Plz
(#PCDATA)>
<!ELEMENT Ort =#PCDATA)>
(....)
the first version of my document looks =ike this
and it works:
(...)
<xsl:for-each
select="Dokument">
<xsl:choose>
<xsl:when=20
match=".[@Art='Rechnung']">
<H1 =TYLE="font-size:30pt"
align="center">Rechnung</H1>
</xsl:when>=/DIV>
<xsl:when
match=".[@Art='Bestellung']">
<H1 =TYLE="font-size:30pt"
align="center">Bestellung</H1>
</xsl:when>
&=bsp;</xsl:choose>
</xsl:for-each>
(...)
<xsl:for-each
select="Dokument/Adresse">
<xsl:choose>
<xsl:when
match=".[@Art='Ersteller']">
(...)
=lt;/xsl:when>
</xsl:choose>
</xsl:for-each>
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">
<xsl:choose>
=lt;xsl:when
match=".[@Art='Rechnung']">
<xsl:for-each
select="Dokument/Adresse">
=<xsl:choose>
=lt;xsl:when
match=".[@Art='Ersteller']">
(...)
</xsl:when>
</xsl:choose>
</xsl:for-each>
=lt;/xsl:when>
</xsl:choose>
</xsl:for-each>=ONT>
Can anyone help me?
Thanks
Christoph
=inn