From: "Pierre van Rooden" <[EMAIL PROTECTED]> > One thing I thought up: What do we do with classes that 'generically' > read xml files and validate them? How do they determine where the DTD is? > Example: the config module, used by the admin pages to validate > configuration xmls and/or color code them for better representation
Simple, they use the system ID to access the dtd. E.g. take this declaration: <!DOCTYPE module PUBLIC "-//MMBase/ DTD module config 1.0//EN" "http://www.mmbase.org/dtd/module_1_0.dtd"> The first part states the public ID: "-//MMBase/ DTD module config 1.0//EN". The second part states the system ID: "http://www.mmbase.org/dtd/module_1_0.dtd". The public ID is used by dedicated module configuration readers, that store their own copy of the dtd. The system ID is for use by all other classes, particularly those geared towards processing different types of xml-files. It provides a url where the dtd can be found. This is usually an online dtd, but a local file can be used as well. Rob van Maris Developer Finalist IT Group Java Specialists ------------------------------------------------------------- Amsterdam, The Netherlands Office: +31 20 5962321 (Direct) Mobile: +31 651444006 Fax: +31 20 5962331 -------------------------------------------------------------
