W3C home > Mailing lists > Public > www-forms@w3.org > September 2005

Populating select1 from a schema

From: Patricio Olivares <patolivares@gmail.com>
Date: Mon, 26 Sep 2005 15:04:25 -0400
Message-ID: <1bbf1ffd0509261204762ed2e8@mail.gmail.com>
To: www-forms@w3.org

Hi everybody,
since as far as I know the xforms engine I'm using (x-smiles) can't
infer the listing of posible values from the validating schema of the
instance (in a select1 widget), I'm trying to recover the values
directly from the xsd.

The problem I'm having with this approach is how to reference to the
values (in itemset, via xpath). This is because the natural prefix to
use is "xsd:" but that approach doesn't scale very well because I've
no control over the file "enum.xsd" and If I need to refer two enums
(enum1.xsd and enum2.xsd) from two select1 widgets, maybe the two
schemas are using the same prefix, so I can't distinguish between

Does anyone have any thoughts about this?. Is there a better approach possible?

The following are code extracts that I'm using to test the issue.
Thanks in advance.


<?xml version="1.0" encoding="UTF-8" ?>

    <xsd:simpleType name="globalEnumType">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="VAL1" />
            <xsd:enumeration value="VAL2" />
            <xsd:enumeration value="VAL3" />

xforms :: head
<xf:model id="idenum">
        xmlns:xsd="http://www.target/namespaces/enum" />

xforms :: body
<xf:select1 model="default" ref="/path/to/target/element">
    <xf:itemset model="idenum"
        <xf:label ref="@value" />
        <xf:value ref="@value" />

Patricio Olivares
Received on Tuesday, 27 September 2005 03:31:05 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:15 UTC