diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2016-10-19 18:28:08 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2016-10-19 18:28:08 (GMT) |
commit | 7f402e480a04b974617c04142993d3919457d342 (patch) | |
tree | a39cf901d49b9767df3fe076ebf8a06c92277995 /libxml2/test/VC | |
parent | 818fd731f62993dc8aa5d07b82e1d1b2c04aae7d (diff) | |
parent | 6c75f0dc676d73c4cbcdca5a9cf05c6797a2ac0b (diff) | |
download | blt-7f402e480a04b974617c04142993d3919457d342.zip blt-7f402e480a04b974617c04142993d3919457d342.tar.gz blt-7f402e480a04b974617c04142993d3919457d342.tar.bz2 |
Merge commit '6c75f0dc676d73c4cbcdca5a9cf05c6797a2ac0b' as 'libxml2'
Diffstat (limited to 'libxml2/test/VC')
-rw-r--r-- | libxml2/test/VC/AttributeDefaultLegal | 12 | ||||
-rw-r--r-- | libxml2/test/VC/AttributeNmtokens | 6 | ||||
-rw-r--r-- | libxml2/test/VC/DuplicateType | 5 | ||||
-rw-r--r-- | libxml2/test/VC/ElementValid | 3 | ||||
-rw-r--r-- | libxml2/test/VC/ElementValid2 | 4 | ||||
-rw-r--r-- | libxml2/test/VC/ElementValid3 | 4 | ||||
-rw-r--r-- | libxml2/test/VC/ElementValid4 | 7 | ||||
-rw-r--r-- | libxml2/test/VC/ElementValid5 | 7 | ||||
-rw-r--r-- | libxml2/test/VC/ElementValid6 | 7 | ||||
-rw-r--r-- | libxml2/test/VC/ElementValid7 | 7 | ||||
-rw-r--r-- | libxml2/test/VC/ElementValid8 | 7 | ||||
-rw-r--r-- | libxml2/test/VC/Enumeration | 5 | ||||
-rw-r--r-- | libxml2/test/VC/NS1 | 13 | ||||
-rw-r--r-- | libxml2/test/VC/NS2 | 13 | ||||
-rw-r--r-- | libxml2/test/VC/NS3 | 9 | ||||
-rw-r--r-- | libxml2/test/VC/OneID | 6 | ||||
-rw-r--r-- | libxml2/test/VC/OneID2 | 6 | ||||
-rw-r--r-- | libxml2/test/VC/OneID3 | 4 | ||||
-rw-r--r-- | libxml2/test/VC/PENesting | 2 | ||||
-rw-r--r-- | libxml2/test/VC/PENesting2 | 3 | ||||
-rw-r--r-- | libxml2/test/VC/UniqueElementTypeDeclaration | 7 | ||||
-rw-r--r-- | libxml2/test/VC/UniqueElementTypeDeclaration2 | 8 | ||||
-rw-r--r-- | libxml2/test/VC/dtds/a.dtd | 2 | ||||
-rw-r--r-- | libxml2/test/VC/dtds/doc.dtd | 2 |
24 files changed, 149 insertions, 0 deletions
diff --git a/libxml2/test/VC/AttributeDefaultLegal b/libxml2/test/VC/AttributeDefaultLegal new file mode 100644 index 0000000..471eb20 --- /dev/null +++ b/libxml2/test/VC/AttributeDefaultLegal @@ -0,0 +1,12 @@ +<?xml version="1.0"?> +<!DOCTYPE doc [ +<!ELEMENT doc (#PCDATA)> +<!ATTLIST doc At NMTOKEN "$$$"> +<!ATTLIST doc Ok NMTOKEN "1abc_2"> +<!ATTLIST doc bad IDREF "1abc_2"> +<!ATTLIST doc ok2 IDREF "abc_2"> +<!ATTLIST doc bad2 IDREFS "abc:1 1abc_2"> +<!ATTLIST doc ok3 IDREFS "abc:1 a1bc_2"> +]> +<doc val="v1"/> + diff --git a/libxml2/test/VC/AttributeNmtokens b/libxml2/test/VC/AttributeNmtokens new file mode 100644 index 0000000..8710de4 --- /dev/null +++ b/libxml2/test/VC/AttributeNmtokens @@ -0,0 +1,6 @@ +<!DOCTYPE test [ + <!ELEMENT test EMPTY> + <!ATTLIST test attr1 NMTOKENS #IMPLIED> +]> +<!-- Should be invalid due to http://www.w3.org/XML/xml-V10-2e-errata#E20 --> +<test attr1=" a	b "/> diff --git a/libxml2/test/VC/DuplicateType b/libxml2/test/VC/DuplicateType new file mode 100644 index 0000000..4b28804 --- /dev/null +++ b/libxml2/test/VC/DuplicateType @@ -0,0 +1,5 @@ +<?xml version="1.0"?> +<!DOCTYPE a [ +<!ELEMENT a (#PCDATA | b | c | d | c)*> +]> +<a> violates [ VC: No Duplicate Types ] </a> diff --git a/libxml2/test/VC/ElementValid b/libxml2/test/VC/ElementValid new file mode 100644 index 0000000..c297ce6 --- /dev/null +++ b/libxml2/test/VC/ElementValid @@ -0,0 +1,3 @@ +<!DOCTYPE doc [ +]> +<doc/> diff --git a/libxml2/test/VC/ElementValid2 b/libxml2/test/VC/ElementValid2 new file mode 100644 index 0000000..672a0f5 --- /dev/null +++ b/libxml2/test/VC/ElementValid2 @@ -0,0 +1,4 @@ +<!DOCTYPE doc [ +<!ELEMENT doc (p)*> +]> +<doc><p/></doc> diff --git a/libxml2/test/VC/ElementValid3 b/libxml2/test/VC/ElementValid3 new file mode 100644 index 0000000..67cbab4 --- /dev/null +++ b/libxml2/test/VC/ElementValid3 @@ -0,0 +1,4 @@ +<!DOCTYPE doc [ +<!ELEMENT doc EMPTY> +]> +<doc>Oops, this element was declared EMPTY</doc> diff --git a/libxml2/test/VC/ElementValid4 b/libxml2/test/VC/ElementValid4 new file mode 100644 index 0000000..56df55a --- /dev/null +++ b/libxml2/test/VC/ElementValid4 @@ -0,0 +1,7 @@ +<!DOCTYPE doc [ +<!ELEMENT doc (#PCDATA | a | b)*> +<!ELEMENT a EMPTY> +<!ELEMENT b (#PCDATA)> +<!ELEMENT c (#PCDATA)> +]> +<doc> This <b>seems</b> Ok <a/> but this <c>was not declared</c></doc> diff --git a/libxml2/test/VC/ElementValid5 b/libxml2/test/VC/ElementValid5 new file mode 100644 index 0000000..2cef3c4 --- /dev/null +++ b/libxml2/test/VC/ElementValid5 @@ -0,0 +1,7 @@ +<!DOCTYPE doc [ +<!ELEMENT doc (a , b* , c+)> +<!ELEMENT a EMPTY> +<!ELEMENT b (#PCDATA)> +<!ELEMENT c (#PCDATA)> +]> +<doc><a/><b> but this</b><c>was not declared</c><b>seems</b></doc> diff --git a/libxml2/test/VC/ElementValid6 b/libxml2/test/VC/ElementValid6 new file mode 100644 index 0000000..fbf721d --- /dev/null +++ b/libxml2/test/VC/ElementValid6 @@ -0,0 +1,7 @@ +<!DOCTYPE doc [ +<!ELEMENT doc (a , b? , c+)?> +<!ELEMENT a EMPTY> +<!ELEMENT b (#PCDATA)> +<!ELEMENT c (#PCDATA)> +]> +<doc><a/><b>lacks c</b></doc> diff --git a/libxml2/test/VC/ElementValid7 b/libxml2/test/VC/ElementValid7 new file mode 100644 index 0000000..a88115f --- /dev/null +++ b/libxml2/test/VC/ElementValid7 @@ -0,0 +1,7 @@ +<!DOCTYPE doc [ +<!ELEMENT doc ((a | b)* , c+, a, b?, c, a?)> +<!ELEMENT a EMPTY> +<!ELEMENT b (#PCDATA)> +<!ELEMENT c (#PCDATA)> +]> +<doc><a/><b/><a/><c/><c/><a/></doc> diff --git a/libxml2/test/VC/ElementValid8 b/libxml2/test/VC/ElementValid8 new file mode 100644 index 0000000..5fd2044 --- /dev/null +++ b/libxml2/test/VC/ElementValid8 @@ -0,0 +1,7 @@ +<!DOCTYPE doc [ +<!ELEMENT doc ((a, b)| (a, c))> +<!ELEMENT a EMPTY> +<!ELEMENT b (#PCDATA)> +<!ELEMENT c (#PCDATA)> +]> +<doc><a/><c> doc is non-deterministic </c></doc> diff --git a/libxml2/test/VC/Enumeration b/libxml2/test/VC/Enumeration new file mode 100644 index 0000000..6c63968 --- /dev/null +++ b/libxml2/test/VC/Enumeration @@ -0,0 +1,5 @@ +<!DOCTYPE doc [ +<!ELEMENT doc (#PCDATA)> +<!ATTLIST doc val (v1 | v2 | v3) #IMPLIED> +]> +<doc val="v4"></doc> diff --git a/libxml2/test/VC/NS1 b/libxml2/test/VC/NS1 new file mode 100644 index 0000000..2f74463 --- /dev/null +++ b/libxml2/test/VC/NS1 @@ -0,0 +1,13 @@ +<!DOCTYPE ns:doc [ +<!ELEMENT ns:doc (#PCDATA | ns:a | ns:b)*> +<!ATTLIST ns:doc + ns:attr CDATA #REQUIRED + xmlns:ns CDATA #IMPLIED> +<!ELEMENT ns:a EMPTY> +<!ELEMENT ns:b (#PCDATA)> +]> +<ns:doc ns:attr="val" xmlns:ns="http://www.example.org/test/"> + <ns:a/> + <ns:b>first line</ns:b> + <ns:b>second line</ns:b> +</ns:doc> diff --git a/libxml2/test/VC/NS2 b/libxml2/test/VC/NS2 new file mode 100644 index 0000000..d748d1a --- /dev/null +++ b/libxml2/test/VC/NS2 @@ -0,0 +1,13 @@ +<!DOCTYPE doc [ +<!ELEMENT doc (#PCDATA | ns:a | ns:b)*> +<!ATTLIST doc + attr CDATA #REQUIRED + xmlns:ns CDATA #IMPLIED> +<!ELEMENT a EMPTY> +<!ELEMENT b (#PCDATA)> +]> +<ns:doc ns:attr="val" xmlns:ns="http://www.example.org/test/"> + <ns:a/> + <ns:b>first line</ns:b> + <ns:b>second line</ns:b> +</ns:doc> diff --git a/libxml2/test/VC/NS3 b/libxml2/test/VC/NS3 new file mode 100644 index 0000000..f53b0ca --- /dev/null +++ b/libxml2/test/VC/NS3 @@ -0,0 +1,9 @@ +<?xml version="1.0" ?> +<!DOCTYPE foo [ +<!ELEMENT foo EMPTY> +<!ATTLIST foo + xmlns CDATA #FIXED "http://example.com/fooo" + xmlns:foo CDATA #REQUIRED + foo:info CDATA #IMPLIED> +]> +<foo xmlns="http://example.com/foo" xmlns:foo="http://example.com/fo" foo:info="toto"/> diff --git a/libxml2/test/VC/OneID b/libxml2/test/VC/OneID new file mode 100644 index 0000000..e9cbc0c --- /dev/null +++ b/libxml2/test/VC/OneID @@ -0,0 +1,6 @@ +<!DOCTYPE doc [ +<!ELEMENT doc (#PCDATA)> +<!ATTLIST doc val ID #IMPLIED> +<!ATTLIST doc id ID #IMPLIED> +]> +<doc val="v1"></doc> diff --git a/libxml2/test/VC/OneID2 b/libxml2/test/VC/OneID2 new file mode 100644 index 0000000..ffa9d1f --- /dev/null +++ b/libxml2/test/VC/OneID2 @@ -0,0 +1,6 @@ +<!DOCTYPE doc [ +<!ATTLIST doc val ID #IMPLIED> +<!ATTLIST doc id ID #IMPLIED> +<!ELEMENT doc (#PCDATA)> +]> +<doc val="v1"></doc> diff --git a/libxml2/test/VC/OneID3 b/libxml2/test/VC/OneID3 new file mode 100644 index 0000000..9696736 --- /dev/null +++ b/libxml2/test/VC/OneID3 @@ -0,0 +1,4 @@ +<!DOCTYPE doc SYSTEM "dtds/doc.dtd" [ +<!ATTLIST doc id ID #IMPLIED> +]> +<doc val="v1"></doc> diff --git a/libxml2/test/VC/PENesting b/libxml2/test/VC/PENesting new file mode 100644 index 0000000..17332ae --- /dev/null +++ b/libxml2/test/VC/PENesting @@ -0,0 +1,2 @@ +<!ENTITY % pe1 "EMPTY> <!ELEMENT e2 EMPTY>"> +<!ELEMENT e1 %pe1; diff --git a/libxml2/test/VC/PENesting2 b/libxml2/test/VC/PENesting2 new file mode 100644 index 0000000..27b0cca --- /dev/null +++ b/libxml2/test/VC/PENesting2 @@ -0,0 +1,3 @@ +<!ENTITY % p1 "(A|B"> +<!ENTITY % p2 "|C|D)"> +<!ELEMENT X %p1;%p2;> diff --git a/libxml2/test/VC/UniqueElementTypeDeclaration b/libxml2/test/VC/UniqueElementTypeDeclaration new file mode 100644 index 0000000..2246f17 --- /dev/null +++ b/libxml2/test/VC/UniqueElementTypeDeclaration @@ -0,0 +1,7 @@ +<?xml version="1.0"?> +<!DOCTYPE a SYSTEM "dtds/a.dtd" [ +<!ELEMENT a (#PCDATA | b | c)*> +<!ELEMENT b (#PCDATA)> +<!ELEMENT c (#PCDATA)> +]> +<a> violates [ VC: Unique Element Type Declaration ] </a> diff --git a/libxml2/test/VC/UniqueElementTypeDeclaration2 b/libxml2/test/VC/UniqueElementTypeDeclaration2 new file mode 100644 index 0000000..0805f8d --- /dev/null +++ b/libxml2/test/VC/UniqueElementTypeDeclaration2 @@ -0,0 +1,8 @@ +<?xml version="1.0"?> +<!DOCTYPE a [ +<!ELEMENT a (#PCDATA | b | c)*> +<!ELEMENT b (#PCDATA)> +<!ELEMENT c (#PCDATA)> +<!ELEMENT a (#PCDATA | b | c)*> +]> +<a> violates [ VC: Unique Element Type Declaration ] </a> diff --git a/libxml2/test/VC/dtds/a.dtd b/libxml2/test/VC/dtds/a.dtd new file mode 100644 index 0000000..b8571a4 --- /dev/null +++ b/libxml2/test/VC/dtds/a.dtd @@ -0,0 +1,2 @@ +<!ELEMENT a (#PCDATA | b | c)*> +<!ATTLIST doc id ID #IMPLIED> diff --git a/libxml2/test/VC/dtds/doc.dtd b/libxml2/test/VC/dtds/doc.dtd new file mode 100644 index 0000000..71f8b41 --- /dev/null +++ b/libxml2/test/VC/dtds/doc.dtd @@ -0,0 +1,2 @@ +<!ELEMENT doc (#PCDATA)> +<!ATTLIST doc val ID #IMPLIED> |