[daisy] Comparing against value returned by extension in an xsl stylesheet

Karel Vervaeke karel at outerthought.org
Thu Jul 10 18:18:05 CEST 2008


I don't understand the problem...  Is this a xslt question?

This should work:
<xsl:if test="$data = 'something'">
  <einclude:.../>
<xsl:if>

Karel

On Thu, 2008-07-10 at 15:21 +0000, Nick wrote:
> I have a Daisy extension that uses flowscript to query and return a value from a
> Daisy document (in this case, a field from the most recently modified document)
> and returns it. The xsl for the extension looks something like this:
> 
> <xsl:template match="latestDocumentData">
>   <xsl:value-of select="ns:searchResult/ns:rows/ns:row/ns:value"/>
> </xsl:template>
> 
> I then need to modify another xsl stylesheet to change its output based on this
> value. What I'm doing now seems to be getting me close, but doesn't quite work:
> 
> <xsl:variable name="data">
>   <einclude:include src="cocoon:/ext/path/to/callLatestDocumentData"/>
> </xsl:variable>
> 
> Now, I can display the value using <xsl:copy-of select="$data"/>, but what I
> really need to do is use that value to compare against something else. i.e.,
> <xsl:if "$data == 'something'".../>
> 
> Is there anything else I can do? I can just look up this data myself and insert
> it into the cocoon pipeline myself, but I would prefer to have it automated...
> 
> In any case, thanks in advance for your help!
> 
> _______________________________________________
> daisy community mailing list
> Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
> mail to: daisy at lists.cocoondev.org
> list information: http://lists.cocoondev.org/mailman/listinfo/daisy


More information about the daisy mailing list