Actions
Bug #5691
closed![Author: Norm Tovey-Walsh](https://www.gravatar.com/avatar/3de1450075377c998ad80d1ede6e0712?rating=PG&size=50&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
![Assignee: Michael Kay](https://www.gravatar.com/avatar/db6526d63053f09b62e52c2da8b2230a?rating=PG&size=22&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
Copying 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