DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5663>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5663 Incorrect assignment to namespace Summary: Incorrect assignment to namespace Product: Xerces-J Version: 1.4.4 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: Schema-Structures AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] When I reference from my namespace a group defined in another namespace, the elements in the group are incorrectly treated as if they had been declared in my namespace. (See http://lists.w3.org/Archives/Public/xmlschema- dev/2002Jan/0007.html and the response http://lists.w3.org/Archives/Public/xmlschema-dev/2002Jan/0008.html) Here is a base schema: <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:jdf="http://www.CIP4.org/JDFSchema_1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="http://www.CIP4.org/JDFSchema_1" elementFormDefault="qualified" attributeFormDefault="unqualified"> <element name="Comment" type="string"/> <group name="GenericElements"> <sequence> <element ref="jdf:Comment" minOccurs="0"/> <any namespace="##other" processContents="lax" minOccurs="0"/> </sequence> </group> <group name="JDFChildElements_"> <sequence> <group ref="jdf:GenericElements" minOccurs="0"/> <element name="AncestorPool" type="string" minOccurs="0"/> <element name="AuditPool" type="string" minOccurs="0"/> <element name="CustomerInfo" type="string" minOccurs="0"/> <element name="NodeInfo" type="string" minOccurs="0"/> <element name="ResourcePool" type="string" minOccurs="0"/> <element name="StatusPool" type="string" minOccurs="0"/> <element ref="jdf:JDF" minOccurs="0"/> </sequence> </group> <complexType name="JDFBaseType_" abstract="true"> <attribute name="Activation" type="NMTOKEN" use="optional"/> <attribute name="ID" type="ID" use="required"/> <attribute name="JobID" type="string" use="optional"/> <attribute name="JobPartID" type="string" use="optional"/> <attribute name="Status" type="NMTOKEN" use="required"/> <attribute name="Types" type="NMTOKENS" use="optional"/> </complexType> <element name="JDF" type="jdf:JDFBaseType_"/> </schema> Here is my extension schema: <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:jdf="http://www.CIP4.org/JDFSchema_1" targetNamespace="http://www.xerox.com/XMLSchemas/Services/EmailDistMsgLayer" xmlns:em="http://www.xerox.com/XMLSchemas/Services/EmailDistMsgLayer"> <import namespace="http://www.CIP4.org/JDFSchema_1" schemaLocation="namespaceTestBase.xsd"/> <!-- The EmailDistribution Process definition --> <complexType name="EmailDistribution"> <complexContent> <extension base="jdf:JDFBaseType_"> <sequence minOccurs="0" maxOccurs="unbounded"> <!-- Unresolved debate on XMLSchema-Dev about whether there should be ambiguous content model error here because of <any namespace="##other"/> and local ResourceLinkPool --> <group ref="jdf:JDFChildElements_"/> <element name="ResourceLinkPool" type="string" minOccurs="0"/> </sequence> <attribute name="Type" type="NMTOKEN" use="required"/> </extension> </complexContent> </complexType> </schema> Here is an instance document: <?xml version="1.0" encoding="utf-8" ?> <jdf:JDF ID="n01" Type="em:EmailDistribution" JobID="job0938-a23" Status="Waiting" xmlns:jdf="http://www.CIP4.org/JDFSchema_1" xmlns:em="http://www.xerox.com/XMLSchemas/Services/EmailDistMsgLayer" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.CIP4.org/JDFSchema_1 namespaceTestBase.xsd http://www.xerox.com/XMLSchemas/Services/EmailDistMsgLayer namespaceTestExt.xsd" xsi:type="em:EmailDistribution"> <jdf:ResourcePool>Some resources</jdf:ResourcePool> <ResourceLinkPool>Some resource links</ResourceLinkPool> </jdf:JDF> When I run: java dom.DOMWriter -f -v namespaceTestInst.xml I get a slew of Unique Particle Attribution rule errors that should not be there if the elements in the group were correctly assigned to the jdf: namespace (and the wildcard were correctly treated as declared from the jdf: namespace). --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
