I am a new poster to this group, so hello to you all!
Having just started a new job I have been thrown in the deep end with
some heavy XML work so I am finding my feet and I am sure that this
will be the first of many posts on here!
My first question is to do with Complex Types in XSD. I have figured
out what a complex type is, and I have found that what the API provider
is doing, is to do <xs:extension /> in a secondary set of XSDs.
What I have noticed is that at the top of the XSD in the <xs:schema />
opening tag, it says elementFormDefault="qualified" - and I was just
wondering if somebody could tell me what it is there for because I
can't find any documentation on what it does?
Many thanks in advance
"daz_oldham" <(E-Mail Removed)> writes:
> What I have noticed is that at the top of the XSD in the <xs:schema />
> opening tag, it says elementFormDefault="qualified" - and I was just
> wondering if somebody could tell me what it is there for because I
> can't find any documentation on what it does?
elementFormDefault="qualified" declaration indicates that all elements,
even local (i.e., those defined within complexType) should be qualified
in the instance documents.
Thanks Boris, I know that you're answer is spot-on but still with my
newbie hat on - what does "qualified" mean?
I know that is a very novice question, but as I say, I am really new to
Stan Kitsis [MSFT]
All "qualified" elements and attributes are in the targetNamespace of the
schema and all "unqualified" elements and attributes are in no namespace.
All global elements and attributes are qualified.
Program Manager, XML Technologies
This posting is provided "AS IS" with no warranties, and confers no rights.
"daz_oldham" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Thanks Boris, I know that you're answer is spot-on but still with my
> newbie hat on - what does "qualified" mean?
> I know that is a very novice question, but as I say, I am really new to
> all this!
> Many thanks
Stan Kitsis [MSFT]
"Qualified", in XML terms, means "Associated with a namespace, either by
the use of a declared prefix or via a default namespace declaration".
As to what elementFormDefault means: It indicates "whether or not
locally declared elements and attributes must be unqualified." See the
discussion and examples at
In XML Schema terms, in the first case, local element catalog/book belongs
to the http://www.example.com/library namespace (and therefore has to be
prefixed with the corresponding namespace prefix (lib in our case)). In
the second case, the same element does not belong to any namespace and
therefore can be used as-is in the instance document.
Element form default is kept qualified when the namespace is not needed to be hidden in the xml document or instance document .That means for all the elements in the xml document you have to prefix the namspace variable also.
All the elements in the instance document must have namespace variables prefixed with them.
Element form default is kept unqualified when the namespace needs to be hidden in the xml schema itself and need not be exposed in the instance document. That means all the elements that are used in the xml document don't have to be prefixed with the namspace variables. Only the root element has to be prefixed with the namespace variable.
Last edited by andyC; 01-18-2008 at 07:45 AM..
Reason: name not given