Re: beginner problem with attlist

Subject: Re: beginner problem with attlist
From: Dan Vint <dvint@xxxxxxxx>
Date: Mon, 17 Jan 2000 07:51:11 -0500
Quick observation it looks like you have a case sensitivity problem. The
attribute is defined as:

  <!ATTLIST Dokument art (Rechnung|Bestellung) #REQUIRED>

And you are looking for:

 <xsl:when match=".[@Art='Rechnung']">

one has a lower case art and the other is uppercase Art - these are two
different attributes.

..dan

At 09:54 PM 1/16/00 +0100, you wrote: 
>
> 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




---------------------------------------------------------------------------
Danny Vint                                       http://www.dvint.com
Author: SGML at Work   	http://www.slip.net/~dvint/pubs/sgmlatwork.shtml 
                                                       mailto:dvint@xxxxxxxx
    
Calian                                              Voice:804-975-3482
mailto:d.vint@xxxxxxxxxx
Charlottesville, VA Office                http://www.calian.com              


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread