Stefan Cullmann wrote
samkuehn wrote
xsl params should be built into the core module. There is no good reason for leaving them out.
|
Your proposed code adds the querystrings as xsl-parameters. Can you please discribe a use case for that?
My use case is at www.vashon.biz (temp url for a site still under development): a bunch of animals at a pet shelter. I have one XSLT file that I would like to pass in parameters to. The parameters are:
Species: Cat, Dog, Other, or All
Status: Lost, Found, Adoptable, Other, or All
SortBy: Number or Name
Currently I have 1 XML file and 5 different XSLT files that only differ in the top few lines where I hardcode these parameters like so:
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- Value values to sort on are: ID, Name -->
<!-- BUGBUG: ALSO must set this on line 100 & 101-->
<xsl:param name="sortBy">Name</xsl:param>
<!-- Valid values for 'select Species': Cat, Dog, or All-->
<xsl:param name="selSpecies">Dog</xsl:param>
<!-- Valid values for 'Status': Adoptable, Lost, Found, or All-->
<xsl:param name="Status">Adoptable</xsl:param>
<!-- Number of characters of the Description to display-->
<xsl:param name="DescLen">1024</xsl:param>
...
What would be better would be to have a couple controls at the top of the page that would allow user to select their settings on the same page rather than going to different pages - which is what I force them to do now.
- John