[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Literals in XSLT
Hello,
I am attempting to write an XML-to-XML filter for document entries. The user can filter the XML file by author, title, or type (ps, pdf, doc, etc). Structure of xml: <?xml version="1.0"> <repository> <so> <author>Bob</author> <title>I Like Cheese</title> <type>pdf</type> </so> </repository> To do it all in one XSL file, I wrote the following: <xsl:param name="query">'Ruth Ablett'</xsl:param> <xsl:param name="search-mode">=</xsl:param> <xsl:param name="sort-by">author</xsl:param> <xsl:param name="BigQuery" select="concat($sort-by, $search-mode, $query)"/> ... XSL required stuff... <xsl:template="/"> <xsl:if test="{$BigQuery}"> <xsl:apply-templates select="so"> ... the "so" template has the required stuff to filter the document. However, the transformer blows up at {$BigQuery}. Can I use literals {} like that? Thanks. Ruth -------- Ruth Ablett utaku_rutsuko@xxxxxxxxxxx http://www.geocities.com/tokyo/4390 "Microsoft's No. 1 product is Windows, which now comes automatically installed on every computer in the world and many kitchen appliances. Technically, Windows is an "operating system," which means that it supplies your computer with the basic commands that it needs to suddenly, with no warning whatsoever, stop operating. I speak from experience here. Many a time I have spent hours writing a serious and thoughtful column on an important issue, only to have Windows -- which is often referred to as "the French labor union of software" -- get into a snit and call a general computer strike that erases all my work moments before deadline, leaving me with no choice but to bang out a highly inaccurate column such as this one." - Dave Barry _________________________________________________________________ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=dept/features&pgmarket=en-ca&RU=http%3a%2f%2fjoin.msn.com%2f%3fpage%3dmisc%2fspecialoffers%26pgmarket%3den-ca XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|