Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 19th, 2006, 07:20 PM
Registered User
 
Join Date: Jan 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Delimited to select list?

Is it possible (and how) using XSLT to turn:

<A>1; 8; 9;</A>

Into this:

<A>
<select>
<option value="1">1</option>
<option value="8">8</option>
<option value="9">9</option>
</select>
</A>

Thanks in advance!
 
Old January 19th, 2006, 08:04 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

In XSLT 2.0, use the tokenize() function.

In XSLT 1.0, you can download a recursive template called str:tokenize from www.exlst.org, and either use it directly in your stylesheet, or use it as a teaching aid to see how the problem is tackled.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
SELECT list re-ordered stuart.pinfold Classic ASP Basics 0 January 24th, 2007 02:36 PM
Select Items in List from a String mwn1218 Access VBA 1 February 11th, 2005 11:21 AM
select a default value in a drop-down list crmpicco HTML Code Clinic 2 January 20th, 2005 08:23 AM
select query : * vs. Field list madhukp SQL Server 2000 16 September 10th, 2004 10:46 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.