W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 2000

Re: namespaces and schemaLocation

From: Martin Gudgin <marting@develop.com>
Date: Sat, 12 Aug 2000 20:56:49 +0100
Message-ID: <001301c00497$7cf52fb0$0100a8c0@arbitrary>
To: <www-xml-schema-comments@w3.org>
<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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:49:53 UTC