Return-Path: Delivered-To: apmail-xml-xerces-c-dev-archive@www.apache.org Received: (qmail 718 invoked from network); 4 Mar 2004 18:53:24 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 4 Mar 2004 18:53:24 -0000 Received: (qmail 65939 invoked by uid 500); 4 Mar 2004 18:53:12 -0000 Delivered-To: apmail-xml-xerces-c-dev-archive@xml.apache.org Received: (qmail 65915 invoked by uid 500); 4 Mar 2004 18:53:12 -0000 Mailing-List: contact xerces-c-dev-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: xerces-c-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list xerces-c-dev@xml.apache.org Received: (qmail 65890 invoked from network); 4 Mar 2004 18:53:12 -0000 Received: from unknown (HELO exchange.sun.com) (192.18.33.10) by daedalus.apache.org with SMTP; 4 Mar 2004 18:53:12 -0000 Received: (qmail 515 invoked by uid 50); 4 Mar 2004 18:53:43 -0000 Date: 4 Mar 2004 18:53:43 -0000 Message-ID: <20040304185343.514.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: xerces-c-dev@xml.apache.org Cc: Subject: DO NOT REPLY [Bug 27450] New: - Validating against schemas importing other schemas X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . 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=27450 Validating against schemas importing other schemas Summary: Validating against schemas importing other schemas Product: Xerces-C++ Version: 2.5.0 Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: Validating Parser (Schema) (Xerces 1.5 or up only) AssignedTo: xerces-c-dev@xml.apache.org ReportedBy: fp@mc.com CC: fp@mc.com I am using Xerces-C 2.5.0 on Windows (VC++ 6), but the problem should be independent of the platform. I have a schema "A" that imports types from another schema "B", so at the top of A.xsd, I declare the B namespace, and import it, as [...] Now, when I parse a document with validation enabled, Xerces reports an error (via my error handler) saying "Schema Representation Constraint: Namespace 'http://foo/B' is referenced without declaration. The error disappears if I change the above import statement, in the "A" schema, to include a schemaLocation: I do not want to hardcode locations in a schema. Instead, I tried to supply the schema location in the XML document (as xsi:schemaLocation), but that didn't help. I also unsuccessfully tried to provide the schema location via the "XercesSchemaExternalSchemaLocation" property. A full test case is attached: test.cpp tries to parse the "test.xml" document, which uses the schema "A.xsd", which imports "B.xsd" and uses one of its attributes. When run, the test program should print, from its DOMErrorHandler, the message Error: /A.xsd: Schema Representation Constraint: Namespace 'http://foo/B' is referenced without declaration I would expect the test program to succeed with no errors being reported. Thank you, Frank --------------------------------------------------------------------- To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org For additional commands, e-mail: xerces-c-dev-help@xml.apache.org