Project

Profile

Help

Patch #1406

closed

fix for SAX / Xerces 2.5.0 xinclude

Added by Anonymous about 21 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Internals
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

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

Description

SourceForge user: npitman

Saxon 7.6.5 does not correctly process XInclude files as

document source in Xerces 2.5.0, when Xerces uses

EntityResolvers to load the XIncluded sources. (Xerces

2.5.0 has a minor problem, but they know and the fix is

in the pipeline)

The problem revolves around propagating the

EntityResolvers to the the XMLReader created in

Configuration.getSourceParser(). This is three levels

down from the Controller.Transform which kicks off the

transform. The XMLReader is constructed directly from

factories, but without any EntityResolver. Xerces needs

this when it hits an xi:include and needs a resolver.

There are three issues - specifying the EntityResolver to

the transform; remembering it; and configuring the

XMLReader.

This patch does the second and third. To specify the

EntityResolver, a Saxon user must insert the following

before the Transformer.transform(Source, Result);

((Controller)transformer).getConfiguration

().setEntityResolver(xIncludeResolver);

(This is quite ugly, but a simple setter in Controller can

wrap it. )

The supplied patch adds an instance

variable 'entityResolver' and its accessors to

Configuration; and assigns this resolver to the

XMLReader in getSourceParser().

It is likely that this patch is incomplete. I did not

consider style parsers or a DOM environment.


Files

xinclude-fix.txt (9.56 KB) xinclude-fix.txt Anonymous, 2003-08-28 03:01

Please register to edit this issue

Also available in: Atom PDF