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

RE: Problem with attributes

Subject: RE: Problem with attributes
From: "Tim Watts" <timw@xxxxxxx>
Date: Wed, 23 May 2001 16:12:06 +1000
RE:  Problem with attributes
Seema,

Could you show us a bit of your xml? 
I'm presuming it is a bit like...
<book>
  <chapter num="1">
    <title>Uhaha</title>
  </chapter>
  <chapter num="2">
    <title>Uhgoo</title>
  </chapter>
  <chapter num="3">
    <title>Uhbaa</title>
  </chapter>
</book>
Is that right?

I can't see why 
<xsl:template match="book">
  <xsl:for-each select="chapter">
    <a href="XMLShowLevel?num={@num}"><xsl:value-of select="title"/></a>
  </xsl:for-each>
</xsl:template>
wouldn't work in that case.

Tim

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Seema Kumar
Sent: Thursday, 24 May 2001 2:19 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  Problem with attributes


Hi all !

I had posted a similar question yesterday, but failed to get a proper
solution. I have the following lines inserted in my xsl :
<xsl:for-each select="chapter">
<a href="XMLShowLevel?num={@num} "><xsl:value-of select="title"/></a>

However, when the servlet XMLShowLevel is called it refuses to get the
value of the attribute num as parameter. It just gets the string "{@num}"
and not the value. Could somebody help me with this ?

Also could anyone provide me with any sample implementation of a Table of
Contents where it is viewed level by level ?

Thanks in advance
Seema


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

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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