Xforms Schema

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

Xforms Schema

Richard Braman
Message
Hi all,
 
I am working on schemas now.  I have tried validating my instance with a schema .  I have read http://www.orbeon.com/ops/doc/processors-validation
but I am still a little confused on how to get it working.  I am using XMLSchema.  I need each instance to be validated against the schema for type, maxlength, and enumerations.
I have some custom types defined in my XSD which can be found here.
 
 
My XMLSchema is located here:
 
I put this is my page flow:
<page id="f1040ez" path-info="/1040ez" view="xforms/f1040ez.xsl" model="xforms/f1040EZ.xsd"/>
 
but I dont think that is right.
 
because the f1040 isn't the only xforms instance being validated when the user submits the form.
 
I also need the w2 instance to be validated albeit with a seperate schema.
 
both are external instances included in my main view.  These two instances should both be getting submitted.  I noticed that they may not be because in my efile functionailty(where I output the instance as text using XSLT) only the form 1040 is getting outputted.
 
 

Richard Braman
[hidden email]
561.748.4002 (voice)

http://www.taxcodesoftware.org
Free Open Source Tax Software

 


--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Xforms Schema

Alessandro  Vernet
Administrator
Hi Richard,

You can validate an XML document with a schema in a pipeline using the
validation processor. But if what you want to validate is an XForms
instance, there is a facility in XForms to validate a document with a
schema. For this, you need to add a "schema" attribute on
<xforms:model>. We are using this in the DMV Form example. There the
model looks like (see examples\forms\detail\detail-view.xhtml):

<xforms:model id="main-model"
schema="oxf:/examples/forms/detail/form-schema.xsd">

I hope this helps.

Alex

On 3/15/06, Richard Braman <[hidden email]> wrote:

>
> Hi all,
>
> I am working on schemas now.  I have tried validating my instance with a
> schema .  I have read
> http://www.orbeon.com/ops/doc/processors-validation
> but I am still a little confused on how to get it working.  I am using
> XMLSchema.  I need each instance to be validated against the schema for
> type, maxlength, and enumerations.
> I have some custom types defined in my XSD which can be found here.
>
>
> My XMLSchema is located here:
> http://cvs.sourceforge.net/viewcvs.py/taxcodesoftware/1040ez/WEB-INF/resources/examples/1040ez/xforms/f1040EZ.xsd?rev=1.4&view=markup
>
> I put this is my page flow:
> <page id="f1040ez" path-info="/1040ez" view="xforms/f1040ez.xsl"
> model="xforms/f1040EZ.xsd"/>
>
> but I dont think that is right.
>
> because the f1040 isn't the only xforms instance being validated when the
> user submits the form.
>
> I also need the w2 instance to be validated albeit with a seperate schema.
>
> both are external instances included in my main view.  These two instances
> should both be getting submitted.  I noticed that they may not be because in
> my efile functionailty(where I output the instance as text using XSLT) only
> the form 1040 is getting outputted.
>
>
>
>
> Richard Braman
> mailto:[hidden email]
> 561.748.4002 (voice)
>
> http://www.taxcodesoftware.org
> Free Open Source Tax Software
>
>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Xforms Schema

Alessandro  Vernet
Administrator
In reply to this post by Richard Braman
Hi Richard,

You can validate an XML document with a schema in a pipeline using the
validation processor. But if what you want to validate is an XForms
instance, there is a facility in XForms to validate a document with a
schema. For this, you need to add a "schema" attribute on
<xforms:model>. We are using this in the DMV Form example. There the
model looks like (see examples\forms\detail\detail-view.xhtml):

<xforms:model id="main-model"
schema="oxf:/examples/forms/detail/form-schema.xsd">

I hope this helps.

Alex

On 3/15/06, Richard Braman <[hidden email]> wrote:

>
> Hi all,
>
> I am working on schemas now.  I have tried validating my instance with a
> schema .  I have read
> http://www.orbeon.com/ops/doc/processors-validation
> but I am still a little confused on how to get it working.  I am using
> XMLSchema.  I need each instance to be validated against the schema for
> type, maxlength, and enumerations.
> I have some custom types defined in my XSD which can be found here.
>
>
> My XMLSchema is located here:
> http://cvs.sourceforge.net/viewcvs.py/taxcodesoftware/1040ez/WEB-INF/resources/examples/1040ez/xforms/f1040EZ.xsd?rev=1.4&view=markup
>
> I put this is my page flow:
> <page id="f1040ez" path-info="/1040ez" view="xforms/f1040ez.xsl"
> model="xforms/f1040EZ.xsd"/>
>
> but I dont think that is right.
>
> because the f1040 isn't the only xforms instance being validated when the
> user submits the form.
>
> I also need the w2 instance to be validated albeit with a seperate schema.
>
> both are external instances included in my main view.  These two instances
> should both be getting submitted.  I noticed that they may not be because in
> my efile functionailty(where I output the instance as text using XSLT) only
> the form 1040 is getting outputted.
>
>
>
>
> Richard Braman
> mailto:[hidden email]
> 561.748.4002 (voice)
>
> http://www.taxcodesoftware.org
> Free Open Source Tax Software
>
>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

