[xml] regexp in xml against xsd validation
- From: "Olivier Toussaint" <skippy iname com>
- To: xml gnome org
- Subject: [xml] regexp in xml against xsd validation
- Date: Fri, 18 Apr 2003 10:33:24 -0500
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]