Project

Profile

Help

Bug #6459

open

Reference to XMLSchema.dtd not resolved locally

Added by Michael Kay 5 months ago. Updated 5 months ago.

Status:
New
Priority:
Normal
Assignee:
Category:
External resources
Sprint/Milestone:
-
Start date:
2024-06-26
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

(Email sent to )

The user reports that a schema document contains a DTD reference:

<!DOCTYPE schema
        PUBLIC "-//W3C//DTD XMLSchema 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd"
        [
                <!ATTLIST schema
                        xmlns:ds CDATA #FIXED "http://www.w3.org/2000/09/xmldsig#">
                <!ENTITY dsig 'http://www.w3.org/2000/09/xmldsig#'>
                <!ENTITY % p ''>
                <!ENTITY % s ''>
                ]>

and the DTD is being fetched from the W3C server rather from our local cache. This is SaxonJ-EE-11.

The schema is being loaded using

Processor processor = processorFactory.newInstance();
SchemaManager manager = processor.getSchemaManager();
manager.setErrorReporter((e) -> errReporter.report(e));
manager.setSchemaURIResolver(sur);
manager.setXsdVersion(xsdVersion);
manager.load(xsdSource);

where sur is an instance of the standard schema resolver.

Actions #1

Updated by Michael Kay 5 months ago

It's working for me. I can load the schema; monitoring with Charles shows no HTTP traffic. Changing the URL of the DTD shows a failed HTTP request.

So we need to find out more about how you are running. It would help (a) to have a complete self-contained repro, and (b) to run with some network traffic monitoring so we can confirm what HTTP requests are being made.

I ran a test successfully on 13.x, 12,x, and 11.x (the network monitoring was done only on 11.x).

The most likely configuration problem is a failure to pick up the XmlResolver or XmlResolverData libraries. So it would be useful to confirm how these are being configured. There's a thread on XmlResolver issues at https://saxonica.plan.io/boards/3/topics/8478?page=2&r=9421 which may be helpful.

Please register to edit this issue

Also available in: Atom PDF