Debian Codegraph @

net/sf/saxon/tree/tiny/TinyElementImpl.java

raw symbols SCIP
1 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2 // Copyright (c) 2018 Saxonica Limited.
3 // This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
4 // If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 // This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0.
6 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
7
8 package net.sf.saxon.tree.tiny;
9
10 import com.saxonica.ee.validate.SkipValidator;
11 import net.sf.saxon.Configuration;
12 import net.sf.saxon.event.*;
13 import net.sf.saxon.expr.parser.ExplicitLocation;
14 import net.sf.saxon.expr.parser.Location;
15 import net.sf.saxon.om.*;
16 import net.sf.saxon.trans.XPathException;
17 import net.sf.saxon.tree.util.NamespaceIterator;
18 import net.sf.saxon.tree.util.Navigator;
19 import net.sf.saxon.type.*;
20 import net.sf.saxon.value.AtomicValue;
21 import net.sf.saxon.z.IntHashMap;
22
23
24 /**
25 * A node in the XML parse tree representing an XML element.
26 * <p>This class is an implementation of NodeInfo. The object is a wrapper around
27 * one entry in the arrays maintained by the TinyTree. Note that the same node
28 * might be represented by different TinyElementImpl objects at different times.</p>
29 *
30 * @author Michael H. Kay
31 */
32
33 public class TinyElementImpl extends TinyParentNodeImpl {
34
35 /**
36 * Constructor - create a tiny element node
37 *
38 * @param tree the Tinytree containing the node
39 * @param nodeNr the node number
40 */
41
42 public TinyElementImpl(TinyTree tree, int nodeNr) {
43 this.tree = tree;
44 this.nodeNr = nodeNr;
45 }
46
47 /**
48 * Return the type of node.
49 *
50 * @return Type.ELEMENT
51 */
52
53 public final int getNodeKind() {
54 return Type.ELEMENT;
55 }
56
57 /**
58 * Get the base URI of this element node. This will be the same as the System ID unless
59 * xml:base has been used.
60 */
61
62 public String getBaseURI() {
63 synchronized (tree) {
64 if (tree.knownBaseUris == null) {
65 tree.knownBaseUris = new IntHashMap<>();
66 }
67 String uri = tree.knownBaseUris.get(nodeNr);
68 if (uri == null) {
69 uri = Navigator.getBaseURI(this,
70 n -> tree.isTopWithinEntity(((TinyElementImpl) n).getNodeNumber()));
71 tree.knownBaseUris.put(nodeNr, uri);
72 }
73 return uri;
74 }
75 }
76
77 /**
78 * Get the type annotation of this node, if any. The type annotation is represented as
79 * SchemaType object.
80 * <p>Types derived from a DTD are not reflected in the result of this method.</p>
81 *
82 * @return For element and attribute nodes: the type annotation derived from schema
83 * validation (defaulting to xs:untyped and xs:untypedAtomic in the absence of schema
84 * validation). For comments, text nodes, processing instructions, and namespaces: null.
85 * For document nodes, either xs:untyped if the document has not been validated, or
86 * xs:anyType if it has.
87 * @since 9.4
88 */
89 @Override
90 public SchemaType getSchemaType() {
91 return tree.getSchemaType(nodeNr);
92 }
93
94 /**
95 * Get the typed value.
96 *
97 * @return the typed value. It will be a Value representing a sequence whose items are atomic
98 * values.
99 */
100
101 public AtomicSequence atomize() throws XPathException {
102 return tree.getTypedValueOfElement(this);
103 }
104
105 /**
106 * Get all namespace undeclarations and undeclarations defined on this element.
107 *
108 * @param buffer If this is non-null, and the result array fits in this buffer, then the result
109 * may overwrite the contents of this array, to avoid the cost of allocating a new array on the heap.
110 * @return An array of objects representing the namespace declarations and undeclarations present on
111 * this element. For a node other than an element, return null. Otherwise, the returned array is a
112 * sequence of namespace binding objects (essentially prefix/uri pairs)
113 * If the URI is null, then this is a namespace undeclaration rather than a declaration.
114 * The XML namespace is never included in the list. If the supplied array is larger than required,
115 * then the first unused entry will be set to null.
116 */
117
118 /*@Nullable*/
119 public NamespaceBinding[] getDeclaredNamespaces(NamespaceBinding[] buffer) {
120 return getDeclaredNamespaces(tree, nodeNr, buffer);
121 }
122
123 /**
124 * Static method to get all namespace undeclarations and undeclarations defined on a given element,
125 * without instantiating the node object.
126 *
127 * @param tree The tree containing the given element node
128 * @param nodeNr The node number of the given element node within the tinyTree
129 * @param buffer If this is non-null, and the result array fits in this buffer, then the result
130 * may overwrite the contents of this array, to avoid the cost of allocating a new array on the heap.
131 * @return An array of objects representing the namespace declarations and undeclarations present on
132 * this element. For a node other than an element, return null. Otherwise, the returned array is a
133 * sequence of namespace binding objects (essentially prefix/uri pairs)
134 * If the URI is null, then this is a namespace undeclaration rather than a declaration.
135 * The XML namespace is never included in the list. If the supplied array is larger than required,
136 * then the first unused entry will be set to null.
137 */
138
139 /*@Nullable*/
140 public static NamespaceBinding[] getDeclaredNamespaces(/*@NotNull*/ TinyTree tree, int nodeNr, /*@Nullable*/ NamespaceBinding[] buffer) {
141 int ns = tree.beta[nodeNr]; // by convention
142 if (ns > 0) {
143 int count = 0;
144 while (ns < tree.numberOfNamespaces &&
145 tree.namespaceParent[ns] == nodeNr) {
146 count++;
147 ns++;
148 }
149 if (count == 0) {
150 return NamespaceBinding.EMPTY_ARRAY;
151 } else if (buffer != null && count <= buffer.length) {
152 System.arraycopy(tree.namespaceBinding, tree.beta[nodeNr], buffer, 0, count);
153 if (count < buffer.length) {
154 buffer[count] = null;
155 }
156 return buffer;
157 } else {
158 NamespaceBinding[] array = new NamespaceBinding[count];
159 System.arraycopy(tree.namespaceBinding, tree.beta[nodeNr], array, 0, count);
160 return array;
161 }
162 } else {
163 return NamespaceBinding.EMPTY_ARRAY;
164 }
165 }
166
167 /**
168 * Ask whether the element is the root of a subtree in which no descendant element
169 * has any local namespace declarations or undeclarations; that is, all elements
170 * in the subtree have the same in-scope namespace bindings.
171 * @return true if it is known that no descendant elements have in-scope namespaces
172 * different from those of this element.
173 */
174
175 public boolean hasUniformNamespaces() {
176 int nr = nodeNr;
177 int ns = tree.beta[nr];
178 TinyElementImpl anc = this;
179 while (ns == -1) {
180 TinyNodeImpl parent = anc.getParent();
181 if (parent instanceof TinyDocumentImpl) {
182 return !tree.usesNamespaces;
183 } else {
184 nr = parent.nodeNr;
185 ns = tree.beta[nr];
186 anc = (TinyElementImpl)parent;
187 }
188 }
189 // Find the first namespace binding with a different parent
190 while (ns < tree.numberOfNamespaces && tree.namespaceParent[ns] == nr) {
191 ns++;
192 }
193 // Return true if none is found, or if the element owning this namespace binding
194 // is outside the subtree
195 return ns >= tree.numberOfNamespaces || !isAncestorOrSelf(tree.getNode(tree.namespaceParent[ns]));
196 }
197
198
199 /**
200 * Get the string value of a given attribute of this node
201 *
202 * @param uri the namespace URI of the attribute name. Supply the empty string for an attribute
203 * that is in no namespace
204 * @param local the local part of the attribute name.
205 * @return the attribute value if it exists, or null if it does not exist. Always returns null
206 * if this node is not an element.
207 * @since 9.4
208 */
209
210 @Override
211 public String getAttributeValue(/*@NotNull*/ String uri, /*@NotNull*/ String local) {
212 int a = tree.alpha[nodeNr];
213 if (a < 0) {
214 return null;
215 }
216 NamePool pool = getNamePool();
217 while (a < tree.numberOfAttributes && tree.attParent[a] == nodeNr) {
218 int nc = tree.attCode[a];
219 // Avoid allocating a name code for an ad-hoc request
220 StructuredQName name = pool.getUnprefixedQName(nc);
221 if (name.getLocalPart().equals(local) && name.hasURI(uri)) {
222 return tree.attValue[a].toString();
223 }
224 a++;
225 }
226 return null;
227 }
228
229 /**
230 * Get the value of the attribute with a given fingerprint.
231 *
232 * @param fp the fingerprint of the required attribute
233 * @return the string value of the attribute if present, or null if absent
234 */
235
236 public String getAttributeValue(int fp) {
237 // NB: Used from generated bytecode
238 int a = tree.alpha[nodeNr];
239 if (a < 0) {
240 return null;
241 }
242 while (a < tree.numberOfAttributes && tree.attParent[a] == nodeNr) {
243 if (fp == (tree.attCode[a] & NamePool.FP_MASK)) {
244 return tree.attValue[a].toString();
245 }
246 a++;
247 }
248 return null;
249 }
250
251 private int subtreeSize() {
252 int next = tree.next[nodeNr];
253 while (next < nodeNr) {
254 if (next < 0) {
255 return tree.numberOfNodes - nodeNr;
256 }
257 next = tree.next[next];
258 }
259 return nodeNr - next;
260 }
261
262 /**
263 * Copy this node to a given receiver
264 *
265 * @param copyOptions determines handling of namespaces, etc
266 * @param location location information associated with the event
267 */
268
269 public void copy(/*@NotNull*/ Receiver receiver, int copyOptions, Location location) throws XPathException {
270
271 boolean copyTypes = CopyOptions.includes(copyOptions, CopyOptions.TYPE_ANNOTATIONS);
272
273 boolean fastCopied = tryBulkCopy(copyOptions, receiver);
274 if (fastCopied) {
275 return;
276 }
277
278 // boolean grafted = tryGraft(copyOptions, receiver);
279 // if (grafted) {
280 // Instrumentation.count("GRAFT");
281 // Instrumentation.count("GRAFT NODES ", Count.count(iterateAxis(AxisInfo.DESCENDANT_OR_SELF, NodeKindTest.ELEMENT)));
282 // return;
283 // }
284 // Instrumentation.count("NON-GRAFT");
285
286
287 short level = -1;
288 boolean closePending = false;
289 short startLevel = tree.depth[nodeNr];
290 boolean first = true;
291 boolean disallowNamespaceSensitiveContent =
292 ((copyOptions & CopyOptions.TYPE_ANNOTATIONS) != 0) &&
293 ((copyOptions & CopyOptions.SOME_NAMESPACES) == 0);
294 boolean foundElementInDefaultNamespace = false;
295 Configuration config = tree.getConfiguration();
296 NamePool pool = config.getNamePool();
297 int next = nodeNr;
298 CopyInformee<Location> informee = (CopyInformee<Location>) receiver.getPipelineConfiguration().getComponent(CopyInformee.class.getName());
299 SchemaType elementType = Untyped.getInstance();
300 SimpleType attributeType = BuiltInAtomicType.UNTYPED_ATOMIC;
301
302
303 do {
304
305 // determine node depth
306 short nodeLevel = tree.depth[next];
307
308 // extra close required?
309 if (closePending) {
310 level++;
311 }
312
313 // close former elements
314 for (; level > nodeLevel; level--) {
315 receiver.endElement();
316 }
317
318 // new node level
319 level = nodeLevel;
320
321 // output depends on node kind
322 int kind = tree.nodeKind[next];
323 switch (kind) {
324 case Type.ELEMENT:
325 case Type.TEXTUAL_ELEMENT: {
326
327 // start element
328 if (copyTypes) {
329 elementType = tree.getSchemaType(next);
330 if (disallowNamespaceSensitiveContent) {
331 try {
332 checkNotNamespaceSensitiveElement(elementType, next);
333 } catch (CopyNamespaceSensitiveException e) {
334 int lang = receiver.getPipelineConfiguration().getHostLanguage();
335 e.setErrorCode(lang == Configuration.XSLT ? "XTTE0950" : "XQTY0086");
336 throw e;
337 }
338 }
339 }
340 if (informee != null) {
341 Location loc = informee.notifyElementNode(tree.getNode(next));
342 if (loc != null) {
343 location = loc;
344 }
345 }
346 int nameCode = tree.nameCode[next];
347 int fp = nameCode & NamePool.FP_MASK;
348 String prefix = tree.getPrefix(next);
349 int options = !first && (copyOptions & CopyOptions.SOME_NAMESPACES) != 0
350 ? ReceiverOptions.NAMESPACE_OK
351 : 0;
352
353 if (location.getLineNumber() < tree.getLineNumber(next)) {
354 String systemId = location.getSystemId() == null ? getSystemId() : location.getSystemId();
355 location = new ExplicitLocation(systemId, tree.getLineNumber(next), getColumnNumber());
356 }
357 // bug 2209
358 receiver.startElement(new CodedName(fp, prefix, pool),
359 elementType, location, options);
360
361 if (kind == Type.TEXTUAL_ELEMENT) {
362 closePending = false;
363 receiver.startContent();
364 // output characters
365 final CharSequence value = TinyTextImpl.getStringValue(tree, next);
366 receiver.characters(value, location, ReceiverOptions.WHOLE_TEXT_NODE);
367 receiver.endElement();
368 } else {
369 // there is an element to close
370 closePending = true;
371
372 // output namespaces
373 if ((copyOptions & CopyOptions.SOME_NAMESPACES) != 0 && tree.usesNamespaces) {
374 String defaultNS = null;
375 if (prefix.isEmpty()) {
376 defaultNS = getNamePool().getURI(fp);
377 if (!defaultNS.isEmpty()) {
378 foundElementInDefaultNamespace = true;
379 }
380 }
381 if (first) {
382 if ((copyOptions & CopyOptions.LOCAL_NAMESPACES) != 0) {
383 NamespaceBinding[] localNamespaces = getDeclaredNamespaces(null);
384 for (NamespaceBinding ns : localNamespaces) {
385 if (ns == null) {
386 break;
387 }
388 receiver.namespace(ns, 0);
389 }
390 } else if ((copyOptions & CopyOptions.ALL_NAMESPACES) != 0) {
391 NamespaceIterator.sendNamespaces(this, receiver);
392 }
393 } else {
394 int ns = tree.beta[next]; // by convention
395 if (ns > 0) {
396 while (ns < tree.numberOfNamespaces &&
397 tree.namespaceParent[ns] == next) {
398 NamespaceBinding nscode = tree.namespaceBinding[ns];
399 receiver.namespace(nscode, 0);
400 ns++;
401 }
402 }
403 }
404 }
405 first = false;
406
407 // output attributes
408
409 int att = tree.alpha[next];
410 if (att >= 0) {
411 while (att < tree.numberOfAttributes && tree.attParent[att] == next) {
412 int attCode = tree.attCode[att];
413 int attfp = attCode & NamePool.FP_MASK;
414 if (copyTypes) {
415 attributeType = tree.getAttributeType(att);
416 if (disallowNamespaceSensitiveContent) {
417 try {
418 checkNotNamespaceSensitiveAttribute(attributeType, att);
419 } catch (CopyNamespaceSensitiveException e) {
420 int lang = receiver.getPipelineConfiguration().getHostLanguage();
421 e.setErrorCode(lang == Configuration.XSLT ? "XTTE0950" : "XQTY0086");
422 throw e;
423 }
424 }
425 }
426 String attPrefix = tree.prefixPool.getPrefix(attCode >> 20);
427 receiver.attribute(new CodedName(attfp, attPrefix, pool), attributeType, tree.attValue[att], location, ReceiverOptions.NOT_A_DUPLICATE);
428 att++;
429 }
430 }
431
432 // start content
433 receiver.startContent();
434 }
435 break;
436 }
437
438 case Type.EXTERNAL_NODE_REFERENCE:
439 closePending = false;
440 tree.externalNodes.get(tree.alpha[next]).copy(receiver, copyOptions, location);
441 break;
442
443 case Type.TEXT: {
444
445 // don't close text nodes
446 closePending = false;
447
448 // output characters
449 final CharSequence value = TinyTextImpl.getStringValue(tree, next);
450 receiver.characters(value, location, ReceiverOptions.WHOLE_TEXT_NODE);
451 break;
452 }
453
454 case Type.WHITESPACE_TEXT: {
455
456 // don't close text nodes
457 closePending = false;
458
459 // output characters
460 final CharSequence value = WhitespaceTextImpl.getStringValueCS(tree, next);
461 receiver.characters(value, location, ReceiverOptions.WHOLE_TEXT_NODE);
462 break;
463 }
464
465 case Type.COMMENT: {
466
467 // don't close text nodes
468 closePending = false;
469
470 // output copy of comment
471 int start = tree.alpha[next];
472 int len = tree.beta[next];
473 if (len > 0) {
474 receiver.comment(tree.commentBuffer.subSequence(start, start + len), location, 0);
475 } else {
476 receiver.comment("", ExplicitLocation.UNKNOWN_LOCATION, 0);
477 }
478 break;
479 }
480 case Type.PROCESSING_INSTRUCTION: {
481
482 // don't close text nodes
483 closePending = false;
484
485 // output copy of PI
486 NodeInfo pi = tree.getNode(next);
487 receiver.processingInstruction(pi.getLocalPart(), pi.getStringValue(), location, 0);
488 break;
489 }
490
491 case Type.PARENT_POINTER: {
492 closePending = false;
493 }
494 }
495
496 next++;
497
498 } while (next < tree.numberOfNodes && tree.depth[next] > startLevel);
499
500 // close all remaining elements
501 if (closePending) {
502 level++;
503 }
504 for (; level > startLevel; level--) {
505 receiver.endElement();
506 }
507 }
508
509 private boolean tryGraft(int copyOptions, Receiver out) throws XPathException {
510 if (subtreeSize() < 100) {
511 return false;
512 }
513 if (TinyTree.useGraft &&
514 (copyOptions & CopyOptions.FOR_UPDATE) == 0 &&
515 (copyOptions & CopyOptions.ALL_NAMESPACES) != 0 &&
516 // don't allow a subtree that already contains external nodes to be grafted to another tree
517 tree.externalNodes == null) {
518 if (isSkipValidator(out)) {
519 return false;
520 // Can't currently use grafting copy with validation="strip" because of the
521 // complications of ID and IDREF attributes (test case copy-5034)
522 //r1 = ((ProxyReceiver) r1).getNextReceiver();
523 }
524 if (tree.isTyped()) {
525 return false;
526 }
527 if (out instanceof SequenceWriter && ((SequenceWriter) out).isReadyForGrafting()) {
528 ((SequenceWriter) out).graftElementNode(this, copyOptions);
529 return true;
530 } else if (out instanceof ComplexContentOutputter) {
531 if (((ComplexContentOutputter) out).isReadyForGrafting()) {
532 ((ComplexContentOutputter) out).graftElementNode(this, copyOptions);
533 return true;
534 }
535 }
536 }
537 return false;
538 }
539
540 private boolean tryBulkCopy(int copyOptions, Receiver out) throws XPathException {
541 // Fast path for copying to another TinyTree
542 if (TinyTree.useBulkCopy &&
543 (copyOptions & CopyOptions.FOR_UPDATE) == 0 &&
544 (copyOptions & CopyOptions.ALL_NAMESPACES) != 0 &&
545 // don't allow a subtree that already contains external nodes to be grafted to another tree
546 tree.externalNodes == null) {
547 if (isSkipValidator(out)) {
548 out = ((ProxyReceiver)out).getNextReceiver();
549 }
550 if (tree.isTyped()) {
551 return false;
552 }
553 if (nodeNr == tree.numberOfNodes - 1) {
554 // Bug 4089
555 // Not sure why this case fails, but it crashes out, and this is the simplest workaround
556 return false;
557 }
558 if (out instanceof SequenceWriter && ((SequenceWriter) out).isReadyForBulkCopy()) {
559 ((SequenceWriter) out).bulkCopyElementNode(this, copyOptions);
560 return true;
561 } else if (out instanceof ComplexContentOutputter) {
562 if (((ComplexContentOutputter) out).isReadyForBulkCopy()) {
563 ((ComplexContentOutputter) out).bulkCopyElementNode(this, copyOptions);
564 return true;
565 }
566 }
567 }
568 return false;
569 }
570
571 /**
572 * Check whether the content of an element is namespace-sensitive
573 *
574 *
575 * @param type the type annotation of the node
576 * @param nodeNr the the node number of the elemente
577 * @throws XPathException if an error occurs
578 */
579
580 protected void checkNotNamespaceSensitiveElement(SchemaType type, int nodeNr) throws XPathException {
581 if (type instanceof SimpleType && ((SimpleType) type).isNamespaceSensitive()) {
582 if (type.isAtomicType()) {
583 throw new CopyNamespaceSensitiveException(
584 "Cannot copy QName or NOTATION values without copying namespaces");
585 } else {
586 // For a union or list type, we need to check whether the actual value is namespace-sensitive
587 AtomicSequence value = tree.getTypedValueOfElement(nodeNr);
588 for (AtomicValue val : value) {
589 if (val.getPrimitiveType().isNamespaceSensitive()) {
590 throw new CopyNamespaceSensitiveException(
591 "Cannot copy QName or NOTATION values without copying namespaces");
592 }
593 }
594 }
595 }
596 }
597
598 /**
599 * Check whether the content of an attribute is namespace-sensitive
600 *
601 *
602 * @param type the type annotation of the node
603 * @param nodeNr the the node number of the elemente
604 * @throws XPathException if an error occurs
605 */
606
607 private void checkNotNamespaceSensitiveAttribute(SimpleType type, int nodeNr) throws XPathException {
608 if (type.isNamespaceSensitive()) {
609 if (type.isAtomicType()) {
610 throw new CopyNamespaceSensitiveException(
611 "Cannot copy QName or NOTATION values without copying namespaces");
612 } else {
613 // For a union or list type, we need to check whether the actual value is namespace-sensitive
614 AtomicSequence value = tree.getTypedValueOfAttribute(null, nodeNr);
615 for (AtomicValue val : value) {
616 if (val.getPrimitiveType().isNamespaceSensitive()) {
617 throw new CopyNamespaceSensitiveException(
618 "Cannot copy QName or NOTATION values without copying namespaces");
619 }
620 }
621 }
622 }
623 }
624
625
626 /**
627 * Get the namespace URI corresponding to a given prefix. Return null
628 * if the prefix is not in scope.
629 *
630 * @param prefix the namespace prefix. May be the zero-length string, indicating
631 * that there is no prefix. This indicates either the default namespace or the
632 * null namespace, depending on the value of useDefault.
633 * @param useDefault true if the default namespace is to be used when the
634 * prefix is "". If false, the method returns "" when the prefix is "".
635 * @return the uri for the namespace, or null if the prefix is not in scope.
636 * The "null namespace" is represented by the pseudo-URI "".
637 */
638
639 /*@Nullable*/
640 public String getURIForPrefix(/*@Nullable*/ String prefix, boolean useDefault) {
641 if (!useDefault && (prefix == null || prefix.isEmpty())) {
642 return "";
643 }
644 int ns = tree.beta[nodeNr]; // by convention
645 if (ns > 0) {
646 while (ns < tree.numberOfNamespaces &&
647 tree.namespaceParent[ns] == nodeNr) {
648 NamespaceBinding nscode = tree.namespaceBinding[ns];
649 if (nscode.getPrefix().equals(prefix)) {
650 String uri = nscode.getURI();
651 if (uri.isEmpty()) {
652 // this is a namespace undeclaration, so the prefix is not in scope
653 if (prefix.isEmpty()) {
654 // the namespace xmlns="" is always in scope
655 return "";
656 } else {
657 return null;
658 }
659 } else {
660 return uri;
661 }
662 }
663 ns++;
664 }
665 }
666
667 // now search the namespaces defined on the ancestor nodes.
668
669 NodeInfo parent = getParent();
670 if (parent instanceof NamespaceResolver) {
671 return ((NamespaceResolver) parent).getURIForPrefix(prefix, useDefault);
672 }
673 return null;
674 }
675
676 /**
677 * Determine whether this node has the is-id property
678 *
679 * @return true if the node is an ID
680 */
681
682 public boolean isId() {
683 // this looks very inefficient, but the method isn't actually used...
684 return tree.isIdElement(nodeNr);
685 }
686
687 /**
688 * Determine whether this node has the is-idref property
689 *
690 * @return true if the node is an IDREF or IDREFS element or attribute
691 */
692
693 public boolean isIdref() {
694 return tree.isIdrefElement(nodeNr);
695 }
696
697 private boolean isSkipValidator(Receiver r) {
698 //#if EE==true
699 if (r instanceof SkipValidator) {
700 return true;
701 }
702 //#endif
703 return false;
704 }
705
706
707 }
708