K
klem s
I plan to start learning WCF, so I thought it might be useful if I
learn some basics about xml and Xml Schemas. Anyways, the following
questions are not about how or what global/local declarations are, or
how to use them correctly
a) Why must global element and attribute declarations always belong to
a namespace and as such must always be qualified within instance
documents ( here I’m assuming that the concepts “belonging to a
namespace” and “qualified within instance documents” are interrelated,
similarly to the way the concepts “I exist” and “talking about me” are
interrelated ( I apologize for the bad analogy ) )
b) Are local element/attribute declarations ( with their form
attributes set to unqualified) still part of a schema’s target
namespace, even though they aren’t associated with any namespace in
instance documents?
c) Even if type/group declaration is global, it is still part of the
target namespace and thus when referring to global declarations we
must include the target namespace prefix.
Anyways, is there a particular reason why global declarations are part
of a target namespace while local declarations aren’t? Namely, even if
global type/group declarations wouldn’t belong to a target namespace,
we could still refer to them within our Xml Schema, so there must be
other benefits for them to be part of a namespace?!
d) Are local type declarations also members of Xml Schema’s target
namespace? If so, why? Namely, they are not referenced from instance
documents or other Xml Schemas, so what is the purpose/benefit of them
being a member of a target namespace?
And BTW – what exactly is it meant by saying that local type
declaration belongs to a namespace? Perhaps that when app or Xml
Schema validator is processing this schema S ( with targetNamespace
set to “www.something.com” ), it IDs each local type declaration by
generating some string ( say localType1 ) and appending it to target
namespace – getting a name similar to www.something.com. localType1?
And if this app or validator at some point needs to reference this
type declaration, it uses the name www.something.com. localType1?
Thank you
learn some basics about xml and Xml Schemas. Anyways, the following
questions are not about how or what global/local declarations are, or
how to use them correctly
a) Why must global element and attribute declarations always belong to
a namespace and as such must always be qualified within instance
documents ( here I’m assuming that the concepts “belonging to a
namespace” and “qualified within instance documents” are interrelated,
similarly to the way the concepts “I exist” and “talking about me” are
interrelated ( I apologize for the bad analogy ) )
b) Are local element/attribute declarations ( with their form
attributes set to unqualified) still part of a schema’s target
namespace, even though they aren’t associated with any namespace in
instance documents?
c) Even if type/group declaration is global, it is still part of the
target namespace and thus when referring to global declarations we
must include the target namespace prefix.
Anyways, is there a particular reason why global declarations are part
of a target namespace while local declarations aren’t? Namely, even if
global type/group declarations wouldn’t belong to a target namespace,
we could still refer to them within our Xml Schema, so there must be
other benefits for them to be part of a namespace?!
d) Are local type declarations also members of Xml Schema’s target
namespace? If so, why? Namely, they are not referenced from instance
documents or other Xml Schemas, so what is the purpose/benefit of them
being a member of a target namespace?
And BTW – what exactly is it meant by saying that local type
declaration belongs to a namespace? Perhaps that when app or Xml
Schema validator is processing this schema S ( with targetNamespace
set to “www.something.com” ), it IDs each local type declaration by
generating some string ( say localType1 ) and appending it to target
namespace – getting a name similar to www.something.com. localType1?
And if this app or validator at some point needs to reference this
type declaration, it uses the name www.something.com. localType1?
Thank you