RE: Xforms Schema

Richard Braman
Yes Alex thanks that worked .  Problem is now that I have an error:

datatype called Numeric in my XSD.

Numeric is defined as

<xs:simpleType name="Numeric">
                <xs:restriction base="xs:string">
                        <xs:pattern value="([0,9])"/>
                </xs:restriction>
        </xs:simpleType>

The problem is happening on this element

        <xs:element name="ByteCount">
                                        <xs:annotation>
                                                <xs:documentation>
       
<Name>ByteCount</Name>
                                                        <LineNumber/>
       
<Description>"1017" for Fixed; "nnnn" for variable format</Description>
                                                </xs:documentation>
                                        </xs:annotation>
                                        <xs:simpleType>
                                                <xs:restriction
base="Numeric">
                                                        <xs:length
value="4"/>
                                                        <xs:enumeration
value="1017"/>
                                                </xs:restriction>
                                        </xs:simpleType>
                                </xs:element>

Which is the first element in my XSD which can be found here:
http://cvs.sourceforge.net/viewcvs.py/taxcodesoftware/1040ez/WEB-INF/res
ources/examples/1040ez/xforms/f1040EZ.xsd?view=markup

The instance looks likt this:
<form>
                        <f1040ez>
                                <ByteCount>1017</ByteCount>

Error Message
the specified value "1017" is not a/an Numeric

OPS Call Stack
The OPS Call Stack helps you determine what sequence of OPS operations
have caused the error.

Resource URL Line Column Description XML Element
oxf:/examples/1040ez/xforms/f1040EZ.xsd 15 38  
oxf:/ops/pfc/xforms-epilogue.xpl 81 67  
oxf:/ops/pfc/xforms-epilogue.xpl 101 71 reading processor output
(name='document', ref='xformed-data')   <p:output name="document"
ref="xformed-data"/>


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of
Alessandro Vernet
Sent: Monday, March 20, 2006 4:05 PM
To: [hidden email]
Subject: Re: [ops-users] Xforms Schema


Hi Richard,

You can validate an XML document with a schema in a pipeline using the
validation processor. But if what you want to validate is an XForms
instance, there is a facility in XForms to validate a document with a
schema. For this, you need to add a "schema" attribute on
<xforms:model>. We are using this in the DMV Form example. There the
model looks like (see examples\forms\detail\detail-view.xhtml):

<xforms:model id="main-model"
schema="oxf:/examples/forms/detail/form-schema.xsd">

I hope this helps.

Alex

On 3/15/06, Richard Braman <[hidden email]> wrote:
>
> Hi all,
>
> I am working on schemas now.  I have tried validating my instance with

> a schema .  I have read
> http://www.orbeon.com/ops/doc/processors-validation
> but I am still a little confused on how to get it working.  I am using

> XMLSchema.  I need each instance to be validated against the schema
> for type, maxlength, and enumerations. I have some custom types
> defined in my XSD which can be found here.
>
>
> My XMLSchema is located here:
> http://cvs.sourceforge.net/viewcvs.py/taxcodesoftware/1040ez/WEB-INF/r
> esources/examples/1040ez/xforms/f1040EZ.xsd?rev=1.4&view=markup
>
> I put this is my page flow:
> <page id="f1040ez" path-info="/1040ez" view="xforms/f1040ez.xsl"
> model="xforms/f1040EZ.xsd"/>
>
> but I dont think that is right.
>
> because the f1040 isn't the only xforms instance being validated when
> the user submits the form.
>
> I also need the w2 instance to be validated albeit with a seperate
> schema.
>
> both are external instances included in my main view.  These two
> instances should both be getting submitted.  I noticed that they may
> not be because in my efile functionailty(where I output the instance
> as text using XSLT) only the form 1040 is getting outputted.
>
>
>
>
> Richard Braman
> mailto:[hidden email]
> 561.748.4002 (voice)
>
> http://www.taxcodesoftware.org
> Free Open Source Tax Software
>
>
> --
> 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
> ObjectWeb mailing lists service home page:
> http://www.objectweb.org/wws
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/





--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Xforms Schema

Daniel E. Renfer
You have 'Numeric' set as only a single digit. You want:

<xs:pattern value="\d+"/> for one or more
or
<xs:pattern value="\d*"/> for zero or more.

