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>

-----BEGIN PGP SIGNED MESSAGE-----
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">
<![%useOptional;[
<!ENTITY % optional SYSTEM "myOptionalPart">
%optional;
]]>

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.


Bye
- --
ITCQIS GmbH
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/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+cfsYzu6h7O/MKZkRAkYEAKDYkJidVwwRZK9hOx9ksDjMZfnhZgCghwGh
K7jXhXEY3ZCAAWksCl7TnJQ=
=3H5R
-----END PGP SIGNATURE-----
Received on Friday, 14 March 2003 10:53:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 October 2010 18:14:27 GMT