RE: [xsl] table value

Subject: RE: [xsl] table value
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 15 Jun 2006 11:42:45 +0100
The error message means what it says: xsl:value-of requires a select
attribute. If you want to output the string value of the context node (I'm
guessing), then use <xsl:value-of select="."/>.

Your URL Lab_Number/Age"&value=" is also wrong. An ampersand in an XML
document must be written as &amp; (that's &_amp; without the underscore).

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: Andrew Neiderer [mailto:neiderer@xxxxxxxxxxxx] 
> Sent: 15 June 2006 11:18
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Cc: neiderer@xxxxxxxxxxxx
> Subject: [xsl] table value
> 
> 
> I am new to XSLT.  I am just trying to get my XML work with 
> an <xsl:stylesheet>.  
> My stylesheet Ecoli.xsl includes the following for a table entry
> 
> .
> 
> .
> 
> .
> 
>   <xsl:template match="Age">
> 
>     <A>
> 
>       <xsl:attribute name="HREF">
> 
>         sllink://query?field="Lab_Number/Age"&value="
>         <xsl:value-of/>"
> 
>       </xsl:attribute>
>       "
> 
>       <FONT COLOR=3D"#0000FF">
> 
>         <xsl:value-of />
> 
>       </FONT>
> 
>     </A>
> 
>   </xsl:template>
> 
> .
> 
> .
> 
> .
> 
> 
> 
> I am using Java 1.5.0_06 with Xalan-Java 2 from the Apache 
> Project on my Dell Windows XP and  results in the following
> 
> 
> C:\>java org.apache.xalan.xslt.Process -IN 
> Lab_Number-721469.xml -XSL EColi.xsl 
> 
> 
> 
> XSLT Error (javax.xml.transform.TransformerConfigurationException):
> javax.xml.tr
> 
> ansform.TransformerException: 
> javax.xml.transform.TransformerException:
> xsl:valu
> 
> e-of requires attribute: select
> 
> 
> I think the table entry is prompting for a value which is 
> then processed; I really don't know :-(
> 
> 
> If anyone knows off-hand a fix for this please let me know 
> how to fix this code.
> 
> 
> Thank you.
> 
> 
> - Andrew M. Neiderer

Current Thread