Hope this helps
Daniel E. Renfer (http://kronkltd.net/)

On 3/21/06, Richard Braman <[hidden email]> wrote:

> Yes Alex thanks that worked .  Problem is now that I have an error:
>
> datatype called Numeric in my XSD.
>
> Numeric is defined as
>
> <xs:simpleType name="Numeric">
>                 <xs:restriction base="xs:string">
>                         <xs:pattern value="([0,9])"/>
>                 </xs:restriction>
>         </xs:simpleType>
>
> The problem is happening on this element
>
>         <xs:element name="ByteCount">
>                                         <xs:annotation>
>                                                 <xs:documentation>
>
> <Name>ByteCount</Name>
>                                                         <LineNumber/>
>
> <Description>"1017" for Fixed; "nnnn" for variable format</Description>
>                                                 </xs:documentation>
>                                         </xs:annotation>
>                                         <xs:simpleType>
>                                                 <xs:restriction
> base="Numeric">
>                                                         <xs:length
> value="4"/>
>                                                         <xs:enumeration
> value="1017"/>
>                                                 </xs:restriction>
>                                         </xs:simpleType>
>                                 </xs:element>
>
> Which is the first element in my XSD which can be found here:
> http://cvs.sourceforge.net/viewcvs.py/taxcodesoftware/1040ez/WEB-INF/res
> ources/examples/1040ez/xforms/f1040EZ.xsd?view=markup
>
> The instance looks likt this:
> <form>
>                         <f1040ez>
>                                 <ByteCount>1017</ByteCount>
>
> Error Message
> the specified value "1017" is not a/an Numeric
>
> OPS Call Stack
> The OPS Call Stack helps you determine what sequence of OPS operations
> have caused the error.
>
> Resource URL Line Column Description XML Element
> oxf:/examples/1040ez/xforms/f1040EZ.xsd 15 38
> oxf:/ops/pfc/xforms-epilogue.xpl 81 67
> oxf:/ops/pfc/xforms-epilogue.xpl 101 71 reading processor output
> (name='document', ref='xformed-data')   <p:output name="document"
> ref="xformed-data"/>
>
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of
> Alessandro Vernet
> Sent: Monday, March 20, 2006 4:05 PM
> To: [hidden email]
> Subject: Re: [ops-users] Xforms Schema
>
>
> Hi Richard,
>
> You can validate an XML document with a schema in a pipeline using the
> validation processor. But if what you want to validate is an XForms
> instance, there is a facility in XForms to validate a document with a
> schema. For this, you need to add a "schema" attribute on
> <xforms:model>. We are using this in the DMV Form example. There the
> model looks like (see examples\forms\detail\detail-view.xhtml):
>
> <xforms:model id="main-model"
> schema="oxf:/examples/forms/detail/form-schema.xsd">
>
> I hope this helps.
>
> Alex
>
> On 3/15/06, Richard Braman <[hidden email]> wrote:
> >
> > Hi all,
> >
> > I am working on schemas now.  I have tried validating my instance with
>
> > a schema .  I have read
> > http://www.orbeon.com/ops/doc/processors-validation
> > but I am still a little confused on how to get it working.  I am using
>
> > XMLSchema.  I need each instance to be validated against the schema
> > for type, maxlength, and enumerations. I have some custom types
> > defined in my XSD which can be found here.
> >
> >
> > My XMLSchema is located here:
> > http://cvs.sourceforge.net/viewcvs.py/taxcodesoftware/1040ez/WEB-INF/r
> > esources/examples/1040ez/xforms/f1040EZ.xsd?rev=1.4&view=markup
> >
> > I put this is my page flow:
> > <page id="f1040ez" path-info="/1040ez" view="xforms/f1040ez.xsl"
> > model="xforms/f1040EZ.xsd"/>
> >
> > but I dont think that is right.
> >
> > because the f1040 isn't the only xforms instance being validated when
> > the user submits the form.
> >
> > I also need the w2 instance to be validated albeit with a seperate
> > schema.
> >
> > both are external instances included in my main view.  These two
> > instances should both be getting submitted.  I noticed that they may
> > not be because in my efile functionailty(where I output the instance
> > as text using XSLT) only the form 1040 is getting outputted.
> >
> >
> >
> >
> > Richard Braman
> > mailto:[hidden email]
> > 561.748.4002 (voice)
> >
> > http://www.taxcodesoftware.org
> > Free Open Source Tax Software
> >
> >
> > --
> > 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
> > ObjectWeb mailing lists service home page:
> > http://www.objectweb.org/wws
> >
> >
> >
>
>
> --
> Blog (XML, Web apps, Open Source):
> http://www.orbeon.com/blog/
>
>
>
>
>
>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>


--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws