|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] DTD for XML
Situation: I have XML files using the same DTD, but have different DOCTYPE declarations. For example: <!DOCTYPE rparticle SYSTEM "../../DTDNorm/rpdtd/normalized/dtds/rparticle.dtd" [ <!ENTITY xxxxx "....."> ]> <!DOCTYPE rparticle SYSTEM "rparticle.dtd" [ <!ENTITY xxxxx "....."> ]> <!DOCTYPE rparticle PUBLIC "......" "rparticle.dtd" [ <!ENTITY xxxxx "....."> ]> Current solution: I tentatively put the DTD in whatever place (more than one place, of course) the transformer asks to avoid any Exception. Questions: (1) I'm using javax.xml.transform.* in java servlets to do the XSLT transformation. Is it possible to set up a org.apache.xml.resolver.tools.CatalogResolver to manage the DTD location? (2) or is it possible to ignore the DOCTYPE in the XML file and set up a DTD for use by the transformer? (3) If the above is not possible, I'm thinking of scanning the XML file and replace the DOCTYPE declaration before processing. This just does not appeal to me. Any other suggestion? (4) I'm also thinking of parse the XML document first using some parser that can do (1) and/or (2) and then do the transformation without validation (I'm not sure in this case I still have to resolve the DTD). Please give me some general ideas and examples if possible. Thanks. Peiyun Jiang XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








