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

Re: Creating a html <select> dropdown menu in XSL, whe

Subject: Re: Creating a html <select> dropdown menu in XSL, where the attribute of an XML element is the selected value when page loads
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 4 Jan 2010 15:42:59 GMT
Re:  Creating a html <select> dropdown menu in XSL
> So 37 seems to be some kind of limit. Is there an explanation for
> this?

you have 37 elements in the source. If you control the source you could
add more elements or you could use
(//node()|//@*|//namespace:*)
which will give you a nodeset of all eleemnts, text, comments,
attributes and namespace nodes, which might be enough.
Or you could use xslt2 in which case you could use
select="1 to 1000"
which is more intuitive.

> 3. And how do I make a menu for years? The "Day of birth" menu starts
> from 1 and goes up to 31, but the "Year of birth" menu shouldn't start
> from Year 1, but maybe from 1900 and go up to 2010.
assuming you can generate a list of 110 nodes, then position()+1899
will go from 1900.


> 4. I understand that "(//*)[position() &lt;= 10]" 
can't add anything to what Ken said.


> XPath syntax than the simple expressions used to navigate between
> different levels of nodes?

The xpath 1.0 spec is quite readable really (a lot shorter and more
readable than the xpath 2 spec which is not bad but more complicated by the
fact that xpath 2 is bigger and overburdened with xsd schema typing)
otherwise the xslt faq and the zvon site are too old but good free
sources.

David

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.