summaryrefslogtreecommitdiff
path: root/xsd/tests/clash
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2025-03-19 15:41:36 +0100
committerJörg Frings-Fürst <debian@jff.email>2025-03-19 15:41:36 +0100
commit018e1ba581ec6f01f069a45ec4cf89f152b44d5f (patch)
tree0e7dda4bb693a6714066fbe5efcd2f24ff7c1a65 /xsd/tests/clash
parent1c188393cd2e271ed2581471b601fb5960777fd8 (diff)
remerge
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>