Re: Can Jing simply ignore <!DOCTYPE ..>
Ken Beesley <[email protected]>
| Newsgroups | gmane.text.xml.relaxng.general |
|---|---|
| Message-ID | <[email protected]> |
> From: Ken Beesley <[email protected]> > Question: Can Jing simply ignore <!DOCTYPE ..> ? > From: "G. Ken Holman" <[email protected]> > I believe the answer is "no". > > The SYSTEM identifier needs to be followed for well-formedness checking, > but you can point that system identifier to a file without ELEMENT > declarations (or with ELEMENT declarations unrelated to the instance) and > Jing will respect your command line argument RNG file and ignore the model > declarations in the document type definition. Dear Mr. Holman, Thanks for the response. Yes, I can modify the <!DOCTYPE ...> declaration, or just eliminate it completely in this case, for Relax NG validation, but I was hoping to avoid that very step. I just want to ignore the rascal when validating with Relax NG. > You still need it there in case there are any entities that > are needed by the document. In this case there are no entities--just the SYSTEM identification of the DTD to be used for DTD-validation. > > As with MSV, Jing needs to follow the SYSTEM identifier but it will ignore > > any content model constraints ... so can you put in the place of the DTD > > location even an empty file and things should proceed. > From: Kohsuke Kawaguchi <[email protected]> > Actually, MSV has an option to completely ignore an external DTD. In > this mode, the parser will behave as if it didn't see the DOCTYPE > declaration. Dear Mr. Kawaguchi, Thanks for your response. First, I am not an expert in this area, and I appreciate the reference to MSV, which I wasn't aware of before. I now have it installed and working. The documentation of the -standalone option in msv says: "The switch prevents MSV from resolving external resources (such as external DTDs referenced from documents, or external entities). This is applicable ONLY WHEN YOU ARE USING Xerces." (emphasis added) Indeed, when I specify -standalone, MSV tries to use Xerces rather than Relax NG. I could of course be doing something wrong, but that's what it looks like to me. Ken ********************************************************************** Kenneth R. Beesley ken.beesley At xrce DoT xerox DoT com Xerox Research Centre Europe Tel from France: 04 76 61 50 64 6, chemin de Maupertuis Tel from Abroad: +33 4 76 61 50 64 38240 MEYLAN Fax from France: 04 76 61 50 99 France Fax from Abroad: +33 4 76 61 50 99 XRCE page: http://www.xrce.xerox.com Personal page: http://www.xrce.xerox.com/people/beesley/home.html **********************************************************************