W3C home > Mailing lists > Public > xmlschema-dev@w3.org > November 2000

Modularization

From: Norman Walsh <ndw@nwalsh.com>
Date: 10 Nov 2000 15:17:40 -0500
To: xmlschema-dev@w3.org
Message-ID: <87d7g3vaxn.fsf@nwalsh.com>
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 15:21:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:18 GMT