Actions
Bug #5691
closedCopying a processing instruction drops base URI information
Start date:
2022-09-19
Due date:
% Done:
100%
Estimated time:
Legacy ID:
Applies to branch:
10, 11, trunk
Fix Committed on Branch:
10, 11, trunk
Description
Outputter.append()
is:
@Override
public void append(Item item) throws XPathException {
append(item, Loc.NONE, ReceiverOption.ALL_NAMESPACES);
}
That means any item you append loses its location. I have some code that copies a tree, selectively modifying parts of it. I assumed that if I reached a node that I wasn't going to modify, I could simply call append()
with node.getUnderlyingNode()
. But if I do that, then the location is lost and consequently the base URI of the copied node(s) is lost.
I can work around this by doing the recursive descent and output the nodes encountered. But that seems like unnecessary work.
Files
Please register to edit this issue
Actions