Instance data validation via XML Schema

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

Instance data validation via XML Schema

pfennell
Hello,

Having searched around I couldn't find any existing information regarding XML Schema validation of instance data in XForms served by Orbeon.

I have a problem where adding a reference to an XML Schema to my xf:model thus:

<xf:model schema="http://...">
...
</xf:model>

I get an error response from Orbeon (see attached). I know that the Schema is accessible so it's not an issue of it cannot retrieve it.

Also I've noticed that in Tomcat's stdout log there are messages regarding it trying to find Xerces (see below).

I'm running Tomcat 6.0.24 with Java 1.6.0_16 on Windows XP SP3.

Is anyone out there using XML Schema validation and getting it to work?



Starting Orbeon Forms Release dev-3.7.1.200905272119 Initializing Resource Manager with:
{oxf.resources.priority.1.oxf.resources.webapp.rootdir=/WEB-INF/resources,
oxf.resources.priority.1=org.orbeon.oxf.resources.WebAppResourceManagerFactory,

oxf.resources.priority.2=org.orbeon.oxf.resources.ClassLoaderResourceManagerFactory,

oxf.resources.factory=org.orbeon.oxf.resources.PriorityResourceManagerFactory,

org.orbeon.oxf.resources.WebAppResourceManagerImplServletContext=org.apache.catalina.core.ApplicationContextFacade@aa567c}

Looking for a valid Parser...
Checking for Xerces, found version Xerces-J 2.9.0 needed version Xerces-J
2.9.1
Warning: Failed find a valid Parser!

Please add an appropriate Parser to the class-path, e.g. in the 'endorsed'
folder of the servlet container or in the 'endorsed' folder of the JRE.

Looking for a valid Transformer...
Checking for Saxon, found version 8.8 needed version 8.9.0 Checking for Xalan, found version Xalan Java 2.5.1 needed version Xalan Java 2.7.1
Warning: Failed find a valid Transformer!

Please add an appropriate Transformer to the class-path, e.g. in the 'endorsed' folder of the servlet container or in the 'endorsed' folder of the JRE.

Using parser org.orbeon.oxf.xml.xerces.XercesSAXParser
Using transformer orbeon.apache.xalan.transformer.TransformerIdentityImpl



Regards

Philip Fennell
Consultant

Mark Logic Corporation
www.marklogic.com

E-mail: [hidden email]
Mobile: +44 (0)7824 830 866





--
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

