RE: [xsl] Problem with attributes

Subject: RE: [xsl] Problem with attributes
From: "Student1 ASCO-ELK (RBJE/ELK)" <Student1.ASCO-ELK@xxxxxxxxxxxx>
Date: Thu, 24 May 2001 02:27:16 +0200
hi,
if you have the problem with "unkown function" then you should
change your namespace delaration at the start of your xsl document.
i think you have something like:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl";>

this one is obsolete,but ie5 uses it (thx to microsoft),
but to use the name() function you should have:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

so just change it,and if you are using the ie5 as your browser, then you
should perhaps go to www.microsoft.com and look for msxml to get the latest
update on their xml/xsl parser.
your code seems to be correct, so i think ( and mike kay too ;) ) the
problem is the namespacedeclaration.

hope i could help you 
regards goose

-----Original Message-----
From: Seema [mailto:2kseema@xxxxxxxxxxxxxxxxxxxx]
Sent: Wednesday, May 23, 2001 7:55 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Problem with attributes


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

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


Current Thread