xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas B. Passin" <tpas...@mitretek.org>
Subject Re: DTD help
Date Mon, 22 Apr 2002 14:21:48 GMT
The dtd you import must not have any DOCTYPE statements.  It may contain
only declarations.  In your overall document, you would have the DOCTYPE
declaration.  Using an entity this way essentially brings in text, and the
complete xml document has to follow the rules once the entity has been
imported and expanded.

Therefore, you want your files to be like this:

======= dtd to be imported (to_be_imported.dtd) ======
<!ELEMENT element_to_be_imported (#PCDATA)>

======= Your main xml file ===========
<!DOCTYPE importing_document [
<!ENTITY %imports SYSTEM "to_be_imported.dtd">
%imports;
<!ELEMENT document (element_to_be_imported)>
]>

Cheers,

Tom P

[Mohd Saifullah]

>
>
> This is also not working, any other idea, please?
>
> Regards,
> Saif
>
> On Sun, 21 Apr 2002, Paul Libbrecht wrote:
>
> > This is almost not more complicated.
> > Instead of your Element, you should simply use the entity:
> >
> > <!ENTITY % param1 SYSTEM "filepath/file.dtd">
> > %param1;
> >



---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Mime
View raw message