[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: XML Schemas: Best Practices
- From: "Roger L. Costello" <firstname.lastname@example.org>
- To: email@example.com
- Date: Mon, 19 Mar 2001 13:50:25 -0500
I would like to revisit our Best Practice on "Hide (Localize) Versus
Recall that, with respect to namespace exposure, there are two ways to
design your schema:
1. Set elementFormDefault="unqualified" to hide (localize) the namespace
complexities within the schema.
2. Set elementFormDefault="qualified" to expose in instance documents
the namespaces of all the components being used by the schema.
This all works fine when you are just using schemas that you have
created. That is, to hide (localize) namespace complexities just make
sure that all your schemas have set elementFormDefault="unqualified".
Similarly, to expose namespaces just make sure that all your schemas
have set elementFormDefault="qualified".
What about when you are using schemas that somebody else created - what
if their schema has set elementFormDefault="qualified", but you desire a
design where the namespaces of all components being used are hidden.
What do you do? It would appear that you cannot achieve your design
goal of localizing the namespace complexities within the schemas.
So, here is what I propose as Best Practice: whenever you create a
schema (or group of schemas) create TWO versions:
1. One version where all the schemas have set
2. A second version, which is IDENTICAL to the first version, except
This way, when someone else reuses your schemas they will be able to
implement either design - hide or expose.
I realize that making an identical version of all your schemas with the
only difference being the value of elementFormDefault is rather awkward,
but I see no way around this. I hope that someone can show me a better