|
Re: Generating partial schemas: msg#00068text.xml.xmlbeans.user
It turns out I wasn't completely accurate. When the schema of the add-on project sits in its own namespace and imports the schema of the main project, then xmlbeans does not download the main schema and compiles only the elements in the add-on schema. Alternatively, when the schema of the add-on project sits in the same namespace as the main project and includes the schema from the main project, then xmlbeans does download, process and compile the elements from the main project. Hence, xmlbeans appears to follow includes, but not imports. Because I want the add-on project to use its own namespace, I use <import>, causing xmlbeans to skip stub generation for the imported elements. Unfortunately, when I later try to parse an xml file that uses elements from both namespaces (having the generated classes of both projects in the classpath), xmlbeans complains the xml is not valid: [error: cvc-complex-type.2.4a: Expected element "value@http://xmlmath.org/1.0" instead of "now@http://xmlmath.org/1.0/date" here in element equals@http://xmlmath.org/1.0] The above shouldn't fail as the "equals" element is declared to contain child elements of type "value" and element "now" extends from "value" (if it's helpful I can attach the schemas). I'm not sure why xmlbeans rejects the xml, but I suppose it has to do with the fact that the stubs from one namespace were generated independently from the stubs in the other namespace. regards, Erik van Zijst Erik van Zijst wrote: Folks, |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: blank namespace: 00068, gopi.rcr |
|---|---|
| Next by Date: | RE: blank namespace: 00068, Webber, David \(NIH/OD\) [C] |
| Previous by Thread: | Generating partial schemasi: 00068, Erik van Zijst |
| Next by Thread: | RE: Generating partial schemas: 00068, Radu Preotiuc-Pietro |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |