Subject: [xsl] DTD for XML From: "Jiang, Peiyun" <Peiyun.Jiang@xxxxxxxxxxxxxx> Date: Fri, 6 Feb 2004 10:16:53 -0500 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] MSXML 4 - RowSetSchema XM, Joe Fawcett | Thread | [xsl] text() word lists, James Cummings |
Re: [xsl] concating strings in a lo, Peter Flynn | Date | Re: [xsl] template matching, james walker |
Month |