File tree Expand file tree Collapse file tree
exist-core/src/main/java/org/exist/dom Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424import org .exist .xquery .Expression ;
2525import org .exist .xquery .value .Type ;
2626import org .w3c .dom .DOMException ;
27+ import org .w3c .dom .Node ;
2728import org .w3c .dom .Text ;
2829
30+ import javax .annotation .Nullable ;
31+
2932
3033public class TextImpl extends AbstractCharacterData implements Text {
3134
@@ -42,6 +45,15 @@ public int getItemType() {
4245 return Type .TEXT ;
4346 }
4447
48+ @ Override
49+ public @ Nullable String getBaseURI () {
50+ @ Nullable final Node parent = getParentNode ();
51+ if (parent == null ) {
52+ return null ;
53+ }
54+ return parent .getBaseURI ();
55+ }
56+
4557 @ Override
4658 public Text splitText (final int offset ) throws DOMException {
4759 return null ;
Original file line number Diff line number Diff line change 5353import org .w3c .dom .Comment ;
5454import org .w3c .dom .Node ;
5555
56+ import javax .annotation .Nullable ;
57+
5658import static java .nio .charset .StandardCharsets .UTF_8 ;
5759
5860public class CommentImpl extends AbstractCharacterData <CommentImpl > implements Comment {
@@ -86,6 +88,16 @@ public String toString() {
8688 return "<!-- " + cdata .toString () + " -->" ;
8789 }
8890
91+ @ Override
92+ public @ Nullable String getBaseURI () {
93+ @ Nullable final Node parent = getParentNode ();
94+ if (parent != null ) {
95+ return parent .getBaseURI ();
96+ } else {
97+ return null ;
98+ }
99+ }
100+
89101 /**
90102 * Serializes a (persistent DOM) Comment to a byte array
91103 *
You can’t perform that action at this time.
0 commit comments