Re: namespaces and schemaLocation

> <SNIP>
> > > The schema below is equivalent, but I *never* write schemas this way.
> >
> > Why not? I'd like to explain how to write them this way since most of the
> > examples in the primer are set up this way (and also because it seems more
> > clear to see all of the elements that are related to the schema of schemas
> > prefixed with xsd).
>
> [MJG]
> It's just a style thing. Neither way is more right or more wrong :-)
>
> When writing a schema by hand I prefer to map the default namespace
> declaration to http://www.w3.org/1999/XMLSchema for two reasons;
>
> 1.    It saves me having to type xsd: all the time. As the majority of the
> stuff I'm typing is XML defintions of schema components when I'm using
> notepad or emacs it saves me time.
>
> 2.    I like the explicit mapping of the targetNamespace to a specific
> prefix. It just seems clearer to me as I know that whenever I see the prefix
> tns: that I'm refering to something defined in this schema.
>
> Please don't feel obligated to follow my preferences, use whatever works for
> you.

OK, that helps too.

In an earlier message in this thread, you said "it is the value of the targetNamespace attribute
that determines which namespace top level schema components are in (named types, global element
decls, global attribute decls, etc.)"

When you say "top level", you mean that literally, right, as in ONLY the child elements of the
schema element?

Does that "etc." represent anything? That is, is there anything else on which the targetNamespace
has an effect?

thanks,
Liz

Received on Monday, 14 August 2000 09:39:05 UTC