[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Are two schemas different content models?

From: Michael Kay <mike@saxonica.com>
Date: Tue, 23 Jan 2007 12:37:34 -0000
To: <Daniel.Dui@ubs.com>, <xmlschema-dev@w3.org>
Message-ID: <005a01c73eeb$435689d0$c800a8c0@turtle>
RE: Are two schemas different content models?
If they are different schemas, then it's not a problem: you just need to be
careful about which schema is used on which occasion.
 
As soon as you try to combine them into one schema, it becomes a big
problem, because you can't have two global elements with the same name in
one schema.
 
Many tools (I guess XML Beans might well be an example) treat everything as
being one big schema, so they won't allow coexistence of the two
declarations.
 
Michael Kay
http://www.saxonica.com/


  _____  

From: xmlschema-dev-request@w3.org [mailto:xmlschema-dev-request@w3.org] On
Behalf Of Daniel.Dui@ubs.com
Sent: 23 January 2007 12:11
To: xmlschema-dev@w3.org
Subject: Are two schemas different content models?



This topic probably has come up before, but here is my question.



I have two schemas (schema1 and schema2) and one namespace (ns). The
top-level elements in the schemas have the same name (topelem), but
different types (type1 and type2).



As far as I know the schema specs forbids having two elements with the same
name and different type in the same content model. To me, two schemas are
very different content models, but tools don't seem to think so.

For example XML Beans gives an error saying that if finds a duplicate global
element if I try to compile schema1 and schema2.

Can anyone shed some light?



Many thanks in advance

-daniel
Received on Tuesday, 23 January 2007 12:37:54 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.