cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Irving Salisbury <...@dotech.com>
Subject Re: Simple question...
Date Sat, 03 May 2003 18:26:57 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body>
Two other things to try (assuming you have debugged the variable and know
that it is getting set to what you think it is getting set to:<br>
<br>
The first thing I would try to do is to make sure the variable is being treated
as a string:<br>
<pre wrap="">&lt;xsl:variable name="aux"&gt;&lt;xsl:value-of select="."/&gt;&lt;/xsl:variable&gt;
&lt;nome&gt;
&lt;xsl:value-of select="experts/artigos/DocSum[string(Id)=string($aux)]/Item[@Name='Authors']"/&gt;
&lt;/nome&gt;
</pre>
The second thing to try is to select the variable differently instead of
embedding it within the tag. &nbsp;<br>
<pre wrap="">&lt;xsl:variable name="aux" select="."/&gt;
&lt;nome&gt;&lt;xsl:value-of
select="experts/artigos/DocSum[Id=$aux]/Item[@Name='Authors']"/&gt;&lt;/nome&gt;

The first one should work for you.  In either case, I believe you have to drop the ' around
the $aux otherwise it will try to match the string $aux without dereferencing the variable.

</pre>
<br>
<br>
<br>
Jo&atilde;o C&eacute;sar wrote:<br>
<blockquote type="cite" cite="mid001501c3119d$99616360$0400a8c0@golias">
  <pre wrap="">Yes we tried a static value and it's working that way, and it's a tag,
we
really don't understand what's the problem because we think this would be a
simple issue...

Thanks :|

Joao Cesar
<a class="moz-txt-link-abbreviated" href="mailto:joaocesar@duploclique.com">joaocesar@duploclique.com</a>

Computer Science Student's @ University of Lisboa, PORTUGAL


----- Original Message ----- 
From: "Miles Elam" <a class="moz-txt-link-rfc2396E" href="mailto:miles@pcextremist.com">&lt;miles@pcextremist.com&gt;</a>
To: <a class="moz-txt-link-rfc2396E" href="mailto:cocoon-users@xml.apache.org">&lt;cocoon-users@xml.apache.org&gt;</a>
Sent: Saturday, May 03, 2003 6:55 PM
Subject: Re: Simple question...


  </pre>
  <blockquote type="cite">
    <pre wrap="">Jo&atilde;o C&eacute;sar wrote:

    </pre>
    <blockquote type="cite">
      <pre wrap="">Can we do this?

&lt;xsl:variable name="aux"&gt;&lt;xsl:value-of select="."/&gt;&lt;/xsl:variable&gt;
&lt;nome&gt;&lt;xsl:value-of
select="experts/artigos/DocSum[Id='$aux']/Item[@Name='Authors']"/&gt;&lt;/nome&gt;

      </pre>
    </blockquote>
    <pre wrap="">Is "Id" an attribute or a tag?  If it's an attribute, you need "@Id"
instead.  It looks like it would work otherwise.  Have you tried using
the XPath with a static value to check validity?

eg. experts/artigos/DocSum[Id='5']/Item[@Name='Authors']

Does that work?

- Miles Elam



---------------------------------------------------------------------
To unsubscribe, e-mail: <a class="moz-txt-link-abbreviated" href="mailto:cocoon-users-unsubscribe@xml.apache.org">cocoon-users-unsubscribe@xml.apache.org</a>
For additional commands, e-mail: <a class="moz-txt-link-abbreviated" href="mailto:cocoon-users-help@xml.apache.org">cocoon-users-help@xml.apache.org</a>

    </pre>
  </blockquote>
  <pre wrap=""><!---->


---------------------------------------------------------------------
To unsubscribe, e-mail: <a class="moz-txt-link-abbreviated" href="mailto:cocoon-users-unsubscribe@xml.apache.org">cocoon-users-unsubscribe@xml.apache.org</a>
For additional commands, e-mail: <a class="moz-txt-link-abbreviated" href="mailto:cocoon-users-help@xml.apache.org">cocoon-users-help@xml.apache.org</a>
  </pre>
</blockquote>
<br>
</body>
</html>


---------------------------------------------------------------------
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