Re: [xml] regexp in xml against xsd validation



There was a bug in the schema code where the status from the result of 
checking a restriction was not set in the context error flag. I am fairly 
certain this is the bug you have tripped across. This has been fixed in CVS. 
Note there are many things schema validation that don't work yet so you may 
experience other bugs.

Charlie B.

Quoting Olivier Toussaint <skippy iname com>:

Hello,
 
I'm new in the world of "let's build a world full of XML".
I've a schema with a simple element defined as follow :
 
<element name="flag" minOccurs="0">
  <simpleType>
    <restriction base="xs:string">
      <pattern value="([0-7|D])[0-9]{2}"/>
    </restriction>
  </simpleType>
</element>
 
The regular expression in the pattern is to force the validation of the
xml in the "xml against xsd validation process" instead of inside the
application.
 
The testRegexp program provided with the libxml is working fine. If I
do:
  testRegexp "([0-7|D])[0-9]{2}" "800"
It says that the value fails the regexp validation ==> OK
 
If I use the xmlSchemaValidateDoc function with the above schema and an
xml containing the value:
  <flag>800</flag>
It says that the document validates the schema ==> NOK.
 
Is the regexp validation included in the schemas features of the libxml
? Is it still a "TODO" feature ?
 
Kind regards,
 
 
Olivier Toussaint.
-- 
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]