You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mu...@apache.org on 2012/12/16 10:13:39 UTC
svn commit: r1422490 [3/13] - in /xerces/java/branches/xs-1.1-tests: ./
data/ data/assertions/ data/assertions/ST/ data/assertions/ST/list/
data/assertions/attributes/ data/assertions/defaultValues/
data/assertions/errors/ data/assertions/list_union/ d...
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/namespace/ns7_1.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/namespace/ns7_1.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/namespace/ns7_2.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/namespace/ns7_2.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/namespace/ns7_2.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/namespace/ns7_2.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,13 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="X">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:any processContents="skip" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:assert test="namespace-uri-from-QName(node-name(*[1])) = 'http://x.y1'"/>
+ <xs:assert test="namespace-uri-from-QName(node-name(*[2])) = 'http://x.y2'"/>
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/namespace/ns7_2.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/namespace/ns7_2.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/po_sample/po.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/po_sample/po.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/po_sample/po.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/po_sample/po.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1,25 @@
+<order id="100">
+ <buyer>
+ <fName>Jimmy</fName>
+ <lName>Nice</lName>
+ </buyer>
+ <billing-address>
+ <street1>XYZ Street1</street1>
+ <street2>Near Leapord Market</street2>
+ <city>ABC</city>
+ <zipcode>122001</zipcode>
+ <state>PQR</state>
+ <country>my country</country>
+ </billing-address>
+ <shipping-address />
+ <email>jimmy.nice@jimmy.org</email>
+ <items>
+ <item quantity="1" price="88.10">
+ <description>Inside Java Virtual Machine: Sun Press (James Gosling)</description>
+ </item>
+ <item id="105" quantity="2" price="20" />
+ </items>
+ <tax>10.81</tax>
+ <bill-amount>118.91</bill-amount>
+ <currency>USD</currency>
+</order>
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/po_sample/po.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/po_sample/po.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/po_sample/po.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/po_sample/po.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/po_sample/po.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/po_sample/po.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:annotation>
+ <xs:documentation>
+ A sample XML schema describing a purchase order.
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:include schemaLocation="product.xsd"/>
+
+ <xs:element name="order" type="ORDER"/>
+
+ <xs:complexType name="ORDER">
+ <xs:complexContent>
+ <xs:extension base="PO_BUSINESS_RULES">
+ <xs:sequence>
+ <xs:element name="buyer" type="BUYER"/>
+ <xs:element name="billing-address" type="ADDRESS"/>
+ <xs:element name="shipping-address" type="ADDRESS"/>
+ <xs:element name="email" type="EMAIL"/>
+ <xs:element name="items" type="POITEMS"/>
+ <xs:element name="tax" type="PRICE"/>
+ <xs:element name="bill-amount" type="PRICE"/>
+ <xs:element name="currency" type="xs:string"/>
+ </xs:sequence>
+ <xs:attribute name="id" type="xs:string" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="PO_BUSINESS_RULES">
+ <xs:assert test="if (billing-address/* and not(shipping-address/*)) then (billing-address[street1 and city and country])
+ else
+ if (shipping-address/* and not(billing-address/*)) then (shipping-address[street1 and city and country])
+ else
+ if (shipping-address/* and billing-address/*) then (billing-address[street1 and city and country] and
+ shipping-address[street1 and city and country]) else
+ true()">
+ <xs:annotation>
+ <xs:documentation>
+ Business rules description:
+ a) If contents of billing-address are empty, then shipping-address must
+ have street1, city and country fields.
+ b) If contents of shipping-address are empty, then billing-address must
+ have street1, city and country fields.
+ c) If contents of both billing-address and shipping-address are non-empty,
+ then constraints for children of billing-address/shipping-address
+ specified in (a) and (b) need to be satisfied.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:assert>
+ <xs:assert test="tax = sum(items/item/@price) * 0.1">
+ <xs:annotation>
+ <xs:documentation>
+ Tax is 10% of total order amount.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:assert>
+ <xs:assert test="bill-amount = sum(items/item/@price) + tax">
+ <xs:annotation>
+ <xs:documentation>
+ Total bill amount = 'Total order amount' + tax.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:assert>
+ </xs:complexType>
+
+ <xs:complexType name="BUYER">
+ <xs:choice>
+ <xs:sequence>
+ <xs:element name="fName" type="xs:string"/>
+ <xs:element minOccurs="0" name="middlName" type="xs:string"/>
+ <xs:element name="lName" type="xs:string"/>
+ </xs:sequence>
+ <xs:element name="Establishment" type="xs:string"/>
+ </xs:choice>
+ </xs:complexType>
+
+ <xs:complexType name="ADDRESS">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="street1" type="xs:string"/>
+ <xs:element minOccurs="0" name="street2" type="xs:string"/>
+ <xs:element minOccurs="0" name="city" type="GEOGRAPHIC_LOCATION"/>
+ <xs:element minOccurs="0" name="zipcode" type="GEOGRAPHIC_LOCATION"/>
+ <xs:element minOccurs="0" name="state" type="GEOGRAPHIC_LOCATION"/>
+ <xs:element minOccurs="0" name="country" type="GEOGRAPHIC_LOCATION"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:simpleType name="GEOGRAPHIC_LOCATION">
+ <xs:restriction base="xs:string">
+ <xs:minLength value="3"/>
+ <xs:maxLength value="30"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="EMAIL">
+ <xs:restriction base="xs:string">
+ <xs:pattern value=".*@.*\..*"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+</xs:schema>
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/po_sample/po.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/po_sample/po.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/po_sample/product.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/po_sample/product.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/po_sample/product.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/po_sample/product.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,41 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:complexType name="POITEMS">
+ <xs:sequence>
+ <xs:element name="item" type="ITEM" maxOccurs="unbounded">
+ <xs:alternative test="@id" type="SHORT_ITEM_DEFN" />
+ <xs:alternative type="LONG_ITEM_DEFN" />
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="ITEM">
+ <xs:attribute name="quantity" type="xs:positiveInteger" />
+ <xs:attribute name="price" type="PRICE" />
+ </xs:complexType>
+
+ <xs:complexType name="SHORT_ITEM_DEFN">
+ <xs:complexContent>
+ <xs:extension base="ITEM">
+ <xs:attribute name="id" type="xs:string" />
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="LONG_ITEM_DEFN">
+ <xs:complexContent>
+ <xs:extension base="ITEM">
+ <xs:sequence>
+ <xs:element name="description" type="xs:string" />
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:simpleType name="PRICE">
+ <xs:restriction base="xs:decimal">
+ <xs:minInclusive value="0" />
+ </xs:restriction>
+ </xs:simpleType>
+
+</xs:schema>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/po_sample/product.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/po_sample/product.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test1.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test1.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test1.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test1.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1,3 @@
+<X min="1" max="5">
+ <message>hello world</message>
+</X>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test1.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test1.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test1.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test1.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test1.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test1.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="X" type="XType"/>
+
+ <xs:complexType name="XType">
+ <xs:sequence>
+ <xs:element name="message" type="xs:string"/>
+ </xs:sequence>
+ <xs:attribute name="min" type="xs:int"/>
+ <xs:attribute name="max" type="xs:int"/>
+ <xs:assert test="@min le @max"/>
+ <xs:assert test="string-length(message) le 30"/>
+ </xs:complexType>
+
+</xs:schema>
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test1.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test1.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test10.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test10.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test10.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test10.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1,4 @@
+<!-- to be validated with, test10.xsd -->
+<message mustUnderstand="YES">
+ <body>hello..</body>
+</message>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test10.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test10.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test10.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test10.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test10.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test10.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,29 @@
+<!-- demonstrates assertions on derived complex type -->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:complexType name="baseType">
+ <xs:sequence>
+ <xs:element name="body" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="mustUnderstand" type="xs:string"/>
+ <xs:assert test="@mustUnderstand"/>
+ </xs:complexType>
+
+ <xs:complexType name="derivedType">
+ <xs:complexContent>
+ <xs:restriction base="baseType">
+ <xs:sequence>
+ <xs:element name="body" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="mustUnderstand" type="xs:string"/>
+ <xs:assert test="(@mustUnderstand = 'YES' and count(./body) gt 0)
+ or (@mustUnderstand = 'NO')"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <!-- assertions of both 'derivedType' and of base type must succeed, for
+ validation to pass -->
+ <xs:element name="message" type="derivedType"/>
+
+</xs:schema>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test10.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test10.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test11.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test11.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test11.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test11.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1,3 @@
+<X xmlns="http://xyz">
+ <message>hello</message>
+</X>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test11.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test11.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test11.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test11.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test11.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test11.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xx="http://www.w3.org/2005/xpath-functions" elementFormDefault="qualified" targetNamespace="http://xyz">
+
+ <xsd:element name="X">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="message" type="xsd:string"/>
+ </xsd:sequence>
+ <xsd:assert test="xsd:string(message) = 'hello'" xpathDefaultNamespace="##targetNamespace"/>
+ </xsd:complexType>
+ </xsd:element>
+
+</xsd:schema>
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test11.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test11.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test12.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test12.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test12.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test12.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1,3 @@
+<X xmlns="http://xyz">
+ <message>hello</message>
+</X>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test12.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test12.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test12.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test12.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test12.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test12.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xx="http://www.w3.org/2005/xpath-functions" elementFormDefault="qualified" targetNamespace="http://xyz">
+
+ <xsd:element name="X">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="message" type="xsd:string"/>
+ </xsd:sequence>
+ <xsd:assert test="xsd:string(message) = 'hello'" xpathDefaultNamespace="##targetNamespace"/>
+ </xsd:complexType>
+ </xsd:element>
+
+</xsd:schema>
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test12.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test12.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test13.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test13.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test13.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test13.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1,6 @@
+<shape type="square">
+ <a>10</a>
+ <b>10</b>
+ <c>10</c>
+ <d>10</d>
+</shape>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test13.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test13.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test13.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test13.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test13.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test13.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,18 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="shape" type="Shape" />
+
+ <xs:complexType name="Shape">
+ <xs:sequence>
+ <xs:element name="a" type="xs:int" />
+ <xs:element name="b" type="xs:int" />
+ <xs:element name="c" type="xs:int" />
+ <xs:element name="d" type="xs:int" minOccurs="0" />
+ </xs:sequence>
+ <xs:attribute name="type" type="xs:string" use="required" />
+ <xs:assert test="if (@type eq 'square') then (a = b and b = c and c = d) else true()" />
+ <xs:assert test="if (@type eq 'rectangle') then (a = c and b = d) else true()" />
+ <xs:assert test="if (@type eq 'triangle') then not(d) else true()" />
+ </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test13.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test13.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test14.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test14.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test14.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test14.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1,3 @@
+<Example>
+ <even-number>400</even-number>
+</Example>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test14.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test14.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test14.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test14.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test14.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test14.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,19 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="Example">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="even-number">
+ <xs:simpleType>
+ <xs:restriction base="xs:int">
+ <xs:assertion test="$value mod 2 = 0" />
+ <xs:assertion test="$value lt 500" />
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ </xs:sequence>
+ <xs:assert test="even-number lt 500" />
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test14.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test14.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test19.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test19.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test19.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test19.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1,5 @@
+<Example>
+ <x a="210">101</x>
+ <x a="410">100</x>
+ <x a="640">2001</x>
+</Example>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test19.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test19.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test19.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test19.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test19.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test19.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="Example">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="x" type="X_Type" maxOccurs="unbounded" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:complexType name="X_Type">
+ <xs:simpleContent>
+ <xs:extension base="xs:int">
+ <xs:attribute name="a">
+ <xs:simpleType>
+ <xs:restriction base="xs:int">
+ <xs:assertion test="$value mod 2 = 0" />
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test19.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test19.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test2.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test2.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test2.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test2.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1,6 @@
+<XList length="4">
+ <entry>a</entry>
+ <entry>b</entry>
+ <entry>c</entry>
+ <entry>d</entry>
+</XList>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test2.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test2.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test2.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test2.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test2.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test2.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="XList" type="ArrayType"/>
+
+ <xs:complexType name="ArrayType">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="entry" type="xs:string"/>
+ </xs:sequence>
+ <xs:attribute name="length" type="xs:nonNegativeInteger"/>
+ <xs:assert test="@length eq count(./entry)"/>
+ </xs:complexType>
+
+</xs:schema>
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test2.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test2.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test23.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test23.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test23.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test23.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1 @@
+<A a="15">Element A</A>
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test23.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test23.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test23.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test23.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test23.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test23.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,23 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="A">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:restriction base="myBase">
+ <xs:assertion test="contains($value, 'Element')" />
+ <xs:assert test="@a" />
+ </xs:restriction>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:complexType name="myBase">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="a" type="xs:int" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+</xs:schema>
+
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test23.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test23.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test25.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test25.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test25.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test25.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1,6 @@
+<test>
+ <a>hello</a>
+ <b>world</b>
+ <!--<c>hello..</c>-->
+ <d>world..</d>
+</test>
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test25.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test25.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test25.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test25.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test25.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test25.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,24 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="test" type="X" />
+
+ <xs:complexType name="X">
+ <xs:group ref="List1" />
+ <xs:assert test="a and b and d" />
+ </xs:complexType>
+
+ <xs:complexType name="Y">
+ <xs:group ref="List1" />
+ <xs:assert test="a and b and c and d" />
+ </xs:complexType>
+
+ <xs:group name="List1">
+ <xs:sequence>
+ <xs:element name="a" type="xs:string" minOccurs="0"/>
+ <xs:element name="b" type="xs:string" minOccurs="0"/>
+ <xs:element name="c" type="xs:string" minOccurs="0"/>
+ <xs:element name="d" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:group>
+
+</xs:schema>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test25.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test25.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test26.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test26.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test26.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test26.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1,9 @@
+<test>
+ <a aCount="2">
+ <a1>aaa</a1>
+ <a1>aaa..</a1>
+ </a>
+ <b>world</b>
+ <!--<c>hello..</c>-->
+ <d>world..</d>
+</test>
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test26.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test26.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test26.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test26.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test26.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test26.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,32 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="test" type="X" />
+
+ <xs:complexType name="X">
+ <xs:group ref="List1" />
+ <xs:assert test="a and b and d" />
+ </xs:complexType>
+
+ <xs:complexType name="Y">
+ <xs:group ref="List1" />
+ <xs:assert test="a and b and c and d" />
+ </xs:complexType>
+
+ <xs:group name="List1">
+ <xs:sequence>
+ <xs:element name="a" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="a1" type="xs:string" maxOccurs="unbounded" />
+ </xs:sequence>
+ <xs:attribute name="aCount" type="xs:nonNegativeInteger" />
+ <xs:assert test="count(a1) eq @aCount" />
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="b" type="xs:string" minOccurs="0"/>
+ <xs:element name="c" type="xs:string" minOccurs="0"/>
+ <xs:element name="d" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:group>
+
+</xs:schema>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test26.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test26.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test27.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test27.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test27.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test27.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1,6 @@
+<product ID="100">
+ <name>kitchen sink</name>
+ <price effective="2010-03-01">11</price>
+ <price effective="2010-03-08">15</price>
+ <price effective="2010-03-15">10</price>
+</product>
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test27.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test27.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test27.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test27.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test27.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test27.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,24 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:complexType name="Product">
+ <xs:sequence>
+ <xs:element name="name" type="xs:string" />
+ <xs:element name="price" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:double">
+ <xs:attribute name="effective" type="xs:date" />
+ <xs:assert test="@effective le current-date()" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="ID" type="xs:string" />
+ <xs:assert test="every $p in price[position() lt last()] satisfies
+ (days-from-duration($p/following-sibling::price[1]/@effective - $p/@effective) eq 7)" />
+ </xs:complexType>
+
+ <xs:element name="product" type="Product" />
+
+</xs:schema>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test27.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test27.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test28.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test28.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test28.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test28.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1 @@
+<Example>8</Example>
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test28.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test28.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test28.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test28.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test28.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test28.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,17 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="Example" type="Y" />
+
+ <xs:simpleType name="Y">
+ <xs:restriction base="X">
+ <xs:assertion test="$value mod 4 = 0" />
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="X">
+ <xs:restriction base="xs:positiveInteger">
+ <xs:assertion test="$value mod 2 = 0" />
+ </xs:restriction>
+ </xs:simpleType>
+
+</xs:schema>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test28.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test28.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test29.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test29.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test29.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test29.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1 @@
+<root>hello</root>
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test29.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test29.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test29.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test29.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test29.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test29.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="root" type="rootType"/>
+
+ <xs:complexType name="rootType">
+ <xs:simpleContent>
+ <xs:restriction base="xs:anyType">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:assertion test="1=2"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:restriction>
+ </xs:simpleContent>
+ </xs:complexType>
+
+</xs:schema>
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test29.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test29.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test3.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test3.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test3.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test3.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1,8 @@
+<!-- to be validated with, test3.xsd -->
+<data>
+ <timer time="30" />
+ <parent>
+ <child name="abc" dob="1997-01-01"/>
+ <!-- <grandchild name="abc" dob="2007-01-01"/> -->
+ </parent>
+</data>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test3.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test3.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test3.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test3.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test3.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test3.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,41 @@
+<!-- demonstrates assertions on a complex type definition. this schema has a
+bigger content model, with assertions at various levels. -->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="data">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="timer" type="TimerType" />
+ <xs:element name="parent" type="ParentType" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:complexType name="TimerType">
+ <xs:attribute name="time" type="xs:int" />
+ <xs:attribute name="iterations" type="xs:int" />
+ <!-- either of attributes 'time' and 'iterations' can be present, but not both -->
+ <xs:assert test="count(@time | @iterations) = 1" />
+ </xs:complexType>
+
+ <xs:complexType name="ParentType">
+ <xs:sequence>
+ <xs:element name="child" minOccurs="0">
+ <xs:complexType>
+ <xs:attribute name="name" type="xs:string" />
+ <xs:attribute name="dob" type="xs:date" />
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="grandchild" minOccurs="0">
+ <xs:complexType>
+ <xs:attribute name="name" type="xs:string" />
+ <xs:attribute name="dob" type="xs:date" />
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ <!-- only one of 'child' or 'grandchild' element must be present, and both should
+ have 'name' and 'dob' attributes -->
+ <xs:assert test="count(child[@name and @dob] | grandchild[@name and @dob]) = 1" />
+ </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test3.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test3.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test30.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test30.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test30.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test30.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1 @@
+<root>4</root>
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test30.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test30.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test30.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test30.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test30.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test30.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,16 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="root" type="rootType" />
+
+ <xs:complexType name="rootType">
+ <xs:simpleContent>
+ <xs:restriction base="xs:anyType">
+ <xs:simpleType>
+ <xs:restriction base="xs:int">
+ <xs:assertion test="$value mod 2 = 0"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:restriction>
+ </xs:simpleContent>
+ </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test30.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test30.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test31.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test31.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test31.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test31.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1,3 @@
+<Example>
+ <List>2 4 6</List>
+</Example>
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test31.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test31.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test31.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test31.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test31.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test31.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,22 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="Example">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="List" type="INTLIST" />
+ </xs:sequence>
+ <xs:assert test="deep-equal(distinct-values(data(List)), data(List))" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:simpleType name="INTLIST">
+ <xs:list itemType="MYINT" />
+ </xs:simpleType>
+
+ <xs:simpleType name="MYINT">
+ <xs:restriction base="xs:integer">
+ <xs:assertion test="$value mod 2 = 0" />
+ </xs:restriction>
+ </xs:simpleType>
+
+</xs:schema>
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test31.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test31.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test32.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test32.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test32.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test32.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1,6 @@
+<X>
+ <x>2</x>
+ <x>4</x>
+ <x>6</x>
+ <list>1 2 3</list>
+</X>
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test32.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test32.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test32.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test32.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test32.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test32.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,25 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="X">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="x" type="MYINTEGER" maxOccurs="unbounded" />
+ <xs:element name="list">
+ <xs:simpleType>
+ <xs:list itemType="xs:integer" />
+ </xs:simpleType>
+ </xs:element>
+ </xs:sequence>
+ <xs:assert test="count(index-of(for $x in 1 to (count(data(list)) - 1) return
+ (data(list)[$x] ge data(list)[$x + 1]), true())) = 0" />
+ <xs:assert test="count(data(list)) le 5" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:simpleType name="MYINTEGER">
+ <xs:restriction base="xs:positiveInteger">
+ <xs:assertion test="$value mod 2 = 0" />
+ </xs:restriction>
+ </xs:simpleType>
+
+</xs:schema>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test32.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test32.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test33.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test33.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test33.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test33.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1 @@
+<example>44.44</example>
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test33.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test33.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test33.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test33.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test33.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test33.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="example" type="myPrecisionDecimal"/>
+
+ <xs:simpleType name="myPrecisionDecimal">
+ <xs:restriction base="xs:decimal">
+ <xs:totalDigits value="6"/>
+ <xs:fractionDigits value="4"/>
+ <xs:assertion test="string-length(substring-after(string($value), '.')) ge 2"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+</xs:schema>
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test33.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test33.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test34.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test34.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test34.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test34.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1,4 @@
+<Example>
+ <test1>111g23</test1>
+ <test2>111g234</test2>
+</Example>
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test34.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test34.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test34.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test34.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test34.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test34.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="Example">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="test1">
+ <xs:simpleType>
+ <xs:restriction xmlns:xerces="http://xerces.apache.org" base="xs:string">
+ <xs:assertion test="not($value castable as xs:positiveInteger)" xerces:message="The string must have atleast one, non-decimal character"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ <xs:element name="test2">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:pattern value=".*[^\d].*"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test34.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test34.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test35.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test35.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test35.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test35.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1 @@
+<field name="price" value="10.99" />
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test35.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test35.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test35.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test35.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test35.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test35.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="field">
+ <xs:complexType>
+ <xs:attribute name="name" type="xs:string" />
+ <xs:attribute name="value" type="xs:decimal" />
+ <xs:assert test="if (@name = 'price') then (@value gt 0) else true()" />
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
+
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test35.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test35.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test4.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test4.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test4.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test4.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1,5 @@
+<!-- to be validated with, test4.xsd -->
+<phonebill custId="XYZTelecom1001">
+ <plan>A</plan>
+ <rent>500</rent>
+</phonebill>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test4.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test4.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test4.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test4.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test4.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test4.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,19 @@
+<!-- demonstrates assertions on a complex type definition. uses multiple asserts,
+ which all must evaluate to true, for validation to succeed. -->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="phonebill">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="plan" type="xs:string" />
+ <xs:element name="rent" type="xs:integer" />
+ </xs:sequence>
+ <xs:attribute name="custId" type="xs:string" />
+ <xs:assert test="starts-with(@custId, 'XYZTelecom')" />
+ <xs:assert test="(plan = 'A' and rent = 500) or
+ (plan = 'B' and rent = 650) or
+ (plan = 'C' and rent = 1000)" />
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test4.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test4.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test40.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test40.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test40.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test40.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1,5 @@
+<Example>
+ <A>hello</A>
+ <B>hello..</B>
+ <C>hello...</C>
+</Example>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test40.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test40.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test40.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test40.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test40.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test40.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:xerces="http://xerces.apache.org">
+
+ <xs:element name="Example">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="A" type="xs:string" minOccurs="0" />
+ <xs:element name="B" type="xs:string" minOccurs="0" />
+ <xs:element name="C" type="xs:string" minOccurs="0" />
+ </xs:sequence>
+ <xs:assert test="count(*) gt 0" xerces:message="At least one of Example/* needs to be present" />
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
+
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test40.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test40.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test41.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test41.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test41.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test41.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1,6 @@
+<object type="car">
+ <field name="brand" value="Honda" />
+ <field name="price" value="5000" />
+ <field name="currency" value="USD" />
+ <field name="year" value="1996" />
+</object>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test41.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test41.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test41.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test41.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test41.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test41.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="object" type="CAR" />
+
+ <xs:complexType name="CAR">
+ <xs:complexContent>
+ <xs:extension base="OBJECT_ON_SALE">
+ <xs:assert test="field/@name = 'brand'" />
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="OBJECT_ON_SALE">
+ <xs:complexContent>
+ <xs:extension base="OBJECT">
+ <xs:assert test="if (field/@name = 'price') then
+ (field[@name = 'price']/xs:decimal(@value) gt 0 and
+ field/@name = 'currency')
+ else true()" />
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="OBJECT">
+ <xs:sequence>
+ <xs:element name="field" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:attribute name="name" type="xs:string" />
+ <xs:attribute name="value" type="xs:string" />
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="type" type="xs:string" />
+ <xs:assert test="count(field) = count(distinct-values(field/string(@name)))" />
+ </xs:complexType>
+
+</xs:schema>
+
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test41.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test41.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test42.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test42.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test42.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test42.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1,5 @@
+<List>
+ <x>2</x>
+ <x>4</x>
+ <x>6</x>
+</List>
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test42.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test42.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test42.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test42.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test42.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test42.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,19 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="List" type="LIST_TYPE" />
+
+ <xs:complexType name="LIST_TYPE">
+ <xs:sequence>
+ <xs:element name="x" type="EVEN_INTEGER" maxOccurs="unbounded" />
+ </xs:sequence>
+ <xs:assert test="deep-equal(distinct-values(data(x)), data(x))" />
+ <xs:assert test="every $x in x[position() lt last()] satisfies $x lt $x/following-sibling::x[1]" />
+ </xs:complexType>
+
+ <xs:simpleType name="EVEN_INTEGER">
+ <xs:restriction base="xs:integer">
+ <xs:assertion test="$value mod 2 = 0" />
+ </xs:restriction>
+ </xs:simpleType>
+
+</xs:schema>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test42.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test42.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test43.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test43.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test43.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test43.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1 @@
+<List>2 4 6</List>
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test43.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test43.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test43.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test43.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test43.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test43.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,18 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="List">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="INTLIST">
+ <xs:assert test="data($value) instance of xs:integer+" />
+ <xs:assert test="count(data($value)) = 3" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:simpleType name="INTLIST">
+ <xs:list itemType="xs:integer" />
+ </xs:simpleType>
+
+</xs:schema>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test43.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test43.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test44.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test44.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test44.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test44.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1,3 @@
+<X>
+ <Y/>
+</X>
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test44.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test44.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test44.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test44.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test44.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test44.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,18 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="X">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Y" type="EMPTY" />
+ </xs:sequence>
+ <xs:assert test="deep-equal($value, ())" />
+ </xs:complexType>
+ </xs:element>
+
+ <xs:complexType name="EMPTY">
+ <xs:complexContent>
+ <xs:restriction base="xs:anyType" />
+ </xs:complexContent>
+ </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test44.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test44.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test45.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test45.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test45.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test45.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,11 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="x">
+ <xs:simpleType>
+ <xs:restriction base="xs:integer">
+ <xs:assertion test="$value mod 2 = 0" />
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+
+</xs:schema>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test45.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test45.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test46.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test46.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test46.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test46.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="X" type="X_TYPE" />
+
+ <xs:complexType name="X_TYPE">
+ <xs:sequence>
+ <xs:element name="y" type="xs:string" minOccurs="0" />
+ <xs:element name="z" type="xs:string" minOccurs="0" />
+ </xs:sequence>
+ <xs:assert test="y" />
+ <xs:assert test="z" />
+ </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test46.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test46.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test46_1.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test46_1.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test46_1.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test46_1.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1,4 @@
+<X>
+ <y/>
+ <z/>
+</X>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test46_1.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test46_1.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test46_2.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test46_2.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test46_2.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test46_2.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1,3 @@
+<X>
+ <y/>
+</X>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test46_2.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test46_2.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test46_3.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test46_3.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test46_3.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test46_3.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1 @@
+<X/>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test46_3.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test46_3.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test47.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test47.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test47.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test47.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="X">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="y" type="xs:string" minOccurs="0" />
+ <xs:element name="z" type="xs:string" minOccurs="0" />
+ </xs:sequence>
+ <xs:assert test="y" />
+ <xs:assert test="z" />
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test47.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test47.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test48.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test48.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test48.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test48.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="X" type="X_TYPE" />
+
+ <xs:complexType name="X_TYPE">
+ <xs:simpleContent>
+ <xs:extension base="INTLIST">
+ <xs:attribute name="a" type="xs:string" />
+ <xs:assert test="@a" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:simpleType name="INTLIST">
+ <xs:list>
+ <xs:simpleType>
+ <xs:restriction base="xs:int">
+ <xs:assertion test="$value mod 2 = 0" />
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:list>
+ </xs:simpleType>
+
+</xs:schema>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test48.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test48.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test48_1.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test48_1.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test48_1.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test48_1.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1 @@
+<X>1 2 3</X>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test48_1.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test48_1.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test48_2.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test48_2.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test48_2.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test48_2.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1 @@
+<X a="xyz">2 4</X>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test48_2.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test48_2.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test49.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test49.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test49.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test49.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1,23 @@
+<minutes>
+ <header>
+ <date>2011-04-17</date>
+ <items>
+ <approved>3</approved>
+ <postponed>1</postponed>
+ </items>
+ </header>
+ <body>
+ <act status="approved">
+ ...
+ </act>
+ <act status="approved">
+ ...
+ </act>
+ <act status="postponed">
+ ...
+ </act>
+ <act status="approved">
+ ...
+ </act>
+ </body>
+</minutes>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test49.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test49.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test49.xsd
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test49.xsd?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test49.xsd (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test49.xsd Sun Dec 16 09:12:49 2012
@@ -0,0 +1,42 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="minutes">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="header" type="HEADER"/>
+ <xs:element name="body">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="act" type="ACT" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ <xs:assert test="every $actStatus in body/act/@status satisfies ($actStatus = header/items/*/name())" />
+ <xs:assert test="every $itm in header/items/* satisfies ($itm = count(body/act[@status = name($itm)]))"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:complexType name="HEADER">
+ <xs:sequence>
+ <xs:element name="date" type="xs:date"/>
+ <xs:element name="items">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="approved" type="xs:nonNegativeInteger" minOccurs="0"/>
+ <xs:element name="postponed" type="xs:nonNegativeInteger" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="ACT">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="status" type="xs:string"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test49.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test49.xsd
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: xerces/java/branches/xs-1.1-tests/data/assertions/test5.xml
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/test5.xml?rev=1422490&view=auto
==============================================================================
--- xerces/java/branches/xs-1.1-tests/data/assertions/test5.xml (added)
+++ xerces/java/branches/xs-1.1-tests/data/assertions/test5.xml Sun Dec 16 09:12:49 2012
@@ -0,0 +1,2 @@
+<!-- to be validated with, test5.xsd -->
+<value>100100000</value>
\ No newline at end of file
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test5.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xerces/java/branches/xs-1.1-tests/data/assertions/test5.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org