Re: [xml] Remove an xml file's dependence on external DTD files

On Mon, 2008-05-12 at 21:03 +0800, èæè wrote:
I am new to XML. And I am looking for a way to convert an xml file
depending on external DTD files to its equivalent not depending on
external DTD files.

You can change
<!DOCTYPE sock SYSTEM "sock.dtd">

<!DOCTYPE sock [
    <!--* contents of sock.dtd here *-->

but it's possible that VTD-XML (I'm not familiar with it)
is too broken to understand that.

You can also change
<!DOCTYPE sock SYSTEM "sock.dtd">
<!DOCTYPE sock>
in the XML file, so that the software will not try to
load a DTD, but then the element structure will not be
checked, and any entities defined in the DTD will not
be available, e.g. if the DTD has
<!ENTITY pc "Polyester-cotton">
then you could use &pc; in your document as short-hand
for Polyester-Cotton, but only if the XML software loads
the DTD.


Liam Quin - XML Activity Lead, W3C,
Pictures from old books:

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]