Declarations within Xml Schema

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
 
K

klem s

klem said:
I plan to start learning WCF, so I thought it might be useful if I
learn some basics  about xml and Xml Schemas. [...]

Just because WCF may use XML, that doesn't really mean your question has
anything to do with C# or even .NET.

You will probably have more success getting your question answered in
the most useful way by posting it to a forum where questions about using
XML, XSD, and related technologies are actually on-topic.

Pete

I tried at stack overflow, but I didn’t get the explanation I was
hoping for. I checked other xml forums and they are crappy ( in my
opinion) , since 60+ percent of questions don’t get answered and those
that do consist of replies no longer than few sentences. So my
questions don’t stand a chance there, since I didn’t find a poster
there with a pattern of thoroughly explaining stuff and sticking
around until you get it … and I’m not the type to quickly get it

So I tried my luck here and it didn’t work…but you can’t hold it
against me since it’s in my interest to learn stuff, even if I break
some rules along the way … anyways, I apologize
 
K

klem s

klem said:
I plan to start learning WCF, so I thought it might be useful if I
learn some basics  about xml and Xml Schemas. [...]

Just because WCF may use XML, that doesn't really mean your question has
anything to do with C# or even .NET.

You will probably have more success getting your question answered in
the most useful way by posting it to a forum where questions about using
XML, XSD, and related technologies are actually on-topic.

Pete

I tried at stack overflow, but I didn’t get the explanation I was
hoping for. I checked other xml forums and they are crappy ( in my
opinion) , since 60+ percent of questions don’t get answered and those
that do consist of replies no longer than few sentences. So my
questions don’t stand a chance there, since I didn’t find a poster
there with a pattern of thoroughly explaining stuff and sticking
around until you get it … and I’m not the type to quickly get it

So I tried my luck here and it didn’t work…but you shouldn't hold that
against me, since it’s in my best interest to learn stuff, even if I
break
some rules along the way … anyways, I apologize
 
K

klem s

klem said:
I plan to start learning WCF, so I thought it might be useful if I
learn some basics  about xml and Xml Schemas. [...]

Just because WCF may use XML, that doesn't really mean your question has
anything to do with C# or even .NET.

You will probably have more success getting your question answered in
the most useful way by posting it to a forum where questions about using
XML, XSD, and related technologies are actually on-topic.

Pete

I tried at stack overflow, but I didn’t get the explanation I was
hoping for. I checked other xml forums and they are crappy ( in my
opinion) , since 60+ percent of questions don’t get answered and those
that do consist of replies no longer than few sentences. So my
questions don’t stand a chance there, since I didn’t find a poster
there with a pattern of thoroughly explaining stuff and sticking
around until you get it … and I’m not the type to quickly get it

So I tried my luck here and it didn’t work…but you shouldn't hold that
against me, since it’s in my best interest to learn stuff, even if I
break some rules along the way … anyways, I apologize
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top