[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Re: Re: Dynamic Filter Menus

Subject: Re: Re: Re: Dynamic Filter Menus
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Fri, 26 Oct 2001 22:30:14 -0700 (PDT)
dynamic circular filter
> I figured it out, so here is what I had to use. I couldnt use DOM like was
> suggested because it didnt like "xsl:script" for some reason and when I
> tried to use it directly with entries like:

Unfortunately, You didn't get the idea. I suggested that you modify your stylesheet
after it has been loaded and compiled (after you have obtained a DOMDocument object
containing the stylesheet), but ***before*** the transformation is started.

Therefore this excludes any usage of "xsl:script" (BTW there's no such element in
XSLT 1.0).

> Outside my templates I used:
>
> <xsl:variable name="vven" select="/docs/vendorfilter" />
> <xsl:variable name="vcat" select="/docs/categoryfilter" />
> <xsl:variable name="vver" select="/docs/versionfilter" />
> 
> <xsl:key name="venkey"       match="entry" use="@vendor" />
> <xsl:key name="catkey"       match="entry" use="@category" />
> <xsl:key name="verkey"       match="entry" use="@version" />
> <xsl:key name="vencatkey"    match="entry[@category=$vcat]" use="@vendor" />
                    

The above xsl:key definition is illegal -- references to variables are not allowed
in the match pattern of xsl:key. This is to avoid circular definitions, as global
variables may be defined using the key() function.

In case your XSLT processor did not flag this as error, it is better to use a truly
compliant XSLT processor instead.

Even if this worked, it suffers from a "combinatorial explosion" problem and should
not be preferred to other, more compact and maintainable solutions.

Cheers,
Dimitre Novatchev.

__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.