Subject: Re: [xsl] Ignoring a DTD with document() From: "Imsieke, Gerrit, le-tex gerrit.imsieke@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Sun, 21 Apr 2024 05:52:09 -0000 |
<?xml version="1.0" encoding="UTF-8"?> <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> <systemSuffix systemIdSuffix="dita-oasis/1.2/technicalContent/dtd/reference.dtd" uri="file:///C:/Program%20Files/Oxygen%20XML%20Editor%2026/frameworks/dita/DITA-OT/plugins/org.oasis-open.dita.v1_2/dtd/technicalContent/dtd/reference.dtd"/> </catalog>
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE reference PUBLIC "PUBLIC IDENTIFIER" "D:\DocTypes\dita-oasis\1.2\technicalContent\dtd\reference.dtd"> <reference id="d"> <title></title> </reference>
Thanks Michael,
I'm using Saxon-PE 10.6 from inside Oxygen v24.1. I don't know what XML parser is used in this setup, I assume Xalan. This is the error I get:
I/O error reported by XML parser processing file:/C:/Users/mark/Desktop/company/ExportPub/myfile.xml: D:\DocTypes\dita-oasis\1.2\technicalContent\dtd\reference.dtd (The device is not ready)
I don't have a D: drive and that's probably why there is the "device is not ready" statement. The Saxon command line docs show a "-dtd:(on|off|recover)" option, which makes no difference using any option. I have managed to get around this using other methods, but I have learned that this neck of the woods has a few potholes. Good to know.
Mark
On 4/20/2024 5:41 AM, Michael Kay michaelkay90@xxxxxxxxx wrote:The answer is, it depends entirely on the XSLT processor you are using. Most XSLT processors are likely to give you access to some kind of resolver mechanism that enables you to control the options used for XML parsing; and at that point it depends on the XML parser you are using.
Michael Kay Saxonica
On 19 Apr 2024, at 21:45, Mark Giffin m1879@xxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
I'm using XSLT 2.0, trying to open an XML file with document(), the XML file references a DTD that is not available, and document() fails. How can I get document() to ignore the DTD?
Thanks, Mark
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Ignoring a DTD with docum, Mark Giffin m1879@xx | Thread | Re: [xsl] Ignoring a DTD with docum, Martin Honnen martin |
Re: [xsl] Ignoring a DTD with docum, Mark Giffin m1879@xx | Date | Re: [xsl] Ignoring a DTD with docum, Martin Honnen martin |
Month |