Project

Profile

Help

Bug #5615

open

Saxon 11 - Cannot have two different documents with the same document-uri

Added by Radu Coravu over 1 year ago. Updated about 1 year ago.

Status:
New
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2022-07-26
Due date:
% Done:

0%

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

Description

I'm getting this unhandled error which comes probably from reusing a transformer, the code we use is quite complex in those parts:

7065  ERROR [ main ] ro.sync.quickfix.QuickFixExecutor - Cannot generate late quick fixes: net.sf.saxon.trans.XPathException: Cannot have two different documents with the same document-uri file:/D:/projects/../SchematronQF/add/element/selectAttrValue/topic.dita
net.sf.saxon.trans.XPathException: Cannot have two different documents with the same document-uri file:/D:/projects/../SchematronQF/add/element/selectAttrValue/topic.dita
	at net.sf.saxon.om.DocumentPool.add(DocumentPool.java:69)
	at net.sf.saxon.Controller.registerDocument(Controller.java:1004)
	at net.sf.saxon.Controller.makeSourceTree(Controller.java:1359)
	at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:343)
	at net.sf.saxon.jaxp.TransformerImpl.transform(TransformerImpl.java:75)

would it be a good idea in the Controller.registerDocument to check if the document is already in the pool before adding it?

          if (getDocumentPool().find(uri) == null) {
            sourceDocumentPool.add(doc, uri);
          }

Files

asserts.zip (1.16 KB) asserts.zip Radu Coravu, 2022-08-16 11:01

Please register to edit this issue

Also available in: Atom PDF