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

RE: Literals in XSLT

Subject: RE: Literals in XSLT
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Sun, 8 Feb 2004 16:05:31 -0000
xslt literals
If you want to construct XPath expressions on the fly as strings, you
will need the xx:evaluate() extension which several products (Saxon,
Xalan, ...) offer.

Michael Kay

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Ruth Ablett
> Sent: 08 February 2004 07:53
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  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%26pgmar
> ket%3den-ca
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


 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.