summaryrefslogtreecommitdiff
path: root/xsd-tests/schema/any-attribute
diff options
context:
space:
mode:
Diffstat (limited to 'xsd-tests/schema/any-attribute')
-rw-r--r--xsd-tests/schema/any-attribute/buildfile12
-rw-r--r--xsd-tests/schema/any-attribute/test.xsd22
-rw-r--r--xsd-tests/schema/any-attribute/testscript8
3 files changed, 42 insertions, 0 deletions
diff --git a/xsd-tests/schema/any-attribute/buildfile b/xsd-tests/schema/any-attribute/buildfile
new file mode 100644
index 0000000..e4275a4
--- /dev/null
+++ b/xsd-tests/schema/any-attribute/buildfile
@@ -0,0 +1,12 @@
+# file : schema/any-attribute/buildfile
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+# Test that the invalid schema files compilation expectedly fails.
+#
+./: testscript xsd{*} $xsd
+
+testscript{*}:
+{
+ test = $xsd
+ test.arguments = cxx-tree --std c++11
+}
diff --git a/xsd-tests/schema/any-attribute/test.xsd b/xsd-tests/schema/any-attribute/test.xsd
new file mode 100644
index 0000000..55419c4
--- /dev/null
+++ b/xsd-tests/schema/any-attribute/test.xsd
@@ -0,0 +1,22 @@
+<?xml version="1.0" ?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.w3.org/2001/XMLSchema XMLSchema.xsd"
+ xmlns:test="http://www.codesynthesis.com/xmlns/test"
+ targetNamespace="http://www.codesynthesis.com/xmlns/test">
+
+
+ <xsd:complexType name="type">
+ <xsd:attribute name="a" type="xsd:string"/>
+ <xsd:anyAttribute namespace="##other" processContents="skip"/>
+ <xsd:attributeGroup ref="test:agroup"/>
+ </xsd:complexType>
+
+ <xsd:attributeGroup name="agroup">
+ <xsd:attribute name="b" type="xsd:string"/>
+ <xsd:anyAttribute namespace="##any" processContents="skip"/>
+ </xsd:attributeGroup>
+
+ <xsd:element name="root" type="test:type"/>
+
+</xsd:schema>
diff --git a/xsd-tests/schema/any-attribute/testscript b/xsd-tests/schema/any-attribute/testscript
new file mode 100644
index 0000000..d9da7c1
--- /dev/null
+++ b/xsd-tests/schema/any-attribute/testscript
@@ -0,0 +1,8 @@
+# file : schema/any-attribute/testscript
+# license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+: decl-after-any-attribute
+:
+$* --output-dir $~ $src_base/test.xsd 2>>/"EOE" != 0
+ $src_base/test.xsd:12:44: error: anyAttribute must not be followed by other declarations
+ EOE