cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J.Pietschmann" <j3322...@yahoo.de>
Subject Re: Simple question...
Date Sat, 03 May 2003 18:40:55 GMT
João César wrote:
> <xsl:variable name="aux"><xsl:value-of select="."/></xsl:variable>
> <nome><xsl:value-of
> select="experts/artigos/DocSum[Id='$aux']/Item[@Name='Authors']"/></nome>
> 
> Is the syntax use of $aux in the second line correct?
If the processor doesn;t rise an exception the syntax is
correct. Whether the code matches your intentions, well,
you didn't explain them that much in depth.

I guess, however, you meant
  <xsl:variable name="aux" select="."/>
  <nome>
    <xsl:value-of
        select="experts/artigos/DocSum[Id=$aux]
                /Item[@Name='Authors']"/>
  </nome>

In your code '$aux' is a string containing a dollar sign
and the characters a, u and x, rather that the reference
to the variable named "aux".

BTW XSLT questions are best asked on the XSL list:
   http://www.mulberrytech.com/xsl/xsl-list/
although Cocoon folks is also quite knowledgable.
It is usually recommended to show some more context,
like the relevant snippet of the XML input and the match
of the template the XSLT code snippet is in, as well
as stating the "doesn't work" part in some more detail,
like "the content of <nome> is comes out empty".

J.Pietschmann


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message