...

View Full Version : how do I use a PUBLIC DTD?



brothercake
12-30-2002, 11:28 PM
I'm publishing something where users will edit an XML document but shouldn't be able to edit the DTD. I was thinking something like:

<!DOCTYPE udm PUBLIC "http://www.domain.com/my_dtd.dtd">

would do it, but it seems not to.

Alex Vincent
12-30-2002, 11:49 PM
That would work if the keyword was SYSTEM.

Doctype declaration tags work like this:

<!DOCTYPE rootElementName PUBLIC "-//human-readable-string//" "http://dtd-location.org/filename.dtd">

Or:

<!DOCTYPE rootElementName SYSTEM "http://dtd-location.org/filename.dtd">

The idea behind the PUBLIC keyword is to include an optional string which describes the language the DTD defines. :)

brothercake
12-31-2002, 12:01 AM
I see. Thanks, that's very helpful :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum