summaryrefslogtreecommitdiff
path: root/xsd/tests/clash
diff options
context:
space:
mode:
Diffstat (limited to 'xsd/tests/clash')
-rw-r--r--xsd/tests/clash/clash.xsd25
-rw-r--r--xsd/tests/clash/foo.xsd11
2 files changed, 36 insertions, 0 deletions
diff --git a/xsd/tests/clash/clash.xsd b/xsd/tests/clash/clash.xsd
new file mode 100644
index 0000000..8458908
--- /dev/null
+++ b/xsd/tests/clash/clash.xsd
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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="http://www.codesynthesis.com/xmlns/test/bar"
+ xmlns:f="http://www.codesynthesis.com/xmlns/test/foo"
+ targetNamespace="http://www.codesynthesis.com/xmlns/test/bar">
+
+ <xsd:import namespace="http://www.codesynthesis.com/xmlns/test/foo" schemaLocation="foo.xsd"/>
+
+ <!-- example of a name clash. -->
+
+ <xsd:element name="foo" type="xsd:string"/>
+
+ <xsd:complexType name="Foo">
+ <xsd:sequence>
+ <xsd:element ref="foo"/>
+ <xsd:element name="foo" type="xsd:long"/>
+ <xsd:element ref="f:foo"/>
+ <xsd:element ref="f:foo"/>
+ </xsd:sequence>
+ <xsd:attribute name="foo" type="xsd:string"/>
+ </xsd:complexType>
+
+</xsd:schema>
diff --git a/xsd/tests/clash/foo.xsd b/xsd/tests/clash/foo.xsd
new file mode 100644
index 0000000..8a06ba8
--- /dev/null
+++ b/xsd/tests/clash/foo.xsd
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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="http://www.codesynthesis.com/xmlns/test/foo"
+ targetNamespace="http://www.codesynthesis.com/xmlns/test/foo">
+
+ <xsd:element name="foo" type="xsd:int"/>
+ <xsd:element name="bar" type="xsd:int"/>
+
+</xsd:schema>