Original Message:
-----------------
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Mon, 8 Oct 2001 20:04:48 -0400
To: [EMAIL PROTECTED]
Subject: RE: include order
Sorry for the delay,
The error messages we are recieving are in the form of ....
[Error] :2:142: Schema error: untyped element : From.
[Error] :2:142: Schema error: type not found : urn:aseXML:r6:PartyIdentifier.
[Error] :2:142: Schema error: untyped element : To.
[Error] :2:142: Schema error: type not found : urn:aseXML:r6:JurisdictionCode.
[Error] :2:142: Schema error: untyped element : JurisdictionCode.
[Error] :2:142: Schema error: type not found :
urn:aseXML:r6:NMIClassificationCode.
[Error] :2:142: Schema error: untyped element : NMIClassificationCode.
[Error] :2:142: Schema error: type not found : urn:aseXML:r6:AustralianAddress.
[Error] :2:142: Schema error: untyped element : Address.
These errors look as if the types have not been included when they were
generated.
I suspect that the problem is to do with the include order in the XML Schema.
For example...(ignoring the very bad psudo code)
We have the following files.
Transactions.xsd
include TransactionFile1
include Transactionfile2
TransactionFile1.xsd
define complextype transaction1_1
Use complex type Transaction2_1
define complextype transaction1_2
Use complex type transaction 2_2
define complextype transaction1_3
use complex type 2_3
Transactionfile2.xsd
define complextype transaction2_1
Use complex type Transaction1_1
define complextype transaction2_2
Use complex type transaction 1_2
define complextype transaction2_3
use complex type 1_3
Trying something like this under XML spy works fine. In fact, that is where the
schema was generated.
Under xerces, we get the above errors. Thats using the examples provided for
both SAX and DOM.
What we think is happening under xerces is that TransactionFile1 is loaded and
checked. Since Transaction2_1 hasn't been defined. It throws an error.
If we do the following...
TransactionFile1.xsd
define complextype transaction1_1
Use complex type Transaction2_1
define complextype transaction1_2
Use complex type transaction 2_2
define complextype transaction1_3
use complex type 2_3
define complextype transaction2_1
Use complex type Transaction1_1
define complextype transaction2_2
Use complex type transaction 1_2
define complextype transaction2_3
use complex type 1_3
Then everything works fine as they are all defined in the same file, but this
isn't an option as the schema has been defined by a third party that we have no
control over.
What we suspect that XMLSpy is doing, is it reads in all the files, and
generates its own internal structure to include everything.
We thought DOM did this, but with the DOM example, we still get the same errors.
Any ideas???
Thanks
Holger
-----Original Message-----
From: Xuemin Guan [mailto:[EMAIL PROTECTED]
Sent: Friday, 5 October 2001 3:48 PM
To: [EMAIL PROTECTED]
Subject: Re: include order
It would be helpful if you include the error message and the relevant
snippet of code/document.
Regards,
At 01:44 01/10/05 -0400, you wrote:
>We are having a problem with parsing and validation with xerces. Its
>rejecting an xsd and we think its because of the include order of the
>schema files.
>
>We have the feeling that xerces reads a file, resolves the file then
>reads the next file etc.
>
>Is this true, and if so, is it possible to set things up so the whole
>schema is loaded into memory and then resolved (quickly and easily).
>
>
>Thanks
>
>Holger
>
>
>--------------------------------------------------------------------
>mail2web - Check your email from the web at
>http://mail2web.com/ .
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
-------
Xuemin Guan
Software Engineer
Appresso SpA (www.appresso.com)
Tel: +81-3-4412-7790(Direct)
+81-3-4412-7700(Represent)
Email: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]