Project

Profile

Help

Support #4618

closed

More struggles with base URIs and receivers

Added by Norman Tovey-Walsh over 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2020-06-27
Due date:
% Done:

0%

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

Description

Hi Mike,

I think we've had a couple of conversations on the mailing list around this topic and it's come up again.

I've been trying to clean up my XInclude implementation a bit. If I get an XInclude element that points to a document with a fragment identifier, I end up reaching into the target document and pulling a few nodes out. These nodes get inserted into the source document where the xi:include element had been. (Not telling you anything you don't already know!)

Where they're inserted, I need to do xml:base fixup, adding explicit xml:base attributes so that the base URIs are preserved even as they're inserted into a new document.

Trouble is, the base URI keeps falling on the floor. Maybe I'm just abusing the receiver in some unsupported manner. I extracted it all out into a single test case that I think reproduces the core issue.

The base URIs are present in the original document, but not on the inserted nodes. At one point, I thought maybe the fact that I was appending nodes was causing the base URI to get lost. I added a an attempt to set it on the wrapper element and that doesn't get a base URI either.

A base URI set on the destination propagates through, but that's not sufficient because the base URI may need to vary between elements.

Am I doing something wrong? Is there any hope for making this work?


Files

Main.java (3.86 KB) Main.java Norman Tovey-Walsh, 2020-06-27 16:52
Main.java (3.7 KB) Main.java Norman Tovey-Walsh, 2020-06-28 19:06
Main.java (4.22 KB) Main.java Norman Tovey-Walsh, 2020-06-28 19:54

Please register to edit this issue

Also available in: Atom PDF