W3C home > Mailing lists > Public > public-forms-testsuite@w3.org > August 2013

Re: Bug in embedded schema in test 2.3.a

From: Eric van der Vlist <vdv@dyomedea.com>
Date: Thu, 08 Aug 2013 16:02:23 -0400
Message-ID: <1375992143.3310.107.camel@ldlc>
To: public-forms-testsuite@w3.org

Some more details...

Short version: the schema element in this test case is missing an
elementFormDefault="qualified" attribute.


The schema is defined as:

<xsd:schema targetNamespace="http://commerce.example.com/payment">
    <xsd:simpleType name="ccnumber">
        <xsd:restriction base="xsd:string">
            <xsd:pattern value="\d{14,18}" />
    <xsd:element name="payment">
                <xsd:element name="number" type="my:ccnumber"
minOccurs="0" />
                <xsd:element name="expiry" type="xsd:gYearMonth"
minOccurs="0" />
            <xsd:attribute name="method" type="xsd:string" />

In the absence of an elementFormDefault attribute, its default value
"unqualified", is applied (see
http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#declare-schema ).

As a consequence, "inner" elements are assumed to be in no namespace and
instance documents should be of the form:

<my:payment xmlns:my="http://commerce.example.com/payment">

rather than (as expected):

<payment xmlns="http://commerce.example.com/payment">

which is invalid.

The fix is to add the missing attribute:

<xsd:schema targetNamespace="http://commerce.example.com/payment"

Hope this helps,

Received on Thursday, 8 August 2013 20:02:54 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:38:40 UTC