#30 Validation doesn't respect cache

open
nobody
Validation (3)
5
2010-09-03
2010-09-03
No

In 1.7b2, I can use the caching resolver so that my relative-path filename is found.

Without the caching resolver, I get the message that the DTD can not be found.
With the caching resolver, it uses the "cached" copy of the DTD (actually, I've got the cache pointing at the original copy).

But when I attempt to validate the same XML file, I'm told that the DTD file can not be found, same message as I get when transforming the single file without the caching.

Discussion

  • Andrew Welch
    Andrew Welch
    2010-09-07

    The caching resolver is currently only for transformations, it's not intended for use with validation...

    How are you validating the XML ?

     
  • My XML transformation output has a System ID in the form of an absolute URL (not that there is actually anything at that location):

    <!DOCTYPE doc SYSTEM "http://example.com/doc.dtd">

    I can further transform this XML by putting doc.dtd in the cache directory.

    To validate this XML, I'm pointing Kernow to an XML Schema created with trang:

    java -jar trang.jar doc.dtd doc.xsd

    But Kernow can't find the DTD (even though it doesn't actually validate according to the DTD) and so never gets to checking against the Schema.

    My solution, which takes longer than I'd like, is to generate my output without a DOCTYPE, validate it against the Schema, and then generate it again with the DOCTYPE.

    I'm in the middle of a run just now, but when it's done, I'm going to see if the XML declaration standalone="yes" is enough for Kernow to not bother looking for the DTD. If so, thanks! If not, there's another suggested feature (which ought not to be too tricky).

    Great program, thanks.

    Compared to my previous setup (Perl scripts running java -jar saxon.jar through command line "system" calls on Cygwin iterating over lots of files), Kernow is about 50 times faster to process. Under an hour instead of over a day.