diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-10-11 12:43:48 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-10-11 12:43:48 +0200 |
commit | 9553149aa6b6561c49981adf2848607a43765054 (patch) | |
tree | ff941ad89aa2c87ec5ddbd7a7bdd189fc33f87ba /tests/cxx/hybrid/pattern/test.xsd | |
parent | 0dd6d623af5dfe3590d0c269f76a2fa322e75e58 (diff) |
Support for validation of the pattern facet
New test: hybrid/pattern.
Diffstat (limited to 'tests/cxx/hybrid/pattern/test.xsd')
-rw-r--r-- | tests/cxx/hybrid/pattern/test.xsd | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/tests/cxx/hybrid/pattern/test.xsd b/tests/cxx/hybrid/pattern/test.xsd new file mode 100644 index 0000000..e008709 --- /dev/null +++ b/tests/cxx/hybrid/pattern/test.xsd @@ -0,0 +1,53 @@ +<?xml version="1.0"?> +<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:t="test" targetNamespace="test"> + + <simpleType name="t1"> + <restriction base="string"> + <pattern value="foo.*baz"/> + </restriction> + </simpleType> + + <simpleType name="t2"> + <restriction base="string"> + <pattern value="([123]+,)+"/> + </restriction> + </simpleType> + + <simpleType name="t3"> + <restriction base="string"> + <pattern value="[1-9]*"/> + </restriction> + </simpleType> + + <simpleType name="t4"> + <restriction base="string"> + <pattern value="\d+"/> + </restriction> + </simpleType> + + <simpleType name="t5"> + <restriction base="string"> + <pattern value="\s+"/> + </restriction> + </simpleType> + + <simpleType name="t6"> + <restriction base="string"> + <pattern value="\w+"/> + </restriction> + </simpleType> + + <complexType name="type"> + <sequence> + <element name="t1" type="t:t1" maxOccurs="unbounded"/> + <element name="t2" type="t:t2" maxOccurs="unbounded"/> + <element name="t3" type="t:t3" maxOccurs="unbounded"/> + <element name="t4" type="t:t4" maxOccurs="unbounded"/> + <element name="t5" type="t:t5" maxOccurs="unbounded"/> + <element name="t6" type="t:t6" maxOccurs="unbounded"/> + </sequence> + </complexType> + + <element name="root" type="t:type"/> + +</schema> |