<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<fieldset id="XSLTFormsB">
<legend>Selection</legend>
<ul> <li><input type="checkbox"/>Tea</li>
<li><input type="checkbox"/>Coffee</li>
<li><input type="checkbox"/>Chocolate</li>
<li id="XSLTFormsLastOptionRefB" onfocus="XSLTFormsFocusSelectionOpen(this);">
<input type="checkbox"/>New</li>
</ul> </fieldset>
<input type="text" display="none" onblur="XSLTFormsSelectBlur(this);" id="XSLTFormsInputRefB"/>
<-- A is the Key -->
[x]html implementation
onfocus event rising from the last item element of the select element:
(1) context of current selection is saved in case of multiple select
(2) an hadoc input element is created and receives focus
onblur event rising from the newly created input:
(1) if the newly created input has non empty value: a new item in the select element is inserted before the last item
(2) context of previous selection is restored in case of select multiple
(3) from my point of view: status of the new item regarding selected attribute(s)
before adding (when relevant) and what to focus now are open issues. for instance: is the newly item added to current
selection set (in case of multiple) or receives focus in case of single.
Select1
Minimal
Compact
Full
Drink
Select
Minimal
Compact
Full
Drink
Output
Coding
<!-- <ol> cannot be inserted in <code>, this looks like an unfriendly specification restriction -->
<!-- The Fox Mozarella Browser ignore class attribute of <code> element -->
<:!-- FF and Chrome debug report below -->
This is just a scaffolding Ubiquity like coded style Not FF compliant Not yet available in XSLTForms beta release uncaught exception: Node cannot be inserted at the
specified point in the hierarchy (NS_ERROR_DOM_HIERARCHY_REQUEST_ERR) (FF)
XML self-closing tag syntax used on <option>. The tag will not be closed.
(Chrome)