diff options
Diffstat (limited to 'test/VC')
-rw-r--r-- | test/VC/AttributeDefaultLegal | 12 | ||||
-rw-r--r-- | test/VC/DuplicateType | 5 | ||||
-rw-r--r-- | test/VC/ElementValid | 3 | ||||
-rw-r--r-- | test/VC/ElementValid2 | 4 | ||||
-rw-r--r-- | test/VC/ElementValid3 | 4 | ||||
-rw-r--r-- | test/VC/ElementValid4 | 7 | ||||
-rw-r--r-- | test/VC/ElementValid5 | 7 | ||||
-rw-r--r-- | test/VC/ElementValid6 | 7 | ||||
-rw-r--r-- | test/VC/ElementValid7 | 7 | ||||
-rw-r--r-- | test/VC/Enumeration | 5 | ||||
-rw-r--r-- | test/VC/OneID | 6 | ||||
-rw-r--r-- | test/VC/OneID2 | 6 | ||||
-rw-r--r-- | test/VC/OneID3 | 4 | ||||
-rw-r--r-- | test/VC/PENesting | 2 | ||||
-rw-r--r-- | test/VC/PENesting2 | 3 | ||||
-rw-r--r-- | test/VC/UniqueElementTypeDeclaration | 7 | ||||
-rw-r--r-- | test/VC/UniqueElementTypeDeclaration2 | 8 | ||||
-rw-r--r-- | test/VC/dtds/a.dtd | 2 | ||||
-rw-r--r-- | test/VC/dtds/doc.dtd | 2 |
19 files changed, 101 insertions, 0 deletions
diff --git a/test/VC/AttributeDefaultLegal b/test/VC/AttributeDefaultLegal new file mode 100644 index 00000000..471eb201 --- /dev/null +++ b/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/test/VC/DuplicateType b/test/VC/DuplicateType new file mode 100644 index 00000000..4b288048 --- /dev/null +++ b/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/test/VC/ElementValid b/test/VC/ElementValid new file mode 100644 index 00000000..c297ce63 --- /dev/null +++ b/test/VC/ElementValid @@ -0,0 +1,3 @@ +<!DOCTYPE doc [ +]> +<doc/> diff --git a/test/VC/ElementValid2 b/test/VC/ElementValid2 new file mode 100644 index 00000000..672a0f52 --- /dev/null +++ b/test/VC/ElementValid2 @@ -0,0 +1,4 @@ +<!DOCTYPE doc [ +<!ELEMENT doc (p)*> +]> +<doc><p/></doc> diff --git a/test/VC/ElementValid3 b/test/VC/ElementValid3 new file mode 100644 index 00000000..67cbab48 --- /dev/null +++ b/test/VC/ElementValid3 @@ -0,0 +1,4 @@ +<!DOCTYPE doc [ +<!ELEMENT doc EMPTY> +]> +<doc>Oops, this element was declared EMPTY</doc> diff --git a/test/VC/ElementValid4 b/test/VC/ElementValid4 new file mode 100644 index 00000000..56df55a2 --- /dev/null +++ b/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/test/VC/ElementValid5 b/test/VC/ElementValid5 new file mode 100644 index 00000000..2cef3c49 --- /dev/null +++ b/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/test/VC/ElementValid6 b/test/VC/ElementValid6 new file mode 100644 index 00000000..fbf721dc --- /dev/null +++ b/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/test/VC/ElementValid7 b/test/VC/ElementValid7 new file mode 100644 index 00000000..a88115f3 --- /dev/null +++ b/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/test/VC/Enumeration b/test/VC/Enumeration new file mode 100644 index 00000000..6c639680 --- /dev/null +++ b/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/test/VC/OneID b/test/VC/OneID new file mode 100644 index 00000000..e9cbc0c8 --- /dev/null +++ b/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/test/VC/OneID2 b/test/VC/OneID2 new file mode 100644 index 00000000..ffa9d1fa --- /dev/null +++ b/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/test/VC/OneID3 b/test/VC/OneID3 new file mode 100644 index 00000000..96967360 --- /dev/null +++ b/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/test/VC/PENesting b/test/VC/PENesting new file mode 100644 index 00000000..17332ae8 --- /dev/null +++ b/test/VC/PENesting @@ -0,0 +1,2 @@ +<!ENTITY % pe1 "EMPTY> <!ELEMENT e2 EMPTY>"> +<!ELEMENT e1 %pe1; diff --git a/test/VC/PENesting2 b/test/VC/PENesting2 new file mode 100644 index 00000000..27b0cca2 --- /dev/null +++ b/test/VC/PENesting2 @@ -0,0 +1,3 @@ +<!ENTITY % p1 "(A|B"> +<!ENTITY % p2 "|C|D)"> +<!ELEMENT X %p1;%p2;> diff --git a/test/VC/UniqueElementTypeDeclaration b/test/VC/UniqueElementTypeDeclaration new file mode 100644 index 00000000..2246f177 --- /dev/null +++ b/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/test/VC/UniqueElementTypeDeclaration2 b/test/VC/UniqueElementTypeDeclaration2 new file mode 100644 index 00000000..0805f8dc --- /dev/null +++ b/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/test/VC/dtds/a.dtd b/test/VC/dtds/a.dtd new file mode 100644 index 00000000..b8571a4f --- /dev/null +++ b/test/VC/dtds/a.dtd @@ -0,0 +1,2 @@ +<!ELEMENT a (#PCDATA | b | c)*> +<!ATTLIST doc id ID #IMPLIED> diff --git a/test/VC/dtds/doc.dtd b/test/VC/dtds/doc.dtd new file mode 100644 index 00000000..71f8b412 --- /dev/null +++ b/test/VC/dtds/doc.dtd @@ -0,0 +1,2 @@ +<!ELEMENT doc (#PCDATA)> +<!ATTLIST doc val ID #IMPLIED> |