W3C home > Mailing lists > Public > www-talk@w3.org > March to April 2003

Re: Optional External Entity

From: Herr Christian Wolfgang Hujer <Christian.Hujer@itcqis.com>
Date: Fri, 14 Mar 2003 16:54:00 +0100
To: "Mirko Braun" <tbm@Softing.com>, <www-talk@w3.org>
Message-Id: <200303141654.01365.Christian.Hujer@itcqis.com>

Hash: SHA1

Hello Mirko,

Am Mittwoch, 12. März 2003 09:51 schrieb Mirko Braun:
> Hi all,
> i new to xml and i have a xml-problem. Perhaps someone in this list can
> help me.
> i created a DTD and i created a kind of extension of this DTD in a separate
> file.
> This extension contains a company specific structure of data.
> Other companies who uses the DTD too, should not be aware of this
> extension. Consequently i had the idea to put this structure
> in a separate file and use an optional external entity. In this way
> maybe it is possible to omit the extension (file) when we deliver this DTD
> to other companies
> and no modification of the DTD is necessary.
> Despite of serveral tries to realize it, i did not manage to do it. I'm not
> sure if a optional external
> entity is possible!?
> Is this a possible?

use something like
<!ENTITY % useOptional "IGNORE">
<!ENTITY % optional SYSTEM "myOptionalPart">

In the external subset of the DTD to include the optional part (actually to 
*not* include it).

In the internal subset, use s.th. like this:
<!DOCTYPE myDoc SYSTEM "myES.dtd" [
<!ENTITY % user Optional "INCLUDE">

To really include the optional part, which is not included by default.

This idea is taken from XHTML.

- --
Christian Wolfgang Hujer
Geschäftsführender Gesellschafter
Telefon: +49  (0)89  27 37 04 37
Telefax: +49  (0)89  27 37 04 39
E-Mail: Christian.Hujer@itcqis.com
WWW: http://www.itcqis.com/
Version: GnuPG v1.0.7 (GNU/Linux)

Received on Friday, 14 March 2003 10:53:47 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:04 UTC