BizTalk Utilities CV ,   Jobs ,   Code library
 
Home Page


Add/Edit your code items
Search the code library
Browse for the code library


XSLT
Re: For Next Loop in XSLT
For Next Loop in XSLT
Intersection and other set operations on node-sets
Grouping using xsl:key and the key() function -- the Muenchian method
Comparing Strings in XSLT for greater/less
How to do a search and replace in XSLT
How to work with more than one xml document in your XSLT transformation
Sorting (advanced) of dynamically constructed strings
Sorting on Dates and other Fixed Formats using the substring Function
In case you need a ""break"" from an xsl:for-each loop
Format XML/XSL for Documentation
Find all xsl:variables that are in scope?
Binary Search in XSLT
Get the newest 5 articles out of hundreds -- a super efficient sort in XSLT
getTemplate
getProcessor
Dynamically change the encoding of your XSLT stylesheet
Identifying an attribute or a namespace node
Build a XPath expression for a node
Avoiding an XSLT Processor crash due to deep recursive processing


 
 

<< XQuery.NET and XML >>


By Mark Wilson
I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First Posted 12/03/2007
Times viewed 2019

Creating a select box and selecting one or more items


Summary This snippet describes how to build an HTML select box with select items in XSLT.

A common question: I want to create a listbox in an HTML page and I need to make one or more entries pre-selected. In HTML I would need to add a SELECTED word to the tag, but the XML parser will not accept in my code.

The trick is to give an arbitrary value to the SELECTED attribute. I may even be . Note that even adding SELECTED=false will select the entry.

Additional information

Further additional information


Rate this article on a scale of 1 to 10 (2 votes, average 5)

Your vote :  

<< XQuery.NET and XML >>





Leave a comment for this article
Your name
Your email (optional)
Your comment
Optional: Upload an attachment
Enter the code shown:

 
 

    Email TopXML