Subject: beginner problem with attlist From: "Christoph Linn" <c.linn@xxxxxxxxxx> Date: Sun, 16 Jan 2000 21:54:48 +0100 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: No more 1957, Duane Nickull | Thread | Re: beginner problem with attlist, element |
No more 1957, XSL-List Owner | Date | RE: beginner problem with attlist, Mike Brown |
Month |