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.

Regards

Martin Gudgin
DevelopMentor

Received on Saturday, 12 August 2000 15:58:41 UTC