Re: [xsl] fixing XSL search using values from a variable against multiple XML files

Subject: Re: [xsl] fixing XSL search using values from a variable against multiple XML files
From: "Wendell Piez wapiez@xxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 4 Oct 2018 13:18:54 -0000
Hey Dave Lang,

Graydon's suggestions are the sort of "long way around" that will get
you there more quickly in the end ... :->

To suggest an even longer way around, you might also think about how
to do this with templates alone (no xsl:for-each instructions). An
elegant solution will be both fast, and easy to debug. And the
templates will be really small.

Welcome to the list! It is fairly quiet these days, but there are
people reading and helping. Indeed the signal/noise ratio is amazingly
high.

Cheers, Wendell
On Wed, Oct 3, 2018 at 9:42 PM Dave Lang emaildavelang@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> Thanks for your reply, Graydon. I don't need to worry about not finding
> anything right now - the rest of the xsl is working - it's this part
> that is causing problems.
>
> I know (I think) that it's missing a </xsl:for-each> but for some reason
> Oxygen won't accept another one. Also the if test references a variable
> that isn't declared but I'm not sure what's going on with the search so
> I don't know what to put there.
>
> cheers
>
> <xsl:template match="/">
>      <xsl:for-each select="collection('.?select=*.xml;recurse=yes')"/>
>      <xsl:variable name="xml_filenames" select="."/>
>          <xsl:for-each select="$filenames_to_find">
>              <xsl:if test="(contains($t, .))">
>                  <xsl:message>{document-uri($xml_filenames)} contains
> {.}</xsl:message>
>              </xsl:if>
>          </xsl:for-each>
> </xsl:template>
> 



-- 
Wendell Piez | http://www.wendellpiez.com
XML | XSLT | electronic publishing
Eat Your Vegetables
_____oo_________o_o___ooooo____ooooooo_^

Current Thread