error message (white spaces) with inline schema in XForm

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

error message (white spaces) with inline schema in XForm

ilango_g
Hi
I am testing an XForm that has an SSN field. I have tried to use an inline schema to validate the SSN fields. The error I am getting is below:

Message: White spaces are required between publicId and systemId.
Resource URL:   http://www.orbeon.com/ops/xforms-sandbox/run#inline_schema

I have used something like this:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" id="inline_schema">
                        <xs:element name="root">
                                <xs:complexType>
                                        <xs:sequence>
                                                <xs:element name="ssn" type="Type_SSN" />
                                                <xs:element name="ssn_area_number" type="Type_SSN_Area_Number" />
                                                <xs:element name="ssn_group_number" type="Type_SSN_Group_Number" />
                                                <xs:element name="ssn_serial_number" type="Type_SSN_Serial_Number" />
                                        </xs:sequence>
                                </xs:complexType>
                        </xs:element>
                       
                        <xs:simpleType name="Type_SSN">
                                <xs:restriction base="xs:string">
                                        <xs:pattern value="[0-9]{3}-[0-9]{2}-[0-9]{4}" />
                                </xs:restriction>
                        </xs:simpleType>
                       
                        <xs:simpleType name="Type_SSN_Area_Number">
                                <xs:restriction base="xs:integer">
                                        <xs:pattern value="[0-9]{3}" />
                                        <xs:maxInclusive value="772" />
                                        <xs:minInclusive value="0" />
                                </xs:restriction>
                        </xs:simpleType>
                       
                        <xs:simpleType name="Type_SSN_Group_Number">
                                <xs:restriction base="xs:integer">
                                        <xs:pattern value="[0-9]{2}" />
                                        <xs:maxInclusive value="99" />
                                        <xs:minInclusive value="0" />
                                </xs:restriction>
                        </xs:simpleType>
                       
                        <xs:simpleType name="Type_SSN_Serial_Number">
                                <xs:restriction base="xs:integer">
                                        <xs:pattern value="[0-9]{4}" />
                                        <xs:maxInclusive value="9999" />
                                        <xs:minInclusive value="0" />
                                </xs:restriction>
                        </xs:simpleType>
                </xs:schema>

What can be wrong with my schema if it is the schema?

thanks
ilango
Reply | Threaded
Open this post in threaded view
|

Re: error message (white spaces) with inline schema in XForm

ilango_g
Hi
I found an answer to my own question: I find that I cannot use an inline schema.Instead I need to use an schema attribute with an oxf: thing

I hope that solves my problem.

ilango
ilango_g wrote
Hi
I am testing an XForm that has an SSN field. I have tried to use an inline schema to validate the SSN fields. The error I am getting is below:

Message: White spaces are required between publicId and systemId.
Resource URL:   http://www.orbeon.com/ops/xforms-sandbox/run#inline_schema

I have used something like this:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" id="inline_schema">
                        <xs:element name="root">
                                <xs:complexType>
                                        <xs:sequence>
                                                <xs:element name="ssn" type="Type_SSN" />
                                                <xs:element name="ssn_area_number" type="Type_SSN_Area_Number" />
                                                <xs:element name="ssn_group_number" type="Type_SSN_Group_Number" />
                                                <xs:element name="ssn_serial_number" type="Type_SSN_Serial_Number" />
                                        </xs:sequence>
                                </xs:complexType>
                        </xs:element>
                       
                        <xs:simpleType name="Type_SSN">
                                <xs:restriction base="xs:string">
                                        <xs:pattern value="[0-9]{3}-[0-9]{2}-[0-9]{4}" />
                                </xs:restriction>
                        </xs:simpleType>
                       
                        <xs:simpleType name="Type_SSN_Area_Number">
                                <xs:restriction base="xs:integer">
                                        <xs:pattern value="[0-9]{3}" />
                                        <xs:maxInclusive value="772" />
                                        <xs:minInclusive value="0" />
                                </xs:restriction>
                        </xs:simpleType>
                       
                        <xs:simpleType name="Type_SSN_Group_Number">
                                <xs:restriction base="xs:integer">
                                        <xs:pattern value="[0-9]{2}" />
                                        <xs:maxInclusive value="99" />
                                        <xs:minInclusive value="0" />
                                </xs:restriction>
                        </xs:simpleType>
                       
                        <xs:simpleType name="Type_SSN_Serial_Number">
                                <xs:restriction base="xs:integer">
                                        <xs:pattern value="[0-9]{4}" />
                                        <xs:maxInclusive value="9999" />
                                        <xs:minInclusive value="0" />
                                </xs:restriction>
                        </xs:simpleType>
                </xs:schema>

