This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Problem with attributes
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: Re: [xsl] Problem with attributes
- From: "Seema" <2kseema at sun20 dot datamatics dot com>
- Date: Wed, 23 May 2001 16:25:25 +0530
- References: <672DE6F29149D411AB1800508BCF9D7A0247F622@SIKMAIL>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi !
Thanks for your solution. It worked !!
One more help please...
If I also want to pass the name of the current node, such as 'volume' or
'chapter', how do I do it in my xsl ?
I tried using the name() function, but it gave me an error saying
"Unknown function".
This is the code I used :
<xsl:for-each select="volume">
<a>
<xsl:attribute name="href">
XMLGenServlet1?num=<xsl:value-of select="@no" />,
node=<xsl:value-of select="name()" />
</xsl:attribute>
<xsl:value-of select ="title"/><br/>
</a>
Thanks in advance.
Regards,
Seema Kumar
----- Original Message -----
From: "Student1 ASCO-ELK (RBJE/ELK)" <Student1.ASCO-ELK@jp.bosch.com>
To: <xsl-list@lists.mulberrytech.com>
Sent: Wednesday, May 23, 2001 11:36 AM
Subject: RE: [xsl] Problem with attributes
> hi
>
> just try
> <xsl:for-each select="chapter">
> <a>
> <xsl:attribute name="href">
> XMLShowLevel?num=<xsl:value-of select="@num" />
> </xsl:attribute>
> </a>
> </xsl:for-each>
>
> i am not sure if this {@num} works properly in every case, but the
solution
> above
> should work fine.
>
> regards goose
>
> -----Original Message-----
> From: Seema Kumar [mailto:2kseema@sun20.datamatics.com]
> Sent: Thursday, May 24, 2001 1:19 AM
> To: xsl-list@lists.mulberrytech.com
> Subject: [xsl] 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
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list