"Ing. Hans Pesata" <[EMAIL PROTECTED]> writes:
> Hi !
>
> // You can include dtd files in the same way.
> // Like this:
> //
> // <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
> //
> // <!DOCTYPE configuration SYSTEM "test.dtd"
> // [
> // <!ENTITY xmlfile SYSTEM "test1.xml">
> // <!ENTITY % dtdfile SYSTEM "test1.dtd">
> // %dtdfile;
> // ]>
> //
> // <configuration>
> //
> // <sections>
> // <section name="Default-Values">
> // <file>&xmlfile;</file>
> // </section>
> // </sections>
> //
> // </configuration>
> //
> // The entity dtdfile will be expanded immediatly when it is seen
> // and thereby
> // loading the file test1.dtd during the DTD parsing.
> // Note this is pure "this should work". I have not tested it myself.
>
> the only problem is see with this approach is, that the DTD-file is
> not bound to the included XML-file and so I cant make sure, that the
> included XML-file is 100% validated correctly.
This is incorrect. The function of the entities is just so you can
store the definitions in an external file. So the behavior is
identical to what you would see if you had placed the contents of
dtdfile directly in the internal subset, and xmlfile in the
text. Therefore the contents of xmlfile are validated using the
combined contents of test1.dtd and dtdfile. That is as tight a binding
as you can get.
jas.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]