OrbeonForms-AnErrorhasOccurred.htm (246K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Instance data validation via XML Schema

Alessandro  Vernet
Administrator
Philip,

Schema validation should work out of the box. Could you attach a
simple example that shows the problem you're having, so we can
reproduce it here?

Alex

On Thu, Mar 4, 2010 at 8:33 AM, Philip Fennell
<[hidden email]> wrote:

> Hello,
>
> Having searched around I couldn't find any existing information regarding XML Schema validation of instance data in XForms served by Orbeon.
>
> I have a problem where adding a reference to an XML Schema to my xf:model thus:
>
> <xf:model schema="http://...">
> ...
> </xf:model>
>
> I get an error response from Orbeon (see attached). I know that the Schema is accessible so it's not an issue of it cannot retrieve it.
>
> Also I've noticed that in Tomcat's stdout log there are messages regarding it trying to find Xerces (see below).
>
> I'm running Tomcat 6.0.24 with Java 1.6.0_16 on Windows XP SP3.
>
> Is anyone out there using XML Schema validation and getting it to work?
>
>
>
> Starting Orbeon Forms Release dev-3.7.1.200905272119 Initializing Resource Manager with:
> {oxf.resources.priority.1.oxf.resources.webapp.rootdir=/WEB-INF/resources,
> oxf.resources.priority.1=org.orbeon.oxf.resources.WebAppResourceManagerFactory,
>
> oxf.resources.priority.2=org.orbeon.oxf.resources.ClassLoaderResourceManagerFactory,
>
> oxf.resources.factory=org.orbeon.oxf.resources.PriorityResourceManagerFactory,
>
> org.orbeon.oxf.resources.WebAppResourceManagerImplServletContext=org.apache.catalina.core.ApplicationContextFacade@aa567c}
>
> Looking for a valid Parser...
> Checking for Xerces, found version Xerces-J 2.9.0 needed version Xerces-J
> 2.9.1
> Warning: Failed find a valid Parser!
>
> Please add an appropriate Parser to the class-path, e.g. in the 'endorsed'
> folder of the servlet container or in the 'endorsed' folder of the JRE.
>
> Looking for a valid Transformer...
> Checking for Saxon, found version 8.8 needed version 8.9.0 Checking for Xalan, found version Xalan Java 2.5.1 needed version Xalan Java 2.7.1
> Warning: Failed find a valid Transformer!
>
> Please add an appropriate Transformer to the class-path, e.g. in the 'endorsed' folder of the servlet container or in the 'endorsed' folder of the JRE.
>
> Using parser org.orbeon.oxf.xml.xerces.XercesSAXParser
> Using transformer orbeon.apache.xalan.transformer.TransformerIdentityImpl
>
>
>
> Regards
>
> Philip Fennell
> Consultant
>
> Mark Logic Corporation
> www.marklogic.com
>
> E-mail: [hidden email]
> Mobile: +44 (0)7824 830 866
>
>
>
>
>
> --
> 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, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

RE: Re: Instance data validation via XML Schema

pfennell
Alessandro,

After realising that my original problem was down to authentication when attempting to retrieve the schema (I'm a Muppet!), I now have a different problem.

I can load the instance data and the schema and I can see the validation of user input being done by the schema. However, when I attempt to submit the instance data to update the content on the server I get a validation error. However, I've checked the content and it always validates against the schema. Moreover, the validation error is generated regardless of whether I make changes or not.

I've attached a self-contained example except for a valid URI to submit the update to.


Regards

Philip Fennell



-----Original Message-----
From: Alessandro Vernet [mailto:[hidden email]]
Sent: 04 March 2010 22:49
To: [hidden email]
Subject: [ops-users] Re: Instance data validation via XML Schema

Philip,

Schema validation should work out of the box. Could you attach a simple example that shows the problem you're having, so we can reproduce it here?

Alex

On Thu, Mar 4, 2010 at 8:33 AM, Philip Fennell <[hidden email]> wrote:

> Hello,
>
> Having searched around I couldn't find any existing information regarding XML Schema validation of instance data in XForms served by Orbeon.
>
> I have a problem where adding a reference to an XML Schema to my xf:model thus:
>
> <xf:model schema="http://...">
> ...
> </xf:model>
>
> I get an error response from Orbeon (see attached). I know that the Schema is accessible so it's not an issue of it cannot retrieve it.
>
> Also I've noticed that in Tomcat's stdout log there are messages regarding it trying to find Xerces (see below).
>
> I'm running Tomcat 6.0.24 with Java 1.6.0_16 on Windows XP SP3.
>
> Is anyone out there using XML Schema validation and getting it to work?
>
>
>
> Starting Orbeon Forms Release dev-3.7.1.200905272119 Initializing Resource Manager with:
> {oxf.resources.priority.1.oxf.resources.webapp.rootdir=/WEB-INF/resour
> ces,
> oxf.resources.priority.1=org.orbeon.oxf.resources.WebAppResourceManage
> rFactory,
>
> oxf.resources.priority.2=org.orbeon.oxf.resources.ClassLoaderResourceM
> anagerFactory,
>
> oxf.resources.factory=org.orbeon.oxf.resources.PriorityResourceManager
> Factory,
>
> org.orbeon.oxf.resources.WebAppResourceManagerImplServletContext=org.a
> pache.catalina.core.ApplicationContextFacade@aa567c}
>
> Looking for a valid Parser...
> Checking for Xerces, found version Xerces-J 2.9.0 needed version
> Xerces-J
> 2.9.1
> Warning: Failed find a valid Parser!
>
> Please add an appropriate Parser to the class-path, e.g. in the 'endorsed'
> folder of the servlet container or in the 'endorsed' folder of the JRE.
>
> Looking for a valid Transformer...
> Checking for Saxon, found version 8.8 needed version 8.9.0 Checking
> for Xalan, found version Xalan Java 2.5.1 needed version Xalan Java
> 2.7.1
> Warning: Failed find a valid Transformer!
>
> Please add an appropriate Transformer to the class-path, e.g. in the 'endorsed' folder of the servlet container or in the 'endorsed' folder of the JRE.
>
> Using parser org.orbeon.oxf.xml.xerces.XercesSAXParser
> Using transformer
> orbeon.apache.xalan.transformer.TransformerIdentityImpl
>
>
>
> Regards
>
> Philip Fennell
> Consultant
>
> Mark Logic Corporation
> www.marklogic.com
>
> E-mail: [hidden email]
> Mobile: +44 (0)7824 830 866
>
>
>
>
>
> --
> 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, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet


--
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
Reply | Threaded
Open this post in threaded view
|

Re: RE: Re: Instance data validation via XML Schema

Alessandro  Vernet
Administrator
Phil,

I think the attachment is missing (or was stripped) from your message.
Could you try to resend it (or put it on http://gist.github.com/)?

Alex

On Fri, Mar 5, 2010 at 9:05 AM, Philip Fennell
<[hidden email]> wrote:

> Alessandro,
>
> After realising that my original problem was down to authentication when attempting to retrieve the schema (I'm a Muppet!), I now have a different problem.
>
> I can load the instance data and the schema and I can see the validation of user input being done by the schema. However, when I attempt to submit the instance data to update the content on the server I get a validation error. However, I've checked the content and it always validates against the schema. Moreover, the validation error is generated regardless of whether I make changes or not.
>
> I've attached a self-contained example except for a valid URI to submit the update to.
>
>
> Regards
>
> Philip Fennell
>
>
>
> -----Original Message-----
> From: Alessandro Vernet [mailto:[hidden email]]
> Sent: 04 March 2010 22:49
> To: [hidden email]
> Subject: [ops-users] Re: Instance data validation via XML Schema
>
> Philip,
>
> Schema validation should work out of the box. Could you attach a simple example that shows the problem you're having, so we can reproduce it here?
>
> Alex
>
> On Thu, Mar 4, 2010 at 8:33 AM, Philip Fennell <[hidden email]> wrote:
>> Hello,
>>
>> Having searched around I couldn't find any existing information regarding XML Schema validation of instance data in XForms served by Orbeon.
>>
>> I have a problem where adding a reference to an XML Schema to my xf:model thus:
>>
>> <xf:model schema="http://...">
>> ...
>> </xf:model>
>>
>> I get an error response from Orbeon (see attached). I know that the Schema is accessible so it's not an issue of it cannot retrieve it.
>>
>> Also I've noticed that in Tomcat's stdout log there are messages regarding it trying to find Xerces (see below).
>>
>> I'm running Tomcat 6.0.24 with Java 1.6.0_16 on Windows XP SP3.
>>
>> Is anyone out there using XML Schema validation and getting it to work?
>>
>>
>>
>> Starting Orbeon Forms Release dev-3.7.1.200905272119 Initializing Resource Manager with:
>> {oxf.resources.priority.1.oxf.resources.webapp.rootdir=/WEB-INF/resour
>> ces,
>> oxf.resources.priority.1=org.orbeon.oxf.resources.WebAppResourceManage
>> rFactory,
>>
>> oxf.resources.priority.2=org.orbeon.oxf.resources.ClassLoaderResourceM
>> anagerFactory,
>>
>> oxf.resources.factory=org.orbeon.oxf.resources.PriorityResourceManager
>> Factory,
>>
>> org.orbeon.oxf.resources.WebAppResourceManagerImplServletContext=org.a
>> pache.catalina.core.ApplicationContextFacade@aa567c}
>>
>> Looking for a valid Parser...
>> Checking for Xerces, found version Xerces-J 2.9.0 needed version
>> Xerces-J
>> 2.9.1
>> Warning: Failed find a valid Parser!
>>
>> Please add an appropriate Parser to the class-path, e.g. in the 'endorsed'
>> folder of the servlet container or in the 'endorsed' folder of the JRE.
>>
>> Looking for a valid Transformer...
>> Checking for Saxon, found version 8.8 needed version 8.9.0 Checking
>> for Xalan, found version Xalan Java 2.5.1 needed version Xalan Java
>> 2.7.1
>> Warning: Failed find a valid Transformer!
>>
>> Please add an appropriate Transformer to the class-path, e.g. in the 'endorsed' folder of the servlet container or in the 'endorsed' folder of the JRE.
>>
>> Using parser org.orbeon.oxf.xml.xerces.XercesSAXParser
>> Using transformer
>> orbeon.apache.xalan.transformer.TransformerIdentityImpl
>>
>>
>>
>> Regards
>>
>> Philip Fennell
>> Consultant
>>
>> Mark Logic Corporation
>> www.marklogic.com
>>
>> E-mail: [hidden email]
>> Mobile: +44 (0)7824 830 866
>>
>>
>>
>>
>>
>> --
>> 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, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet
>
>
> --
> 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, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Instance data validation via XML Schema

pfennell
In reply to this post by pfennell
Alessandro,

Sorry about that. I've zipped it this time to make doubly sure.


Regards

Philip Fennell

-----Original Message-----
From: Philip Fennell [mailto:[hidden email]]
Sent: 05 March 2010 17:05
To: [hidden email]
Subject: [ops-users] RE: Re: Instance data validation via XML Schema

Alessandro,

After realising that my original problem was down to authentication when attempting to retrieve the schema (I'm a Muppet!), I now have a different problem.

I can load the instance data and the schema and I can see the validation of user input being done by the schema. However, when I attempt to submit the instance data to update the content on the server I get a validation error. However, I've checked the content and it always validates against the schema. Moreover, the validation error is generated regardless of whether I make changes or not.

I've attached a self-contained example except for a valid URI to submit the update to.


Regards

Philip Fennell



-----Original Message-----
From: Alessandro Vernet [mailto:[hidden email]]
Sent: 04 March 2010 22:49
To: [hidden email]
Subject: [ops-users] Re: Instance data validation via XML Schema

Philip,

Schema validation should work out of the box. Could you attach a simple example that shows the problem you're having, so we can reproduce it here?

Alex

On Thu, Mar 4, 2010 at 8:33 AM, Philip Fennell <[hidden email]> wrote:

> Hello,
>
> Having searched around I couldn't find any existing information regarding XML Schema validation of instance data in XForms served by Orbeon.
>
> I have a problem where adding a reference to an XML Schema to my xf:model thus:
>
> <xf:model schema="http://...">
> ...
> </xf:model>
>
> I get an error response from Orbeon (see attached). I know that the Schema is accessible so it's not an issue of it cannot retrieve it.
>
> Also I've noticed that in Tomcat's stdout log there are messages regarding it trying to find Xerces (see below).
>
> I'm running Tomcat 6.0.24 with Java 1.6.0_16 on Windows XP SP3.
>
> Is anyone out there using XML Schema validation and getting it to work?
>
>
>
> Starting Orbeon Forms Release dev-3.7.1.200905272119 Initializing Resource Manager with:
> {oxf.resources.priority.1.oxf.resources.webapp.rootdir=/WEB-INF/resour
> ces,
> oxf.resources.priority.1=org.orbeon.oxf.resources.WebAppResourceManage
> rFactory,
>
> oxf.resources.priority.2=org.orbeon.oxf.resources.ClassLoaderResourceM
> anagerFactory,
>
> oxf.resources.factory=org.orbeon.oxf.resources.PriorityResourceManager
> Factory,
>
> org.orbeon.oxf.resources.WebAppResourceManagerImplServletContext=org.a
> pache.catalina.core.ApplicationContextFacade@aa567c}
>
> Looking for a valid Parser...
> Checking for Xerces, found version Xerces-J 2.9.0 needed version
> Xerces-J
> 2.9.1
> Warning: Failed find a valid Parser!
>
> Please add an appropriate Parser to the class-path, e.g. in the 'endorsed'
> folder of the servlet container or in the 'endorsed' folder of the JRE.
>
> Looking for a valid Transformer...
> Checking for Saxon, found version 8.8 needed version 8.9.0 Checking
> for Xalan, found version Xalan Java 2.5.1 needed version Xalan Java
> 2.7.1
> Warning: Failed find a valid Transformer!
>
> Please add an appropriate Transformer to the class-path, e.g. in the 'endorsed' folder of the servlet container or in the 'endorsed' folder of the JRE.
>
> Using parser org.orbeon.oxf.xml.xerces.XercesSAXParser
> Using transformer
> orbeon.apache.xalan.transformer.TransformerIdentityImpl
>
>
>
> Regards
>
> Philip Fennell
> Consultant
>
> Mark Logic Corporation
> www.marklogic.com
>
> E-mail: [hidden email]
> Mobile: +44 (0)7824 830 866
>
>
>
>
>
> --
> 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, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet


--
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

sample-form-with-schema.zip (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Re: Instance data validation via XML Schema

Alessandro  Vernet
Administrator
Philip,

In the log I see:

2010-03-07 21:03:53,688 DEBUG XFormsServer  -             start
submission {id: "update"}
2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
invalid element {element name: "<source id="custom">Custom</source>"}
2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
invalid element {element name: "<source id="apc">APC</source>"}
2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
invalid element {element name: "<source id="nabulk">nabulk</source>"}
2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
invalid element {element name: "<source id="vb">Visit
Britain</source>"}
2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
invalid element {element name: "<source id="ldc">Local Data
Company</source>"}
2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
invalid element {element name: "<source id="postoffice">Post
Office</source>"}
2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
invalid element {element name: "<source id="ocd">Human
Crawl</source>"}
2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
invalid element {element name: "<source id="wca">WCA</source>"}
2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
invalid element {element name: "<priority
value="1">custom</priority>"}
2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
invalid element {element name: "<priority value="2">apc</priority>"}
2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
invalid element {element name: "<priority
value="3">nabulk</priority>"}
2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
invalid element {element name: "<priority value="4">vb</priority>"}
2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
invalid element {element name: "<priority value="5">ocd</priority>"}
2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
invalid element {element name: "<priority value="6">ldc</priority>"}
2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
invalid element {element name: "<priority
value="7">postoffice</priority>"}
2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
invalid element {element name: "<priority value="8">wca</priority>"}
2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
invalid element {element name: "<priority
value="100">unknown</priority>"}

But it looks to me like the document is valid relative to the schema,
so this might be an issue with the validator we use. Erik will have a
look at this one and follow-up here.

Alex

On Fri, Mar 5, 2010 at 11:30 PM, Philip Fennell
<[hidden email]> wrote:

> Alessandro,
>
> Sorry about that. I've zipped it this time to make doubly sure.
>
>
> Regards
>
> Philip Fennell
>
> -----Original Message-----
> From: Philip Fennell [mailto:[hidden email]]
> Sent: 05 March 2010 17:05
> To: [hidden email]
> Subject: [ops-users] RE: Re: Instance data validation via XML Schema
>
> Alessandro,
>
> After realising that my original problem was down to authentication when attempting to retrieve the schema (I'm a Muppet!), I now have a different problem.
>
> I can load the instance data and the schema and I can see the validation of user input being done by the schema. However, when I attempt to submit the instance data to update the content on the server I get a validation error. However, I've checked the content and it always validates against the schema. Moreover, the validation error is generated regardless of whether I make changes or not.
>
> I've attached a self-contained example except for a valid URI to submit the update to.
>
>
> Regards
>
> Philip Fennell
>
>
>
> -----Original Message-----
> From: Alessandro Vernet [mailto:[hidden email]]
> Sent: 04 March 2010 22:49
> To: [hidden email]
> Subject: [ops-users] Re: Instance data validation via XML Schema
>
> Philip,
>
> Schema validation should work out of the box. Could you attach a simple example that shows the problem you're having, so we can reproduce it here?
>
> Alex
>
> On Thu, Mar 4, 2010 at 8:33 AM, Philip Fennell <[hidden email]> wrote:
>> Hello,
>>
>> Having searched around I couldn't find any existing information regarding XML Schema validation of instance data in XForms served by Orbeon.
>>
>> I have a problem where adding a reference to an XML Schema to my xf:model thus:
>>
>> <xf:model schema="http://...">
>> ...
>> </xf:model>
>>
>> I get an error response from Orbeon (see attached). I know that the Schema is accessible so it's not an issue of it cannot retrieve it.
>>
>> Also I've noticed that in Tomcat's stdout log there are messages regarding it trying to find Xerces (see below).
>>
>> I'm running Tomcat 6.0.24 with Java 1.6.0_16 on Windows XP SP3.
>>
>> Is anyone out there using XML Schema validation and getting it to work?
>>
>>
>>
>> Starting Orbeon Forms Release dev-3.7.1.200905272119 Initializing Resource Manager with:
>> {oxf.resources.priority.1.oxf.resources.webapp.rootdir=/WEB-INF/resour
>> ces,
>> oxf.resources.priority.1=org.orbeon.oxf.resources.WebAppResourceManage
>> rFactory,
>>
>> oxf.resources.priority.2=org.orbeon.oxf.resources.ClassLoaderResourceM
>> anagerFactory,
>>
>> oxf.resources.factory=org.orbeon.oxf.resources.PriorityResourceManager
>> Factory,
>>
>> org.orbeon.oxf.resources.WebAppResourceManagerImplServletContext=org.a
>> pache.catalina.core.ApplicationContextFacade@aa567c}
>>
>> Looking for a valid Parser...
>> Checking for Xerces, found version Xerces-J 2.9.0 needed version
>> Xerces-J
>> 2.9.1
>> Warning: Failed find a valid Parser!
>>
>> Please add an appropriate Parser to the class-path, e.g. in the 'endorsed'
>> folder of the servlet container or in the 'endorsed' folder of the JRE.
>>
>> Looking for a valid Transformer...
>> Checking for Saxon, found version 8.8 needed version 8.9.0 Checking
>> for Xalan, found version Xalan Java 2.5.1 needed version Xalan Java
>> 2.7.1
>> Warning: Failed find a valid Transformer!
>>
>> Please add an appropriate Transformer to the class-path, e.g. in the 'endorsed' folder of the servlet container or in the 'endorsed' folder of the JRE.
>>
>> Using parser org.orbeon.oxf.xml.xerces.XercesSAXParser
>> Using transformer
>> orbeon.apache.xalan.transformer.TransformerIdentityImpl
>>
>>
>>
>> Regards
>>
>> Philip Fennell
>> Consultant
>>
>> Mark Logic Corporation
>> www.marklogic.com
>>
>> E-mail: [hidden email]
>> Mobile: +44 (0)7824 830 866
>>
>>
>>
>>
>>
>> --
>> 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, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet
>
>
> --
> 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, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

RE: Re: Re: Instance data validation via XML Schema

pfennell
Alessandro,

Thanks for confirming that. Pheew, I thought I was going mad ;-)


Regards

Philip

-----Original Message-----
From: Alessandro Vernet [mailto:[hidden email]]
Sent: 08 March 2010 05:06
To: [hidden email]
Subject: [ops-users] Re: Re: Instance data validation via XML Schema

Philip,

In the log I see:

2010-03-07 21:03:53,688 DEBUG XFormsServer  -             start
submission {id: "update"}
2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
invalid element {element name: "<source id="custom">Custom</source>"}
2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
invalid element {element name: "<source id="apc">APC</source>"}
2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
invalid element {element name: "<source id="nabulk">nabulk</source>"}
2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
invalid element {element name: "<source id="vb">Visit Britain</source>"}
2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
invalid element {element name: "<source id="ldc">Local Data Company</source>"}
2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
invalid element {element name: "<source id="postoffice">Post Office</source>"}
2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
invalid element {element name: "<source id="ocd">Human Crawl</source>"}
2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
invalid element {element name: "<source id="wca">WCA</source>"}
2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
invalid element {element name: "<priority value="1">custom</priority>"}
2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
invalid element {element name: "<priority value="2">apc</priority>"}
2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
invalid element {element name: "<priority value="3">nabulk</priority>"}
2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
invalid element {element name: "<priority value="4">vb</priority>"}
2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
invalid element {element name: "<priority value="5">ocd</priority>"}
2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
invalid element {element name: "<priority value="6">ldc</priority>"}
2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
invalid element {element name: "<priority value="7">postoffice</priority>"}
2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
invalid element {element name: "<priority value="8">wca</priority>"}
2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
invalid element {element name: "<priority value="100">unknown</priority>"}

But it looks to me like the document is valid relative to the schema, so this might be an issue with the validator we use. Erik will have a look at this one and follow-up here.

Alex

On Fri, Mar 5, 2010 at 11:30 PM, Philip Fennell <[hidden email]> wrote:

> Alessandro,
>
> Sorry about that. I've zipped it this time to make doubly sure.
>
>
> Regards
>
> Philip Fennell
>
> -----Original Message-----
> From: Philip Fennell [mailto:[hidden email]]
> Sent: 05 March 2010 17:05
> To: [hidden email]
> Subject: [ops-users] RE: Re: Instance data validation via XML Schema
>
> Alessandro,
>
> After realising that my original problem was down to authentication when attempting to retrieve the schema (I'm a Muppet!), I now have a different problem.
>
> I can load the instance data and the schema and I can see the validation of user input being done by the schema. However, when I attempt to submit the instance data to update the content on the server I get a validation error. However, I've checked the content and it always validates against the schema. Moreover, the validation error is generated regardless of whether I make changes or not.
>
> I've attached a self-contained example except for a valid URI to submit the update to.
>
>
> Regards
>
> Philip Fennell
>
>
>
> -----Original Message-----
> From: Alessandro Vernet [mailto:[hidden email]]
> Sent: 04 March 2010 22:49
> To: [hidden email]
> Subject: [ops-users] Re: Instance data validation via XML Schema
>
> Philip,
>
> Schema validation should work out of the box. Could you attach a simple example that shows the problem you're having, so we can reproduce it here?
>
> Alex
>
> On Thu, Mar 4, 2010 at 8:33 AM, Philip Fennell <[hidden email]> wrote:
>> Hello,
>>
>> Having searched around I couldn't find any existing information regarding XML Schema validation of instance data in XForms served by Orbeon.
>>
>> I have a problem where adding a reference to an XML Schema to my xf:model thus:
>>
>> <xf:model schema="http://...">
>> ...
>> </xf:model>
>>
>> I get an error response from Orbeon (see attached). I know that the Schema is accessible so it's not an issue of it cannot retrieve it.
>>
>> Also I've noticed that in Tomcat's stdout log there are messages regarding it trying to find Xerces (see below).
>>
>> I'm running Tomcat 6.0.24 with Java 1.6.0_16 on Windows XP SP3.
>>
>> Is anyone out there using XML Schema validation and getting it to work?
>>
>>
>>
>> Starting Orbeon Forms Release dev-3.7.1.200905272119 Initializing Resource Manager with:
>> {oxf.resources.priority.1.oxf.resources.webapp.rootdir=/WEB-INF/resou
>> r
>> ces,
>> oxf.resources.priority.1=org.orbeon.oxf.resources.WebAppResourceManag
>> e
>> rFactory,
>>
>> oxf.resources.priority.2=org.orbeon.oxf.resources.ClassLoaderResource
>> M
>> anagerFactory,
>>
>> oxf.resources.factory=org.orbeon.oxf.resources.PriorityResourceManage
>> r
>> Factory,
>>
>> org.orbeon.oxf.resources.WebAppResourceManagerImplServletContext=org.
>> a pache.catalina.core.ApplicationContextFacade@aa567c}
>>
>> Looking for a valid Parser...
>> Checking for Xerces, found version Xerces-J 2.9.0 needed version
>> Xerces-J
>> 2.9.1
>> Warning: Failed find a valid Parser!
>>
>> Please add an appropriate Parser to the class-path, e.g. in the 'endorsed'
>> folder of the servlet container or in the 'endorsed' folder of the JRE.
>>
>> Looking for a valid Transformer...
>> Checking for Saxon, found version 8.8 needed version 8.9.0 Checking
>> for Xalan, found version Xalan Java 2.5.1 needed version Xalan Java
>> 2.7.1
>> Warning: Failed find a valid Transformer!
>>
>> Please add an appropriate Transformer to the class-path, e.g. in the 'endorsed' folder of the servlet container or in the 'endorsed' folder of the JRE.
>>
>> Using parser org.orbeon.oxf.xml.xerces.XercesSAXParser
>> Using transformer
>> orbeon.apache.xalan.transformer.TransformerIdentityImpl
>>
>>
>>
>> Regards
>>
>> Philip Fennell
>> Consultant
>>
>> Mark Logic Corporation
>> www.marklogic.com
>>
>> E-mail: [hidden email]
>> Mobile: +44 (0)7824 830 866
>>
>>
>>
>>
>>
>> --
>> 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, open-source, for the Enterprise -
> http://www.orbeon.com/ My Twitter: http://twitter.com/avernet
>
>
> --
> 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, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet


--
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
Reply | Threaded
Open this post in threaded view
|

Re: RE: Re: Re: Instance data validation via XML Schema

Erik Bruchez
Administrator
Philip,

I think I have good news: this was the same as a bug entered quite a
long time ago:

http://forge.ow2.org/tracker/index.php?func=detail&aid=308399&group_id=168&atid=350207

By comparing the original MSV Validator.java and our own validation
code, I think I found the difference and fixed it.

http://github.com/orbeon/orbeon-forms/commit/829047c8ace54a28b967a283136b316980e3305e

Separately, I noted an error in the form you sent. You have code like this:

  <xf:input ref="text()">

In general it does not make sense to bind a control to a text node,
because of the way a control writes to the instance following the
setvalue semantic:

http://www.w3.org/TR/xforms11/#action-setvalue

What happens if the user empties the input field is that:

* the text node is removed
* the control therefore binds to no node
* the control becomes non-relevant

Instead, we recommend you bind to the enclosing element.

-Erik

On Mon, Mar 8, 2010 at 12:04 AM, Philip Fennell
<[hidden email]> wrote:

> Alessandro,
>
> Thanks for confirming that. Pheew, I thought I was going mad ;-)
>
>
> Regards
>
> Philip
>
> -----Original Message-----
> From: Alessandro Vernet [mailto:[hidden email]]
> Sent: 08 March 2010 05:06
> To: [hidden email]
> Subject: [ops-users] Re: Re: Instance data validation via XML Schema
>
> Philip,
>
> In the log I see:
>
> 2010-03-07 21:03:53,688 DEBUG XFormsServer  -             start
> submission {id: "update"}
> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
> invalid element {element name: "<source id="custom">Custom</source>"}
> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
> invalid element {element name: "<source id="apc">APC</source>"}
> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
> invalid element {element name: "<source id="nabulk">nabulk</source>"}
> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
> invalid element {element name: "<source id="vb">Visit Britain</source>"}
> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
> invalid element {element name: "<source id="ldc">Local Data Company</source>"}
> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
> invalid element {element name: "<source id="postoffice">Post Office</source>"}
> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
> invalid element {element name: "<source id="ocd">Human Crawl</source>"}
> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
> invalid element {element name: "<source id="wca">WCA</source>"}
> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
> invalid element {element name: "<priority value="1">custom</priority>"}
> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
> invalid element {element name: "<priority value="2">apc</priority>"}
> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
> invalid element {element name: "<priority value="3">nabulk</priority>"}
> 2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
> invalid element {element name: "<priority value="4">vb</priority>"}
> 2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
> invalid element {element name: "<priority value="5">ocd</priority>"}
> 2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
> invalid element {element name: "<priority value="6">ldc</priority>"}
> 2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
> invalid element {element name: "<priority value="7">postoffice</priority>"}
> 2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
> invalid element {element name: "<priority value="8">wca</priority>"}
> 2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
> invalid element {element name: "<priority value="100">unknown</priority>"}
>
> But it looks to me like the document is valid relative to the schema, so this might be an issue with the validator we use. Erik will have a look at this one and follow-up here.
>
> Alex
>
> On Fri, Mar 5, 2010 at 11:30 PM, Philip Fennell <[hidden email]> wrote:
>> Alessandro,
>>
>> Sorry about that. I've zipped it this time to make doubly sure.
>>
>>
>> Regards
>>
>> Philip Fennell
>>
>> -----Original Message-----
>> From: Philip Fennell [mailto:[hidden email]]
>> Sent: 05 March 2010 17:05
>> To: [hidden email]
>> Subject: [ops-users] RE: Re: Instance data validation via XML Schema
>>
>> Alessandro,
>>
>> After realising that my original problem was down to authentication when attempting to retrieve the schema (I'm a Muppet!), I now have a different problem.
>>
>> I can load the instance data and the schema and I can see the validation of user input being done by the schema. However, when I attempt to submit the instance data to update the content on the server I get a validation error. However, I've checked the content and it always validates against the schema. Moreover, the validation error is generated regardless of whether I make changes or not.
>>
>> I've attached a self-contained example except for a valid URI to submit the update to.
>>
>>
>> Regards
>>
>> Philip Fennell
>>
>>
>>
>> -----Original Message-----
>> From: Alessandro Vernet [mailto:[hidden email]]
>> Sent: 04 March 2010 22:49
>> To: [hidden email]
>> Subject: [ops-users] Re: Instance data validation via XML Schema
>>
>> Philip,
>>
>> Schema validation should work out of the box. Could you attach a simple example that shows the problem you're having, so we can reproduce it here?
>>
>> Alex
>>
>> On Thu, Mar 4, 2010 at 8:33 AM, Philip Fennell <[hidden email]> wrote:
>>> Hello,
>>>
>>> Having searched around I couldn't find any existing information regarding XML Schema validation of instance data in XForms served by Orbeon.
>>>
>>> I have a problem where adding a reference to an XML Schema to my xf:model thus:
>>>
>>> <xf:model schema="http://...">
>>> ...
>>> </xf:model>
>>>
>>> I get an error response from Orbeon (see attached). I know that the Schema is accessible so it's not an issue of it cannot retrieve it.
>>>
>>> Also I've noticed that in Tomcat's stdout log there are messages regarding it trying to find Xerces (see below).
>>>
>>> I'm running Tomcat 6.0.24 with Java 1.6.0_16 on Windows XP SP3.
>>>
>>> Is anyone out there using XML Schema validation and getting it to work?
>>>
>>>
>>>
>>> Starting Orbeon Forms Release dev-3.7.1.200905272119 Initializing Resource Manager with:
>>> {oxf.resources.priority.1.oxf.resources.webapp.rootdir=/WEB-INF/resou
>>> r
>>> ces,
>>> oxf.resources.priority.1=org.orbeon.oxf.resources.WebAppResourceManag
>>> e
>>> rFactory,
>>>
>>> oxf.resources.priority.2=org.orbeon.oxf.resources.ClassLoaderResource
>>> M
>>> anagerFactory,
>>>
>>> oxf.resources.factory=org.orbeon.oxf.resources.PriorityResourceManage
>>> r
>>> Factory,
>>>
>>> org.orbeon.oxf.resources.WebAppResourceManagerImplServletContext=org.
>>> a pache.catalina.core.ApplicationContextFacade@aa567c}
>>>
>>> Looking for a valid Parser...
>>> Checking for Xerces, found version Xerces-J 2.9.0 needed version
>>> Xerces-J
>>> 2.9.1
>>> Warning: Failed find a valid Parser!
>>>
>>> Please add an appropriate Parser to the class-path, e.g. in the 'endorsed'
>>> folder of the servlet container or in the 'endorsed' folder of the JRE.
>>>
>>> Looking for a valid Transformer...
>>> Checking for Saxon, found version 8.8 needed version 8.9.0 Checking
>>> for Xalan, found version Xalan Java 2.5.1 needed version Xalan Java
>>> 2.7.1
>>> Warning: Failed find a valid Transformer!
>>>
>>> Please add an appropriate Transformer to the class-path, e.g. in the 'endorsed' folder of the servlet container or in the 'endorsed' folder of the JRE.
>>>
>>> Using parser org.orbeon.oxf.xml.xerces.XercesSAXParser
>>> Using transformer
>>> orbeon.apache.xalan.transformer.TransformerIdentityImpl
>>>
>>>
>>>
>>> Regards
>>>
>>> Philip Fennell
>>> Consultant
>>>
>>> Mark Logic Corporation
>>> www.marklogic.com
>>>
>>> E-mail: [hidden email]
>>> Mobile: +44 (0)7824 830 866
>>>
>>>
>>>
>>>
>>>
>>> --
>>> 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, open-source, for the Enterprise -
>> http://www.orbeon.com/ My Twitter: http://twitter.com/avernet
>>
>>
>> --
>> 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, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet
>
>
> --
> 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
>
>


--
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
Reply | Threaded
Open this post in threaded view
|

RE: Re: RE: Re: Re: Instance data validation via XML Schema

pfennell
Erik,

> I think I found the difference and fixed it.

Excellent news, thank you.

Silly question I know, but, what do I do next? Should I get a nightly-build e.g. Orbeon-patch-20100308.war?



> Separately, I noted an error in the form you sent. You have code like this:

That's a coincidence, I made the exact change you describe yesterday because the form wasn't behaving properly. Thanks for pointing that out too.


Regards

Philip Fennell



-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Erik Bruchez
Sent: 09 March 2010 20:30
To: [hidden email]
Subject: [ops-users] Re: RE: Re: Re: Instance data validation via XML Schema

Philip,

I think I have good news: this was the same as a bug entered quite a long time ago:

http://forge.ow2.org/tracker/index.php?func=detail&aid=308399&group_id=168&atid=350207

By comparing the original MSV Validator.java and our own validation code, I think I found the difference and fixed it.

http://github.com/orbeon/orbeon-forms/commit/829047c8ace54a28b967a283136b316980e3305e

Separately, I noted an error in the form you sent. You have code like this:

  <xf:input ref="text()">

In general it does not make sense to bind a control to a text node, because of the way a control writes to the instance following the setvalue semantic:

http://www.w3.org/TR/xforms11/#action-setvalue

What happens if the user empties the input field is that:

* the text node is removed
* the control therefore binds to no node
* the control becomes non-relevant

Instead, we recommend you bind to the enclosing element.

-Erik

On Mon, Mar 8, 2010 at 12:04 AM, Philip Fennell <[hidden email]> wrote:

> Alessandro,
>
> Thanks for confirming that. Pheew, I thought I was going mad ;-)
>
>
> Regards
>
> Philip
>
> -----Original Message-----
> From: Alessandro Vernet [mailto:[hidden email]]
> Sent: 08 March 2010 05:06
> To: [hidden email]
> Subject: [ops-users] Re: Re: Instance data validation via XML Schema
>
> Philip,
>
> In the log I see:
>
> 2010-03-07 21:03:53,688 DEBUG XFormsServer  -             start
> submission {id: "update"}
> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
> invalid element {element name: "<source id="custom">Custom</source>"}
> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
> invalid element {element name: "<source id="apc">APC</source>"}
> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
> invalid element {element name: "<source id="nabulk">nabulk</source>"}
> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
> invalid element {element name: "<source id="vb">Visit
> Britain</source>"}
> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
> invalid element {element name: "<source id="ldc">Local Data
> Company</source>"}
> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
> invalid element {element name: "<source id="postoffice">Post
> Office</source>"}
> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
> invalid element {element name: "<source id="ocd">Human
> Crawl</source>"}
> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
> invalid element {element name: "<source id="wca">WCA</source>"}
> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
> invalid element {element name: "<priority
> value="1">custom</priority>"}
> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
> invalid element {element name: "<priority value="2">apc</priority>"}
> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
> invalid element {element name: "<priority
> value="3">nabulk</priority>"}
> 2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
> invalid element {element name: "<priority value="4">vb</priority>"}
> 2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
> invalid element {element name: "<priority value="5">ocd</priority>"}
> 2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
> invalid element {element name: "<priority value="6">ldc</priority>"}
> 2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
> invalid element {element name: "<priority
> value="7">postoffice</priority>"}
> 2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
> invalid element {element name: "<priority value="8">wca</priority>"}
> 2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
> invalid element {element name: "<priority
> value="100">unknown</priority>"}
>
> But it looks to me like the document is valid relative to the schema, so this might be an issue with the validator we use. Erik will have a look at this one and follow-up here.
>
> Alex
>
> On Fri, Mar 5, 2010 at 11:30 PM, Philip Fennell <[hidden email]> wrote:
>> Alessandro,
>>
>> Sorry about that. I've zipped it this time to make doubly sure.
>>
>>
>> Regards
>>
>> Philip Fennell
>>
>> -----Original Message-----
>> From: Philip Fennell [mailto:[hidden email]]
>> Sent: 05 March 2010 17:05
>> To: [hidden email]
>> Subject: [ops-users] RE: Re: Instance data validation via XML Schema
>>
>> Alessandro,
>>
>> After realising that my original problem was down to authentication when attempting to retrieve the schema (I'm a Muppet!), I now have a different problem.
>>
>> I can load the instance data and the schema and I can see the validation of user input being done by the schema. However, when I attempt to submit the instance data to update the content on the server I get a validation error. However, I've checked the content and it always validates against the schema. Moreover, the validation error is generated regardless of whether I make changes or not.
>>
>> I've attached a self-contained example except for a valid URI to submit the update to.
>>
>>
>> Regards
>>
>> Philip Fennell
>>
>>
>>
>> -----Original Message-----
>> From: Alessandro Vernet [mailto:[hidden email]]
>> Sent: 04 March 2010 22:49
>> To: [hidden email]
>> Subject: [ops-users] Re: Instance data validation via XML Schema
>>
>> Philip,
>>
>> Schema validation should work out of the box. Could you attach a simple example that shows the problem you're having, so we can reproduce it here?
>>
>> Alex
>>
>> On Thu, Mar 4, 2010 at 8:33 AM, Philip Fennell <[hidden email]> wrote:
>>> Hello,
>>>
>>> Having searched around I couldn't find any existing information regarding XML Schema validation of instance data in XForms served by Orbeon.
>>>
>>> I have a problem where adding a reference to an XML Schema to my xf:model thus:
>>>
>>> <xf:model schema="http://...">
>>> ...
>>> </xf:model>
>>>
>>> I get an error response from Orbeon (see attached). I know that the Schema is accessible so it's not an issue of it cannot retrieve it.
>>>
>>> Also I've noticed that in Tomcat's stdout log there are messages regarding it trying to find Xerces (see below).
>>>
>>> I'm running Tomcat 6.0.24 with Java 1.6.0_16 on Windows XP SP3.
>>>
>>> Is anyone out there using XML Schema validation and getting it to work?
>>>
>>>
>>>
>>> Starting Orbeon Forms Release dev-3.7.1.200905272119 Initializing Resource Manager with:
>>> {oxf.resources.priority.1.oxf.resources.webapp.rootdir=/WEB-INF/reso
>>> u
>>> r
>>> ces,
>>> oxf.resources.priority.1=org.orbeon.oxf.resources.WebAppResourceMana
>>> g
>>> e
>>> rFactory,
>>>
>>> oxf.resources.priority.2=org.orbeon.oxf.resources.ClassLoaderResourc
>>> e
>>> M
>>> anagerFactory,
>>>
>>> oxf.resources.factory=org.orbeon.oxf.resources.PriorityResourceManag
>>> e
>>> r
>>> Factory,
>>>
>>> org.orbeon.oxf.resources.WebAppResourceManagerImplServletContext=org.
>>> a pache.catalina.core.ApplicationContextFacade@aa567c}
>>>
>>> Looking for a valid Parser...
>>> Checking for Xerces, found version Xerces-J 2.9.0 needed version
>>> Xerces-J
>>> 2.9.1
>>> Warning: Failed find a valid Parser!
>>>
>>> Please add an appropriate Parser to the class-path, e.g. in the 'endorsed'
>>> folder of the servlet container or in the 'endorsed' folder of the JRE.
>>>
>>> Looking for a valid Transformer...
>>> Checking for Saxon, found version 8.8 needed version 8.9.0 Checking
>>> for Xalan, found version Xalan Java 2.5.1 needed version Xalan Java
>>> 2.7.1
>>> Warning: Failed find a valid Transformer!
>>>
>>> Please add an appropriate Transformer to the class-path, e.g. in the 'endorsed' folder of the servlet container or in the 'endorsed' folder of the JRE.
>>>
>>> Using parser org.orbeon.oxf.xml.xerces.XercesSAXParser
>>> Using transformer
>>> orbeon.apache.xalan.transformer.TransformerIdentityImpl
>>>
>>>
>>>
>>> Regards
>>>
>>> Philip Fennell
>>> Consultant
>>>
>>> Mark Logic Corporation
>>> www.marklogic.com
>>>
>>> E-mail: [hidden email]
>>> Mobile: +44 (0)7824 830 866
>>>
>>>
>>>
>>>
>>>
>>> --
>>> 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, open-source, for the Enterprise -
>> http://www.orbeon.com/ My Twitter: http://twitter.com/avernet
>>
>>
>> --
>> 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, open-source, for the Enterprise -
> http://www.orbeon.com/ My Twitter: http://twitter.com/avernet
>
>
> --
> 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
>
>


--
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
Reply | Threaded
Open this post in threaded view
|

Re: RE: Re: RE: Re: Re: Instance data validation via XML Schema

Erik Bruchez
Administrator
> Excellent news, thank you.
>
> Silly question I know, but, what do I do next? Should I get a nightly-build e.g. Orbeon-patch-20100308.war?

Simply use (the one you are pointing at holds a temporary patch only):

http://forge.objectweb.org/nightlybuilds/ops/ops/orbeon.war

>> Separately, I noted an error in the form you sent. You have code like this:
>
> That's a coincidence, I made the exact change you describe yesterday because the form wasn't behaving properly. Thanks for pointing that out too.

Excellent!

-Erik

>
>
> Regards
>
> Philip Fennell
>
>
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Erik Bruchez
> Sent: 09 March 2010 20:30
> To: [hidden email]
> Subject: [ops-users] Re: RE: Re: Re: Instance data validation via XML Schema
>
> Philip,
>
> I think I have good news: this was the same as a bug entered quite a long time ago:
>
> http://forge.ow2.org/tracker/index.php?func=detail&aid=308399&group_id=168&atid=350207
>
> By comparing the original MSV Validator.java and our own validation code, I think I found the difference and fixed it.
>
> http://github.com/orbeon/orbeon-forms/commit/829047c8ace54a28b967a283136b316980e3305e
>
> Separately, I noted an error in the form you sent. You have code like this:
>
>  <xf:input ref="text()">
>
> In general it does not make sense to bind a control to a text node, because of the way a control writes to the instance following the setvalue semantic:
>
> http://www.w3.org/TR/xforms11/#action-setvalue
>
> What happens if the user empties the input field is that:
>
> * the text node is removed
> * the control therefore binds to no node
> * the control becomes non-relevant
>
> Instead, we recommend you bind to the enclosing element.
>
> -Erik
>
> On Mon, Mar 8, 2010 at 12:04 AM, Philip Fennell <[hidden email]> wrote:
>> Alessandro,
>>
>> Thanks for confirming that. Pheew, I thought I was going mad ;-)
>>
>>
>> Regards
>>
>> Philip
>>
>> -----Original Message-----
>> From: Alessandro Vernet [mailto:[hidden email]]
>> Sent: 08 March 2010 05:06
>> To: [hidden email]
>> Subject: [ops-users] Re: Re: Instance data validation via XML Schema
>>
>> Philip,
>>
>> In the log I see:
>>
>> 2010-03-07 21:03:53,688 DEBUG XFormsServer  -             start
>> submission {id: "update"}
>> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
>> invalid element {element name: "<source id="custom">Custom</source>"}
>> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
>> invalid element {element name: "<source id="apc">APC</source>"}
>> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
>> invalid element {element name: "<source id="nabulk">nabulk</source>"}
>> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
>> invalid element {element name: "<source id="vb">Visit
>> Britain</source>"}
>> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
>> invalid element {element name: "<source id="ldc">Local Data
>> Company</source>"}
>> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
>> invalid element {element name: "<source id="postoffice">Post
>> Office</source>"}
>> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
>> invalid element {element name: "<source id="ocd">Human
>> Crawl</source>"}
>> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
>> invalid element {element name: "<source id="wca">WCA</source>"}
>> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
>> invalid element {element name: "<priority
>> value="1">custom</priority>"}
>> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
>> invalid element {element name: "<priority value="2">apc</priority>"}
>> 2010-03-07 21:03:53,689 DEBUG XFormsServer  -               found
>> invalid element {element name: "<priority
>> value="3">nabulk</priority>"}
>> 2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
>> invalid element {element name: "<priority value="4">vb</priority>"}
>> 2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
>> invalid element {element name: "<priority value="5">ocd</priority>"}
>> 2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
>> invalid element {element name: "<priority value="6">ldc</priority>"}
>> 2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
>> invalid element {element name: "<priority
>> value="7">postoffice</priority>"}
>> 2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
>> invalid element {element name: "<priority value="8">wca</priority>"}
>> 2010-03-07 21:03:53,690 DEBUG XFormsServer  -               found
>> invalid element {element name: "<priority
>> value="100">unknown</priority>"}
>>
>> But it looks to me like the document is valid relative to the schema, so this might be an issue with the validator we use. Erik will have a look at this one and follow-up here.
>>
>> Alex
>>
>> On Fri, Mar 5, 2010 at 11:30 PM, Philip Fennell <[hidden email]> wrote:
>>> Alessandro,
>>>
>>> Sorry about that. I've zipped it this time to make doubly sure.
>>>
>>>
>>> Regards
>>>
>>> Philip Fennell
>>>
>>> -----Original Message-----
>>> From: Philip Fennell [mailto:[hidden email]]
>>> Sent: 05 March 2010 17:05
>>> To: [hidden email]
>>> Subject: [ops-users] RE: Re: Instance data validation via XML Schema
>>>
>>> Alessandro,
>>>
>>> After realising that my original problem was down to authentication when attempting to retrieve the schema (I'm a Muppet!), I now have a different problem.
>>>
>>> I can load the instance data and the schema and I can see the validation of user input being done by the schema. However, when I attempt to submit the instance data to update the content on the server I get a validation error. However, I've checked the content and it always validates against the schema. Moreover, the validation error is generated regardless of whether I make changes or not.
>>>
>>> I've attached a self-contained example except for a valid URI to submit the update to.
>>>
>>>
>>> Regards
>>>
>>> Philip Fennell
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: Alessandro Vernet [mailto:[hidden email]]
>>> Sent: 04 March 2010 22:49
>>> To: [hidden email]
>>> Subject: [ops-users] Re: Instance data validation via XML Schema
>>>
>>> Philip,
>>>
>>> Schema validation should work out of the box. Could you attach a simple example that shows the problem you're having, so we can reproduce it here?
>>>
>>> Alex
>>>
>>> On Thu, Mar 4, 2010 at 8:33 AM, Philip Fennell <[hidden email]> wrote:
>>>> Hello,
>>>>
>>>> Having searched around I couldn't find any existing information regarding XML Schema validation of instance data in XForms served by Orbeon.
>>>>
>>>> I have a problem where adding a reference to an XML Schema to my xf:model thus:
>>>>
>>>> <xf:model schema="http://...">
>>>> ...
>>>> </xf:model>
>>>>
>>>> I get an error response from Orbeon (see attached). I know that the Schema is accessible so it's not an issue of it cannot retrieve it.
>>>>
>>>> Also I've noticed that in Tomcat's stdout log there are messages regarding it trying to find Xerces (see below).
>>>>
>>>> I'm running Tomcat 6.0.24 with Java 1.6.0_16 on Windows XP SP3.
>>>>
>>>> Is anyone out there using XML Schema validation and getting it to work?
>>>>
>>>>
>>>>
>>>> Starting Orbeon Forms Release dev-3.7.1.200905272119 Initializing Resource Manager with:
>>>> {oxf.resources.priority.1.oxf.resources.webapp.rootdir=/WEB-INF/reso
>>>> u
>>>> r
>>>> ces,
>>>> oxf.resources.priority.1=org.orbeon.oxf.resources.WebAppResourceMana
>>>> g
>>>> e
>>>> rFactory,
>>>>
>>>> oxf.resources.priority.2=org.orbeon.oxf.resources.ClassLoaderResourc
>>>> e
>>>> M
>>>> anagerFactory,
>>>>
>>>> oxf.resources.factory=org.orbeon.oxf.resources.PriorityResourceManag
>>>> e
>>>> r
>>>> Factory,
>>>>
>>>> org.orbeon.oxf.resources.WebAppResourceManagerImplServletContext=org.
>>>> a pache.catalina.core.ApplicationContextFacade@aa567c}
>>>>
>>>> Looking for a valid Parser...
>>>> Checking for Xerces, found version Xerces-J 2.9.0 needed version
>>>> Xerces-J
>>>> 2.9.1
>>>> Warning: Failed find a valid Parser!
>>>>
>>>> Please add an appropriate Parser to the class-path, e.g. in the 'endorsed'
>>>> folder of the servlet container or in the 'endorsed' folder of the JRE.
>>>>
>>>> Looking for a valid Transformer...
>>>> Checking for Saxon, found version 8.8 needed version 8.9.0 Checking
>>>> for Xalan, found version Xalan Java 2.5.1 needed version Xalan Java
>>>> 2.7.1
>>>> Warning: Failed find a valid Transformer!
>>>>
>>>> Please add an appropriate Transformer to the class-path, e.g. in the 'endorsed' folder of the servlet container or in the 'endorsed' folder of the JRE.
>>>>
>>>> Using parser org.orbeon.oxf.xml.xerces.XercesSAXParser
>>>> Using transformer
>>>> orbeon.apache.xalan.transformer.TransformerIdentityImpl
>>>>
>>>>
>>>>
>>>> Regards
>>>>
>>>> Philip Fennell
>>>> Consultant
>>>>
>>>> Mark Logic Corporation
>>>> www.marklogic.com
>>>>
>>>> E-mail: [hidden email]
>>>> Mobile: +44 (0)7824 830 866
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> 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, open-source, for the Enterprise -
>>> http://www.orbeon.com/ My Twitter: http://twitter.com/avernet
>>>
>>>
>>> --
>>> 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, open-source, for the Enterprise -
>> http://www.orbeon.com/ My Twitter: http://twitter.com/avernet
>>
>>
>> --
>> 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
>>
>>
>
>
> --
> 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
>
>


--
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