1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-28 07:21:26 +03:00

Added regression tests (from Dhyanesh).

* test/schemas/empty-value* result/schemas/empty-value*:
  Added regression tests (from Dhyanesh).
This commit is contained in:
Kasimier T. Buchcik 2005-06-21 08:46:25 +00:00
parent 9c215eb384
commit 21edf9b42c
8 changed files with 35 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Tue Jun 21 10:44:34 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
* test/schemas/empty-value* result/schemas/empty-value*:
Added regression tests (from Dhyanesh).
Tue Jun 21 10:35:43 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
* xmlschemas.c: Fixed NULL values to be validated as empty

View File

@ -0,0 +1 @@
./test/schemas/empty-value_0.xml validates

View File

View File

@ -0,0 +1 @@
./test/schemas/empty-value_1.xml validates

View File

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<element1/>

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<element2 att="test"/>

View File

@ -0,0 +1,24 @@
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:simpleType name="myDouble">
<xs:union memberTypes="xs:double">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="\s*(N/A)?\s*"/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
<xs:element name="element1" type="myDouble"/>
<xs:element name="element2">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="myDouble">
<xs:attribute name="att" type="xs:string"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:schema>