- From: Jeff Rafter <lists@jeffrafter.com>
- Date: Thu, 13 Apr 2006 09:48:46 -0700
- To: Oliver Kusche <oli@trip.net>
- CC: xmlschema-dev@w3.org
Oliver Kusche wrote: > > Thanks for pointing this out. I'm merely setting > elementFormDefault="unqualified" to hide namespaces from my instance > documents > so that it's not visible which component an element belongs to (making > instance > documents a lot more readable). > > So do you suggest that's not really a good practice? Well, its not really possible. Global elements are always qualified by the targetNamespace regardless of the form or elementFormDefault attributes. Now, if the targetNamespace is empty than there will be no qualification in the instance document. <Odd techincal point> Michael mentioned using Chameleon namespace design to get around this... but that won't help. As soon as a no-namespace global schema component is included into a schema that declares a targetNamespace it takes on that namespace (meaning it will need to be qualified in the instance). </Odd technical point> So in reality, if you don't want to have namespaces in your instance documents you have two choices: (1) don't use targetNamespaces in any of your XML Schemas for the document (2) don't use XML Schemas I also agree with Michael-- I have never fully understood the decision that gives us this strange situation. All the best, Jeff Rafter
Received on Thursday, 13 April 2006 16:46:38 UTC