[daisy] Re: daisy Digest, Vol 25, Issue 24
Diane Soini
dso at qad.com
Wed Oct 18 19:18:08 CDT 2006
So I muddled my way through and actually created a document type-specific
style sheet with a query in it. Several issues I cannot figure out:
1) My query is looking up documents based on the document type. I would
like to also look up documents based on a field, but have it match the
field with the document. Something like:
<p:query>select name, $Vertical where documentType='CaseStudy' and
$Vertical = <the same value of the current page doing this query></p:query>
I am not sure how to do that.
2) My $Vertical field is a multi-value field. When I loop through the
results, I can't get the field out.
<h3>Case Studies</h3>
<ul>
<xsl:for-each
select="../p:group[@id='casestudies']/d:searchResult/d:rows/d:row">
<li><a
href="{$documentBasePath}{@documentId}?branch={@branchId}&language={@languageId}">
<xsl:value-of select="d:value[1]"/>
[[HOW DO I GET THE FIELD OUT?? d:value = d:value[1], d:value[2] doesn't
give me anything, . gives me the field and the name. I can't get the field
out by itself]]
</a>
</li>
</xsl:for-each>
</ul>
3) To make matters worse, I can't get the individual values out of my
multi-value field. It's just a lump of one value all mushed together. How
do I get the values out as an array, and how do I loop through the array?
Or do multi-values not really work?
4) I'm obviously using the query to display a list. However, I don't want
to show the list or the heading if there are no matches with the verticals.
How do I determine that there are no relevant results?
Since my current query is this:
<p:query>select name, $Vertical where documentType='CaseStudy'</p:query>
I get all the documents even if they are the wrong ones. I can't figure out
how to set a variable or determine somehow whether the list has any
relevant case studies until too late in the HTML. I don't want to output
anything if none of the case studies match.
More information about the daisy
mailing list