Nesting XML elements from different namespaces in XSD
问题 Assume that I have an XML schema definition for elements of a namespace that I would like to use as child elements of XML elements within a second namespace. As an example, suppose we have file foo.xsd : <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns="urn:foo-ns" targetNamespace="urn:foo-ns" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:element name="foo" type="fooType"/> <xs:complexType name="fooType"> <xs:attribute name="id" use="required"/> </xs