Re: Modularization

Norm,

I would amend your schema thus;

docbook.xsd
<xsd:schema xmlns:xsd='http://www.w3.org/2000/10/XMLSchema'
            targetNamespace='http://www.oasis-open.org/docbook/schema/4.1.2'
            xmlns:db='http://www.oasis-open.org/docbook/schema/4.1.2'
            xmlns:tbl='http://www.oasis-open.org/tables/exchange/1.0'
            xmlns:xml='http://www.w3.org/XML/1998/namespace'
            elementFormDefault='qualified'>

<xsd:import namespace='http://www.oasis-open.org/tables/exchange/1.0'
        schemaLocation="dbtables.xsd"/>

<xsd:include schemaLocation='dbnotn.xsd' />
<xsd:include schemaLocation='dbpool.xsd' />
<xsd:include schemaLocation='dbhier.xsd' />

</xsd:schema>

Where dbotn.xsd, dbpoo.xsd and dbhier.xsd all begin with ( at least )

<xsd:schema xmlns:xsd='http://www.w3.org/2000/10/XMLSchema'
            targetNamespace='http://www.oasis-open.org/docbook/schema/4.1.2'
            xmlns:db='http://www.oasis-open.org/docbook/schema/4.1.2' >

That is they are all in the same targetNamespace as docbook.xsd

Hope this helps,

Gudge


----- Original Message -----
From: "Norman Walsh" <ndw@nwalsh.com>
To: <xmlschema-dev@w3.org>
Sent: Friday, November 10, 2000 8:17 PM
Subject: Modularization


> I will not be surprised to discover that I've overlooked something.
> (No, for those to whom it's relevant, I haven't finished my nth
> reading of the specs for next week :-)
>
> Historically, DocBook has been organized into a few pieces, most
> importantly an "information pool" part and a "hierarchy" part. This
> lets one easily construct a DTD that's based on the DocBook "content"
> elements with a different hierarchical structure.
>
> I'm using entities to model this right now in my schema:
>
> <!DOCTYPE xsd:schema SYSTEM "/share/doctypes/xmlschema/XMLSchema.dtd" [
> <!ENTITY dbpool.xsd SYSTEM "dbpool.xsd">
> <!ENTITY dbhier.xsd SYSTEM "dbhier.xsd">
> <!ENTITY dbnotn.xsd SYSTEM "dbnotn.xsd">
> <!ENTITY % schemaAttrs "
> xmlns:db CDATA #IMPLIED
> xmlns:xml CDATA #IMPLIED
> xmlns:tbl CDATA #IMPLIED
> ">
> ]>
> <xsd:schema xmlns:xsd='http://www.w3.org/2000/10/XMLSchema'
>
targetNamespace='http://www.oasis-open.org/docbook/schema/4.1.2'
>             xmlns:db='http://www.oasis-open.org/docbook/schema/4.1.2'
>             xmlns:tbl='http://www.oasis-open.org/tables/exchange/1.0'
>             xmlns:xml='http://www.w3.org/XML/1998/namespace'
>             elementFormDefault='qualified'>
>
> <xsd:import namespace='http://www.oasis-open.org/tables/exchange/1.0'
>         schemaLocation="dbtables.xsd"/>
>
> &dbnotn.xsd;
> &dbpool.xsd;
> &dbhier.xsd;
> </xsd:schema>
>
> It's hard to say that that's really in the spirit of XML Schemas,
> though, isn't it?
>
> If I was willing to put the information pool and the hierarchy in
> different namespaces, I can see how I to construct a compound schema,
> but I am emphatically unwilling to do that.
>
> Can I make 'docbook.xsd' with a single namespace that uses dbpool.xsd
> and dbhier.xsd in such a way that they can both stand alone as well?
>
>                                         Be seeing you,
>                                           norm
>
> --
> Norman Walsh <ndw@nwalsh.com> | It is good to have an end to journey
> http://nwalsh.com/            | toward; but it is the journey that
>                               | matters, in the end.--Ursula K. Le Guin

Received on Friday, 10 November 2000 16:27:19 UTC