Thanks Julian,
I got the same message using your code.  In general I am more interested
in validating against type than xml format.  There was no example of
using the xml-serializer to do validation in beta2.0b1 so I was going
off the only example that does validation, the ca-traffic example.  I
created an xsd schema and then submitted string content to the field.
The error that I got back was:

<v:error xmlns:v="http://orbeon.org/oxf/xml/validation"; message="19"/>

using the relaxNG schema the info was a bit better:

<v:error xmlns:v="http://orbeon.org/oxf/xml/validation"; message="Error
bad character content for element near highway (schema: highway.rng)"
system-id="oxf:/squote/xforms.xml" line="3" column="19"/>

Also I found that I could not switch between the higway.rng and
highway.xsd (by changing the schema reference in the xform.xml file)
with out starting and stopping tomcat, which doesn't seem right.

Here is highway.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";>
        <xs:element name="highway" type="xs:integer">
        </xs:element>
</xs:schema>

Couple of follow up questions:

In the ca-traffic example, it appears that validation is invoked by
including the xmlns:v in <p:choose href="#instance"
xmlns:v="http://orbeon.org/oxf/xml/validation";> With out this
declaration the form data is not validated.  

This invocation of validation is very different than the example code
you sent me, and very different than the suggested usage of the
validation processor in the documentation /doc/processors-validation.

Can you explain how these different ways of invoking validation for me?
Also I would like to know why the error messages are so substantially
different between the ca-traffic example and your code.  

I actually think that the ca-traffic example is more interesting and
useful way of passing validation information, as the validation feed
back can be fed back to the view.  Is there a way to get the verbose
error messages in the <v:error/> format?

Thanks

Peter

 

_______________________________________________
oxf-users mailing list
[EMAIL PROTECTED]
http://mail.orbeon.com/mailman/listinfo/oxf-users

Reply via email to