W3C home > Mailing lists > Public > xproc-dev@w3.org > October 2010

RE: load can't find missing DTD when not validating against it...

From: Michael Sokolov <sokolov@ifactory.com>
Date: Thu, 21 Oct 2010 20:52:20 -0400
Message-id: <201010220052.o9M0qKXT030679@hades.falutin.net>
To: "'Jostein Austvik Jacobsen'" <josteinaj@gmail.com>, <xproc-dev@w3.org>
[[ begin unhelpful rant ]] DTD's - the bane of XML. Parsers are required to
hunt them down in order to support a few unnecessary features of XML even
when you don't care about validation. The easiest workaround is to create an
empty DTD file, but you can also write code to cauterize DTDs in a more
powerful way by inserting a resolver that effectively does the same thing.
I'm sorry but I don't know how to do that w/Xproc. [[ end unhelpful rant ]]


From: xproc-dev-request@w3.org [mailto:xproc-dev-request@w3.org] On Behalf
Of Jostein Austvik Jacobsen
Sent: Thursday, October 21, 2010 10:58 AM
To: xproc-dev@w3.org
Subject: p:load can't find missing DTD when not validating against it...

I'm trying to load an XML-file that declares a DTD in its doctype, but the
DTD isn't available. I don't need to validate against it anyway, but the
declaration is there. This doesn't work: 

<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
    <p:input port="source">
    <p:output port="result"/>
    <p:store href="test.xml" doctype-public="-//TEST//DTD TEST Test//EN"
    <p:load href="test.xml" dtd-validate="false"/>

Shortened down, this is the error I get:

com.xmlcalabash.core.XProcException: XProc error err:XD0011
at com.xmlcalabash.core.XProcException.dynamicError(XProcException.java:176)
Caused by: net.sf.saxon.s9api.SaxonApiException:
java.io.FileNotFoundException: /home/jostein/Skrivebord/test.dtd (No such
file or directory)
at net.sf.saxon.s9api.DocumentBuilder.build(DocumentBuilder.java:338)
Caused by: net.sf.saxon.trans.XPathException: java.io.FileNotFoundException:
/home/jostein/Skrivebord/test.dtd (No such file or directory)
at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:423)
Caused by: java.io.FileNotFoundException: /home/jostein/Skrivebord/test.dtd
(No such file or directory)

So it looks for the DTD, even though I specifically ask it not to validate
against it. Is this correct behavior?
As you can see from the output, I'm using Calabash (CLI reports version
0.9.22 although I think I've installed 0.9.23).

Best regards
Jostein Austvik Jacobsen
Received on Friday, 22 October 2010 00:53:02 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:07 UTC