What can be wrong with my schema if it is the schema?

thanks
ilango
Reply | Threaded
Open this post in threaded view
|

Re: Re: error message (white spaces) with inline schema in XForm

Erik Bruchez
Administrator
Ilango,

Inline schemas are supported since a few weeks ago.

-Erik

On May 16, 2008, at 8:21 AM, ilango_g wrote:

>
> Hi
> I found an answer to my own question: I find that I cannot use an  
> inline
> schema.Instead I need to use an schema attribute with an oxf: thing
>
> I hope that solves my problem.
>
> ilango
>
> ilango_g wrote:
>>
>> Hi
>> I am testing an XForm that has an SSN field. I have tried to use an  
>> inline
>> schema to validate the SSN fields. The error I am getting is below:
>>
>> Message: White spaces are required between publicId and systemId.
>> Resource URL:   http://www.orbeon.com/ops/xforms-sandbox/run#inline_schema
>>
>> I have used something like this:
>>
>> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"  
>> id="inline_schema">
>> <xs:element name="root">
>> <xs:complexType>
>> <xs:sequence>
>> <xs:element name="ssn" type="Type_SSN" />
>> <xs:element name="ssn_area_number"  
>> type="Type_SSN_Area_Number" />
>> <xs:element name="ssn_group_number"  
>> type="Type_SSN_Group_Number" />
>> <xs:element name="ssn_serial_number"  
>> type="Type_SSN_Serial_Number"
>> />
>> </xs:sequence>
>> </xs:complexType>
>> </xs:element>
>>
>> <xs:simpleType name="Type_SSN">
>> <xs:restriction base="xs:string">
>> <xs:pattern value="[0-9]{3}-[0-9]{2}-[0-9]{4}" />
>> </xs:restriction>
>> </xs:simpleType>
>>
>> <xs:simpleType name="Type_SSN_Area_Number">
>> <xs:restriction base="xs:integer">
>> <xs:pattern value="[0-9]{3}" />
>> <xs:maxInclusive value="772" />
>> <xs:minInclusive value="0" />
>> </xs:restriction>
>> </xs:simpleType>
>>
>> <xs:simpleType name="Type_SSN_Group_Number">
>> <xs:restriction base="xs:integer">
>> <xs:pattern value="[0-9]{2}" />
>> <xs:maxInclusive value="99" />
>> <xs:minInclusive value="0" />
>> </xs:restriction>
>> </xs:simpleType>
>>
>> <xs:simpleType name="Type_SSN_Serial_Number">
>> <xs:restriction base="xs:integer">
>> <xs:pattern value="[0-9]{4}" />
>> <xs:maxInclusive value="9999" />
>> <xs:minInclusive value="0" />
>> </xs:restriction>
>> </xs:simpleType>
>> </xs:schema>
>>
>> What can be wrong with my schema if it is the schema?
>>
>> thanks
>> ilango
>>
>
> --
> View this message in context: http://www.nabble.com/error-message-%28white-spaces%29-with-inline-schema-in-XForm-tp17275964p17277315.html
> Sent from the ObjectWeb OPS - Users mailing list archive at  
> Nabble.com.
>
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws