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

Re: Generic Dropdown template

Subject: Re: Generic Dropdown template
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 24 Mar 2003 16:30:10 GMT
xsl selected

	<xsl:for-each select="$xpath">		


In common with most other programming languages, XSLT/XPath does not
allow expressions as first class objects, or as values of variables.

So despite its name, $xpath, can not be holding an XPath.
Your code would work if it is holding a node set, many APIs to XSLT
processors allow params to be initialised with node sets by using a DOM
interface to Xpath for example. Most command line interfaces do not
allow this. If you parameter holds a string then this will not work,
you can not for-each over a string.

As you haven't shown teh value of $xpath it's hard to be more specific.


Unrelated but
<option>				
				<xsl:attribute name="value">					
					<xsl:value-of select="ID"/>				
				</xsl:attribute>	

is a very long winded way of expressing this, you could use

<input value="{ID}">


And as repeatedly stated on this list
	<xsl:attribute name="selected">
							true
					</xsl:attribute>	
is incorrect, <option selected> is the short form of
<option selected="selected">
not
<option selected="true">

If you use
<option selected="selected">
it will be output as
<option selected> 
in the html output method and be valid HTML, whereas selected="true" is
an html syntax error, although some browsers may silently correct the
error.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

 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.