ISO/IEC JTC1/SC34/WG1 comments about RELAX NG schemas for XForms 1.1

Dear,

Please find those comments about Relax NG schemas for XForms 1.1 as a
liaison from SC 34 to W3C

Don't hesitate to ask us any further help on the technologies SC 34 is
promoting :
* DSDL family : http://dsdl.org/
** Relax NG
** Schematron
** NVDL
** DTLL
** DSRL
** CREPDL
* Document format
** OOXML
** ODF

Best wishes

Mohamed ZERGAOUI on behalf of JTC 1/SC 34/WG 1


* The main XForms schema is without namespace and second schema file
is used for "including" elements into proper XForms namespace

This is so called "chameleon" approach for schema design. It is useful
when it is expected to use the same set of elements in several
vocabularies each using distinct namespace. But there is no provision
for using different then XForms namespace in XForms 1.1
Recommendation.

We are aware that XHTML 2.0 draft used XForm in this way, but it seems
that W3C has discontinued XHTML 2.0 efforts. We therefore suggest to
provide only one schema which will explicitly define all elements in
the XForms namespace. If "chameleon" approach is necessary for reasons
we don't see this situation should be cleraly described in the schema
comments so users of schemas are not confused and know which schema
when to use.

* Definition of extension element (§3.4.1) is missing in the schema

The extension element is described in prose and it is present in W3C
XML Schema for XForms but it is not present in RELAX NG version of
schema.

* There is no start pattern defined

XForms are usually placed into a host language so provided schema is
just building block for composition of compound document schema. This
should be stressed in comments so users are not confused by fact that
provided schemas are not valid and working itself.

Moreover it would be better to add elements model, group, repeat,
switch, input, secret, textarea, output, upload, range, trigger,
submit, select and select1 as possible start elements to allow
invocation of the XForms RELAX NG schema from NVDL script.

* Individual schemas are not referencable by URI

RELAX NG schemas are available in a ZIP file for download. There is
no stable URI which can be used for referencing schemas. Please note
that having such persistent URIs for schema doesn't mean that
validators are going to fetch schemas from this location. Many tools
have integrated support for XML Catalogs which can redirect requests
to local copy of resource. Providing stable URI for resource like
schema is perfectly aligned with Architecture of the World Wide Web
(see http://www.w3.org/TR/webarch/)

* Syntax error in xforms-nons-11.rnc
The last line of definition of pattern xforms.ActionName should be

    | (xsd:NMTOKEN - (xsd:NMTOKEN { pattern = "^xforms-.*" }))
                                                    |

instead of

    | xsd:NMTOKEN - (xsd:NMTOKEN { pattern = "^xforms-.*" })

This bug was caused by Trang schema converter. WG1 will report this
problem upstream to Trang developers so tool is fixed for future use.

* Improper usage of ^ in regular expression

Patterns in RELAX NG are always matched against complete string so it
is incorrect to use ^ at the start of regular expression.

* Misuse of combine="interleave" (&= in compact syntax)

The use of &= is recommended only when you combine different
define statements in different schema modules. Moreover the XForms
schema does not need to use combine as there are no multiple
occurences of the same named pattern.

&= should be changed to = in compact syntax, and combine="interleave"
should be removed from XML version of the schema.

* group, repeat, case, label, help, hint, alert and message elements
allow foreign content but this is not reflected in the schema

Interleave content models of these elements with anyForeignElement or create
named pattern which can be overriden by user integrating XForms schema
into a host language.

The following is an example definition of anyForeignElement (it is
expecting that xf prefix is bound to the XForms namespace).

anyForeignElement = element * - xf:* { anyAttribute*, anyForeignElement* }
anyAttribute = attribute * { text }

* Change IDREF datatype to token
As there are no attributes with type ID defined in the schema there is
nothing to which IDREF can point. This wíll result in unresolved
references during validation.

-- 
Innovimax SARL
Consulting, Training & XML Development
9, impasse des Orteaux
75020 Paris
Tel : +33 9 52 475787
Fax : +33 1 4356 1746
http://www.innovimax.fr
RCS Paris 488.018.631
SARL au capital de 10.000 €

Received on Friday, 25 December 2009 22:58:33 UTC