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

RE: Need help with xsl-html conversion

Subject: RE: Need help with xsl-html conversion
From: "Sellmer-Brüls, Barbara" <B.Sellmer-Bruels@xxxxxxxxxxx>
Date: Mon, 28 Aug 2000 11:37:52 +0200
html tag emp

You can use the xsl:attribute not only in relation to xsl:element but also
to output an attribut for an HTML tag. 
Try xsl:attribute as follows 

      <xsl:attribute name="name">
            <xsl:value-of select="@id"/>  ====> this is the content of the
name attribute
     <xsl:value-of select="@id"/>     ===> this is the content of <a>...</a>

The rest should be done with xsl:sort and so on.

Barbara Sellmer-Bruels
Klopotek & Partner GmbH - Berlin

Gu=F0mundur_Erlingsson?= <txakolin@xxxxxxxxx> wrote:


I'm trying to set up a list of employees in xml, and I'm going to use xsl to
display it in two different ways, in alphabetical order and by departments.
In the alphabetical output (in html) I want to have all the characters in
the alphabet at the beginning of the file, and each character is a link to
the appropriate section. Nothing complex. The thing that I'm not sure of how
to implement is the <a name...> anchor. The xml-file is setup like this:

    <part id="A">
		<name>Allen, Jane</name>
		<dep>Sales department</dep>
    <part id="B">
		<name>Bright, John</name>


The thing is that I'm trying to make a loop that goes through the file and
spits out html something like this:

   <h2><a name="A">A</a><h2>
   <p>Allen, Jane<br>
      Sales department<br>

and so on. Fairly simple. But I can't find a way to get the XSL loop to get
the value of the 'part' element and put it into the <a name=""> tag, between
the quotation marks. Meaning that I don't want to repeat the loop for every
single letter of the alphabet. So far the XSL part looks someting like this:

         <h2><a name=""></a><xsl:value-of select="@id"/></h2>
          <xsl:for-each select="starfsm">
           <p class="noindent">
               <xsl:when test="job[.='']"><xsl:value-of
               <xsl:otherwise><xsl:value-of select="nafn"/>,

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

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.