1 16 19 package com.sun.org.apache.xalan.internal.xsltc.dom; 20 21 import com.sun.org.apache.xalan.internal.xsltc.DOM; 22 import com.sun.org.apache.xalan.internal.xsltc.TransletException; 23 import com.sun.org.apache.xalan.internal.xsltc.StripFilter; 24 import com.sun.org.apache.xalan.internal.xsltc.runtime.Hashtable; 25 import com.sun.org.apache.xalan.internal.xsltc.runtime.BasisLibrary; 26 import com.sun.org.apache.xalan.internal.xsltc.runtime.AttributeList; 27 28 import com.sun.org.apache.xml.internal.dtm.DTMAxisIterator; 29 import com.sun.org.apache.xml.internal.dtm.DTMAxisTraverser; 30 import com.sun.org.apache.xml.internal.dtm.DTMWSFilter; 31 import com.sun.org.apache.xml.internal.utils.XMLString; 32 33 import com.sun.org.apache.xml.internal.serializer.SerializationHandler; 34 35 import javax.xml.transform.SourceLocator ; 36 import org.w3c.dom.Node ; 37 import org.w3c.dom.NodeList ; 38 import org.xml.sax.Attributes ; 39 import org.xml.sax.SAXException ; 40 41 72 public class AdaptiveResultTreeImpl extends SimpleResultTreeImpl 73 { 74 75 private static int _documentURIIndex = 0; 77 78 private SAXImpl _dom; 80 81 82 83 private DTMWSFilter _wsfilter; 85 86 private int _initSize; 88 89 private boolean _buildIdIndex; 91 92 private final AttributeList _attributes = new AttributeList(); 94 95 private String _openElementName; 97 98 99 public AdaptiveResultTreeImpl(XSLTCDTMManager dtmManager, int documentID, 101 DTMWSFilter wsfilter, int initSize, 102 boolean buildIdIndex) 103 { 104 super(dtmManager, documentID); 105 106 _wsfilter = wsfilter; 107 _initSize = initSize; 108 _buildIdIndex = buildIdIndex; 109 } 110 111 public DOM getNestedDOM() 113 { 114 return _dom; 115 } 116 117 public int getDocument() 119 { 120 if (_dom != null) { 121 return _dom.getDocument(); 122 } 123 else { 124 return super.getDocument(); 125 } 126 } 127 128 public String getStringValue() 130 { 131 if (_dom != null) { 132 return _dom.getStringValue(); 133 } 134 else { 135 return super.getStringValue(); 136 } 137 } 138 139 public DTMAxisIterator getIterator() 140 { 141 if (_dom != null) { 142 return _dom.getIterator(); 143 } 144 else { 145 return super.getIterator(); 146 } 147 } 148 149 public DTMAxisIterator getChildren(final int node) 150 { 151 if (_dom != null) { 152 return _dom.getChildren(node); 153 } 154 else { 155 return super.getChildren(node); 156 } 157 } 158 159 public DTMAxisIterator getTypedChildren(final int type) 160 { 161 if (_dom != null) { 162 return _dom.getTypedChildren(type); 163 } 164 else { 165 return super.getTypedChildren(type); 166 } 167 } 168 169 public DTMAxisIterator getAxisIterator(final int axis) 170 { 171 if (_dom != null) { 172 return _dom.getAxisIterator(axis); 173 } 174 else { 175 return super.getAxisIterator(axis); 176 } 177 } 178 179 public DTMAxisIterator getTypedAxisIterator(final int axis, final int type) 180 { 181 if (_dom != null) { 182 return _dom.getTypedAxisIterator(axis, type); 183 } 184 else { 185 return super.getTypedAxisIterator(axis, type); 186 } 187 } 188 189 public DTMAxisIterator getNthDescendant(int node, int n, boolean includeself) 190 { 191 if (_dom != null) { 192 return _dom.getNthDescendant(node, n, includeself); 193 } 194 else { 195 return super.getNthDescendant(node, n, includeself); 196 } 197 } 198 199 public DTMAxisIterator getNamespaceAxisIterator(final int axis, final int ns) 200 { 201 if (_dom != null) { 202 return _dom.getNamespaceAxisIterator(axis, ns); 203 } 204 else { 205 return super.getNamespaceAxisIterator(axis, ns); 206 } 207 } 208 209 public DTMAxisIterator getNodeValueIterator(DTMAxisIterator iter, int returnType, 210 String value, boolean op) 211 { 212 if (_dom != null) { 213 return _dom.getNodeValueIterator(iter, returnType, value, op); 214 } 215 else { 216 return super.getNodeValueIterator(iter, returnType, value, op); 217 } 218 } 219 220 public DTMAxisIterator orderNodes(DTMAxisIterator source, int node) 221 { 222 if (_dom != null) { 223 return _dom.orderNodes(source, node); 224 } 225 else { 226 return super.orderNodes(source, node); 227 } 228 } 229 230 public String getNodeName(final int node) 231 { 232 if (_dom != null) { 233 return _dom.getNodeName(node); 234 } 235 else { 236 return super.getNodeName(node); 237 } 238 } 239 240 public String getNodeNameX(final int node) 241 { 242 if (_dom != null) { 243 return _dom.getNodeNameX(node); 244 } 245 else { 246 return super.getNodeNameX(node); 247 } 248 } 249 250 public String getNamespaceName(final int node) 251 { 252 if (_dom != null) { 253 return _dom.getNamespaceName(node); 254 } 255 else { 256 return super.getNamespaceName(node); 257 } 258 } 259 260 public int getExpandedTypeID(final int nodeHandle) 262 { 263 if (_dom != null) { 264 return _dom.getExpandedTypeID(nodeHandle); 265 } 266 else { 267 return super.getExpandedTypeID(nodeHandle); 268 } 269 } 270 271 public int getNamespaceType(final int node) 272 { 273 if (_dom != null) { 274 return _dom.getNamespaceType(node); 275 } 276 else { 277 return super.getNamespaceType(node); 278 } 279 } 280 281 public int getParent(final int nodeHandle) 282 { 283 if (_dom != null) { 284 return _dom.getParent(nodeHandle); 285 } 286 else { 287 return super.getParent(nodeHandle); 288 } 289 } 290 291 public int getAttributeNode(final int gType, final int element) 292 { 293 if (_dom != null) { 294 return _dom.getAttributeNode(gType, element); 295 } 296 else { 297 return super.getAttributeNode(gType, element); 298 } 299 } 300 301 public String getStringValueX(final int nodeHandle) 302 { 303 if (_dom != null) { 304 return _dom.getStringValueX(nodeHandle); 305 } 306 else { 307 return super.getStringValueX(nodeHandle); 308 } 309 } 310 311 public void copy(final int node, SerializationHandler handler) 312 throws TransletException 313 { 314 if (_dom != null) { 315 _dom.copy(node, handler); 316 } 317 else { 318 super.copy(node, handler); 319 } 320 } 321 322 public void copy(DTMAxisIterator nodes, SerializationHandler handler) 323 throws TransletException 324 { 325 if (_dom != null) { 326 _dom.copy(nodes, handler); 327 } 328 else { 329 super.copy(nodes, handler); 330 } 331 } 332 333 public String shallowCopy(final int node, SerializationHandler handler) 334 throws TransletException 335 { 336 if (_dom != null) { 337 return _dom.shallowCopy(node, handler); 338 } 339 else { 340 return super.shallowCopy(node, handler); 341 } 342 } 343 344 public boolean lessThan(final int node1, final int node2) 345 { 346 if (_dom != null) { 347 return _dom.lessThan(node1, node2); 348 } 349 else { 350 return super.lessThan(node1, node2); 351 } 352 } 353 354 360 public void characters(final int node, SerializationHandler handler) 361 throws TransletException 362 { 363 if (_dom != null) { 364 _dom.characters(node, handler); 365 } 366 else { 367 super.characters(node, handler); 368 } 369 } 370 371 public Node makeNode(int index) 372 { 373 if (_dom != null) { 374 return _dom.makeNode(index); 375 } 376 else { 377 return super.makeNode(index); 378 } 379 } 380 381 public Node makeNode(DTMAxisIterator iter) 382 { 383 if (_dom != null) { 384 return _dom.makeNode(iter); 385 } 386 else { 387 return super.makeNode(iter); 388 } 389 } 390 391 public NodeList makeNodeList(int index) 392 { 393 if (_dom != null) { 394 return _dom.makeNodeList(index); 395 } 396 else { 397 return super.makeNodeList(index); 398 } 399 } 400 401 public NodeList makeNodeList(DTMAxisIterator iter) 402 { 403 if (_dom != null) { 404 return _dom.makeNodeList(iter); 405 } 406 else { 407 return super.makeNodeList(iter); 408 } 409 } 410 411 public String getLanguage(int node) 412 { 413 if (_dom != null) { 414 return _dom.getLanguage(node); 415 } 416 else { 417 return super.getLanguage(node); 418 } 419 } 420 421 public int getSize() 422 { 423 if (_dom != null) { 424 return _dom.getSize(); 425 } 426 else { 427 return super.getSize(); 428 } 429 } 430 431 public String getDocumentURI(int node) 432 { 433 if (_dom != null) { 434 return _dom.getDocumentURI(node); 435 } 436 else { 437 return "adaptive_rtf" + _documentURIIndex++; 438 } 439 } 440 441 public void setFilter(StripFilter filter) 442 { 443 if (_dom != null) { 444 _dom.setFilter(filter); 445 } 446 else { 447 super.setFilter(filter); 448 } 449 } 450 451 public void setupMapping(String [] names, String [] uris, int[] types, String [] namespaces) 452 { 453 if (_dom != null) { 454 _dom.setupMapping(names, uris, types, namespaces); 455 } 456 else { 457 super.setupMapping(names, uris, types, namespaces); 458 } 459 } 460 461 public boolean isElement(final int node) 462 { 463 if (_dom != null) { 464 return _dom.isElement(node); 465 } 466 else { 467 return super.isElement(node); 468 } 469 } 470 471 public boolean isAttribute(final int node) 472 { 473 if (_dom != null) { 474 return _dom.isAttribute(node); 475 } 476 else { 477 return super.isAttribute(node); 478 } 479 } 480 481 public String lookupNamespace(int node, String prefix) 482 throws TransletException 483 { 484 if (_dom != null) { 485 return _dom.lookupNamespace(node, prefix); 486 } 487 else { 488 return super.lookupNamespace(node, prefix); 489 } 490 } 491 492 495 public final int getNodeIdent(final int nodehandle) 496 { 497 if (_dom != null) { 498 return _dom.getNodeIdent(nodehandle); 499 } 500 else { 501 return super.getNodeIdent(nodehandle); 502 } 503 } 504 505 508 public final int getNodeHandle(final int nodeId) 509 { 510 if (_dom != null) { 511 return _dom.getNodeHandle(nodeId); 512 } 513 else { 514 return super.getNodeHandle(nodeId); 515 } 516 } 517 518 public DOM getResultTreeFrag(int initialSize, int rtfType) 519 { 520 if (_dom != null) { 521 return _dom.getResultTreeFrag(initialSize, rtfType); 522 } 523 else { 524 return super.getResultTreeFrag(initialSize, rtfType); 525 } 526 } 527 528 public SerializationHandler getOutputDomBuilder() 529 { 530 return this; 531 } 532 533 public int getNSType(int node) 534 { 535 if (_dom != null) { 536 return _dom.getNSType(node); 537 } 538 else { 539 return super.getNSType(node); 540 } 541 } 542 543 public String getUnparsedEntityURI(String name) 544 { 545 if (_dom != null) { 546 return _dom.getUnparsedEntityURI(name); 547 } 548 else { 549 return super.getUnparsedEntityURI(name); 550 } 551 } 552 553 public Hashtable getElementsWithIDs() 554 { 555 if (_dom != null) { 556 return _dom.getElementsWithIDs(); 557 } 558 else { 559 return super.getElementsWithIDs(); 560 } 561 } 562 563 564 565 566 567 private void maybeEmitStartElement() throws SAXException 568 { 569 if (_openElementName != null) { 570 571 int index; 572 if ((index =_openElementName.indexOf(":")) < 0) 573 _dom.startElement(null, _openElementName, _openElementName, _attributes); 574 else { 575 String uri =_dom.getNamespaceURI(_openElementName.substring(0,index)); 576 _dom.startElement(uri, _openElementName.substring(index+1), _openElementName, _attributes); 577 } 578 579 580 _openElementName = null; 581 } 582 } 583 584 private void prepareNewDOM() throws SAXException 586 { 587 _dom = (SAXImpl)_dtmManager.getDTM(null, true, _wsfilter, 588 true, false, false, 589 _initSize, _buildIdIndex); 590 _dom.startDocument(); 591 for (int i = 0; i < _size; i++) { 593 String str = _textArray[i]; 594 _dom.characters(str.toCharArray(), 0, str.length()); 595 } 596 _size = 0; 597 } 598 599 public void startDocument() throws SAXException 600 { 601 } 602 603 public void endDocument() throws SAXException 604 { 605 if (_dom != null) { 606 _dom.endDocument(); 607 } 608 else { 609 super.endDocument(); 610 } 611 } 612 613 public void characters(String str) throws SAXException 614 { 615 if (_dom != null) { 616 characters(str.toCharArray(), 0, str.length()); 617 } 618 else { 619 super.characters(str); 620 } 621 } 622 623 public void characters(char[] ch, int offset, int length) 624 throws SAXException 625 { 626 if (_dom != null) { 627 maybeEmitStartElement(); 628 _dom.characters(ch, offset, length); 629 } 630 else { 631 super.characters(ch, offset, length); 632 } 633 } 634 635 public boolean setEscaping(boolean escape) throws SAXException 636 { 637 if (_dom != null) { 638 return _dom.setEscaping(escape); 639 } 640 else { 641 return super.setEscaping(escape); 642 } 643 } 644 645 public void startElement(String elementName) throws SAXException 646 { 647 if (_dom == null) { 648 prepareNewDOM(); 649 } 650 651 maybeEmitStartElement(); 652 _openElementName = elementName; 653 _attributes.clear(); 654 } 655 656 public void startElement(String uri, String localName, String qName) 657 throws SAXException 658 { 659 startElement(qName); 660 } 661 662 public void startElement(String uri, String localName, String qName, Attributes attributes) 663 throws SAXException 664 { 665 startElement(qName); 666 } 667 668 public void endElement(String elementName) throws SAXException 669 { 670 maybeEmitStartElement(); 671 _dom.endElement(null, null, elementName); 672 } 673 674 public void endElement(String uri, String localName, String qName) 675 throws SAXException 676 { 677 endElement(qName); 678 } 679 680 public void addUniqueAttribute(String qName, String value, int flags) 681 throws SAXException 682 { 683 addAttribute(qName, value); 684 } 685 686 public void addAttribute(String name, String value) 687 { 688 if (_openElementName != null) { 689 _attributes.add(name, value); 690 } 691 else { 692 BasisLibrary.runTimeError(BasisLibrary.STRAY_ATTRIBUTE_ERR, name); 693 } 694 } 695 696 public void namespaceAfterStartElement(String prefix, String uri) 697 throws SAXException 698 { 699 if (_dom == null) { 700 prepareNewDOM(); 701 } 702 703 _dom.startPrefixMapping(prefix, uri); 704 } 705 706 public void comment(String comment) throws SAXException 707 { 708 if (_dom == null) { 709 prepareNewDOM(); 710 } 711 712 maybeEmitStartElement(); 713 char[] chars = comment.toCharArray(); 714 _dom.comment(chars, 0, chars.length); 715 } 716 717 public void comment(char[] chars, int offset, int length) 718 throws SAXException 719 { 720 if (_dom == null) { 721 prepareNewDOM(); 722 } 723 724 maybeEmitStartElement(); 725 _dom.comment(chars, offset, length); 726 } 727 728 public void processingInstruction(String target, String data) 729 throws SAXException 730 { 731 if (_dom == null) { 732 prepareNewDOM(); 733 } 734 735 maybeEmitStartElement(); 736 _dom.processingInstruction(target, data); 737 } 738 739 740 741 public void setFeature(String featureId, boolean state) 742 { 743 if (_dom != null) { 744 _dom.setFeature(featureId, state); 745 } 746 } 747 748 public void setProperty(String property, Object value) 749 { 750 if (_dom != null) { 751 _dom.setProperty(property, value); 752 } 753 } 754 755 public DTMAxisTraverser getAxisTraverser(final int axis) 756 { 757 if (_dom != null) { 758 return _dom.getAxisTraverser(axis); 759 } 760 else { 761 return super.getAxisTraverser(axis); 762 } 763 } 764 765 public boolean hasChildNodes(int nodeHandle) 766 { 767 if (_dom != null) { 768 return _dom.hasChildNodes(nodeHandle); 769 } 770 else { 771 return super.hasChildNodes(nodeHandle); 772 } 773 } 774 775 public int getFirstChild(int nodeHandle) 776 { 777 if (_dom != null) { 778 return _dom.getFirstChild(nodeHandle); 779 } 780 else { 781 return super.getFirstChild(nodeHandle); 782 } 783 } 784 785 public int getLastChild(int nodeHandle) 786 { 787 if (_dom != null) { 788 return _dom.getLastChild(nodeHandle); 789 } 790 else { 791 return super.getLastChild(nodeHandle); 792 } 793 } 794 795 public int getAttributeNode(int elementHandle, String namespaceURI, String name) 796 { 797 if (_dom != null) { 798 return _dom.getAttributeNode(elementHandle, namespaceURI, name); 799 } 800 else { 801 return super.getAttributeNode(elementHandle, namespaceURI, name); 802 } 803 } 804 805 public int getFirstAttribute(int nodeHandle) 806 { 807 if (_dom != null) { 808 return _dom.getFirstAttribute(nodeHandle); 809 } 810 else { 811 return super.getFirstAttribute(nodeHandle); 812 } 813 } 814 815 public int getFirstNamespaceNode(int nodeHandle, boolean inScope) 816 { 817 if (_dom != null) { 818 return _dom.getFirstNamespaceNode(nodeHandle, inScope); 819 } 820 else { 821 return super.getFirstNamespaceNode(nodeHandle, inScope); 822 } 823 } 824 825 public int getNextSibling(int nodeHandle) 826 { 827 if (_dom != null) { 828 return _dom.getNextSibling(nodeHandle); 829 } 830 else { 831 return super.getNextSibling(nodeHandle); 832 } 833 } 834 835 public int getPreviousSibling(int nodeHandle) 836 { 837 if (_dom != null) { 838 return _dom.getPreviousSibling(nodeHandle); 839 } 840 else { 841 return super.getPreviousSibling(nodeHandle); 842 } 843 } 844 845 public int getNextAttribute(int nodeHandle) 846 { 847 if (_dom != null) { 848 return _dom.getNextAttribute(nodeHandle); 849 } 850 else { 851 return super.getNextAttribute(nodeHandle); 852 } 853 } 854 855 public int getNextNamespaceNode(int baseHandle, int namespaceHandle, 856 boolean inScope) 857 { 858 if (_dom != null) { 859 return _dom.getNextNamespaceNode(baseHandle, namespaceHandle, inScope); 860 } 861 else { 862 return super.getNextNamespaceNode(baseHandle, namespaceHandle, inScope); 863 } 864 } 865 866 public int getOwnerDocument(int nodeHandle) 867 { 868 if (_dom != null) { 869 return _dom.getOwnerDocument(nodeHandle); 870 } 871 else { 872 return super.getOwnerDocument(nodeHandle); 873 } 874 } 875 876 public int getDocumentRoot(int nodeHandle) 877 { 878 if (_dom != null) { 879 return _dom.getDocumentRoot(nodeHandle); 880 } 881 else { 882 return super.getDocumentRoot(nodeHandle); 883 } 884 } 885 886 public XMLString getStringValue(int nodeHandle) 887 { 888 if (_dom != null) { 889 return _dom.getStringValue(nodeHandle); 890 } 891 else { 892 return super.getStringValue(nodeHandle); 893 } 894 } 895 896 public int getStringValueChunkCount(int nodeHandle) 897 { 898 if (_dom != null) { 899 return _dom.getStringValueChunkCount(nodeHandle); 900 } 901 else { 902 return super.getStringValueChunkCount(nodeHandle); 903 } 904 } 905 906 public char[] getStringValueChunk(int nodeHandle, int chunkIndex, 907 int[] startAndLen) 908 { 909 if (_dom != null) { 910 return _dom.getStringValueChunk(nodeHandle, chunkIndex, startAndLen); 911 } 912 else { 913 return super.getStringValueChunk(nodeHandle, chunkIndex, startAndLen); 914 } 915 } 916 917 public int getExpandedTypeID(String namespace, String localName, int type) 918 { 919 if (_dom != null) { 920 return _dom.getExpandedTypeID(namespace, localName, type); 921 } 922 else { 923 return super.getExpandedTypeID(namespace, localName, type); 924 } 925 } 926 927 public String getLocalNameFromExpandedNameID(int ExpandedNameID) 928 { 929 if (_dom != null) { 930 return _dom.getLocalNameFromExpandedNameID(ExpandedNameID); 931 } 932 else { 933 return super.getLocalNameFromExpandedNameID(ExpandedNameID); 934 } 935 } 936 937 public String getNamespaceFromExpandedNameID(int ExpandedNameID) 938 { 939 if (_dom != null) { 940 return _dom.getNamespaceFromExpandedNameID(ExpandedNameID); 941 } 942 else { 943 return super.getNamespaceFromExpandedNameID(ExpandedNameID); 944 } 945 } 946 947 public String getLocalName(int nodeHandle) 948 { 949 if (_dom != null) { 950 return _dom.getLocalName(nodeHandle); 951 } 952 else { 953 return super.getLocalName(nodeHandle); 954 } 955 } 956 957 public String getPrefix(int nodeHandle) 958 { 959 if (_dom != null) { 960 return _dom.getPrefix(nodeHandle); 961 } 962 else { 963 return super.getPrefix(nodeHandle); 964 } 965 } 966 967 public String getNamespaceURI(int nodeHandle) 968 { 969 if (_dom != null) { 970 return _dom.getNamespaceURI(nodeHandle); 971 } 972 else { 973 return super.getNamespaceURI(nodeHandle); 974 } 975 } 976 977 public String getNodeValue(int nodeHandle) 978 { 979 if (_dom != null) { 980 return _dom.getNodeValue(nodeHandle); 981 } 982 else { 983 return super.getNodeValue(nodeHandle); 984 } 985 } 986 987 public short getNodeType(int nodeHandle) 988 { 989 if (_dom != null) { 990 return _dom.getNodeType(nodeHandle); 991 } 992 else { 993 return super.getNodeType(nodeHandle); 994 } 995 } 996 997 public short getLevel(int nodeHandle) 998 { 999 if (_dom != null) { 1000 return _dom.getLevel(nodeHandle); 1001 } 1002 else { 1003 return super.getLevel(nodeHandle); 1004 } 1005 } 1006 1007 public boolean isSupported(String feature, String version) 1008 { 1009 if (_dom != null) { 1010 return _dom.isSupported(feature, version); 1011 } 1012 else { 1013 return super.isSupported(feature, version); 1014 } 1015 } 1016 1017 public String getDocumentBaseURI() 1018 { 1019 if (_dom != null) { 1020 return _dom.getDocumentBaseURI(); 1021 } 1022 else { 1023 return super.getDocumentBaseURI(); 1024 } 1025 } 1026 1027 public void setDocumentBaseURI(String baseURI) 1028 { 1029 if (_dom != null) { 1030 _dom.setDocumentBaseURI(baseURI); 1031 } 1032 else { 1033 super.setDocumentBaseURI(baseURI); 1034 } 1035 } 1036 1037 public String getDocumentSystemIdentifier(int nodeHandle) 1038 { 1039 if (_dom != null) { 1040 return _dom.getDocumentSystemIdentifier(nodeHandle); 1041 } 1042 else { 1043 return super.getDocumentSystemIdentifier(nodeHandle); 1044 } 1045 } 1046 1047 public String getDocumentEncoding(int nodeHandle) 1048 { 1049 if (_dom != null) { 1050 return _dom.getDocumentEncoding(nodeHandle); 1051 } 1052 else { 1053 return super.getDocumentEncoding(nodeHandle); 1054 } 1055 } 1056 1057 public String getDocumentStandalone(int nodeHandle) 1058 { 1059 if (_dom != null) { 1060 return _dom.getDocumentStandalone(nodeHandle); 1061 } 1062 else { 1063 return super.getDocumentStandalone(nodeHandle); 1064 } 1065 } 1066 1067 public String getDocumentVersion(int documentHandle) 1068 { 1069 if (_dom != null) { 1070 return _dom.getDocumentVersion(documentHandle); 1071 } 1072 else { 1073 return super.getDocumentVersion(documentHandle); 1074 } 1075 } 1076 1077 public boolean getDocumentAllDeclarationsProcessed() 1078 { 1079 if (_dom != null) { 1080 return _dom.getDocumentAllDeclarationsProcessed(); 1081 } 1082 else { 1083 return super.getDocumentAllDeclarationsProcessed(); 1084 } 1085 } 1086 1087 public String getDocumentTypeDeclarationSystemIdentifier() 1088 { 1089 if (_dom != null) { 1090 return _dom.getDocumentTypeDeclarationSystemIdentifier(); 1091 } 1092 else { 1093 return super.getDocumentTypeDeclarationSystemIdentifier(); 1094 } 1095 } 1096 1097 public String getDocumentTypeDeclarationPublicIdentifier() 1098 { 1099 if (_dom != null) { 1100 return _dom.getDocumentTypeDeclarationPublicIdentifier(); 1101 } 1102 else { 1103 return super.getDocumentTypeDeclarationPublicIdentifier(); 1104 } 1105 } 1106 1107 public int getElementById(String elementId) 1108 { 1109 if (_dom != null) { 1110 return _dom.getElementById(elementId); 1111 } 1112 else { 1113 return super.getElementById(elementId); 1114 } 1115 } 1116 1117 public boolean supportsPreStripping() 1118 { 1119 if (_dom != null) { 1120 return _dom.supportsPreStripping(); 1121 } 1122 else { 1123 return super.supportsPreStripping(); 1124 } 1125 } 1126 1127 public boolean isNodeAfter(int firstNodeHandle, int secondNodeHandle) 1128 { 1129 if (_dom != null) { 1130 return _dom.isNodeAfter(firstNodeHandle, secondNodeHandle); 1131 } 1132 else { 1133 return super.isNodeAfter(firstNodeHandle, secondNodeHandle); 1134 } 1135 } 1136 1137 public boolean isCharacterElementContentWhitespace(int nodeHandle) 1138 { 1139 if (_dom != null) { 1140 return _dom.isCharacterElementContentWhitespace(nodeHandle); 1141 } 1142 else { 1143 return super.isCharacterElementContentWhitespace(nodeHandle); 1144 } 1145 } 1146 1147 public boolean isDocumentAllDeclarationsProcessed(int documentHandle) 1148 { 1149 if (_dom != null) { 1150 return _dom.isDocumentAllDeclarationsProcessed(documentHandle); 1151 } 1152 else { 1153 return super.isDocumentAllDeclarationsProcessed(documentHandle); 1154 } 1155 } 1156 1157 public boolean isAttributeSpecified(int attributeHandle) 1158 { 1159 if (_dom != null) { 1160 return _dom.isAttributeSpecified(attributeHandle); 1161 } 1162 else { 1163 return super.isAttributeSpecified(attributeHandle); 1164 } 1165 } 1166 1167 public void dispatchCharactersEvents(int nodeHandle, org.xml.sax.ContentHandler ch, 1168 boolean normalize) 1169 throws org.xml.sax.SAXException 1170 { 1171 if (_dom != null) { 1172 _dom.dispatchCharactersEvents(nodeHandle, ch, normalize); 1173 } 1174 else { 1175 super.dispatchCharactersEvents(nodeHandle, ch, normalize); 1176 } 1177 } 1178 1179 public void dispatchToEvents(int nodeHandle, org.xml.sax.ContentHandler ch) 1180 throws org.xml.sax.SAXException 1181 { 1182 if (_dom != null) { 1183 _dom.dispatchToEvents(nodeHandle, ch); 1184 } 1185 else { 1186 super.dispatchToEvents(nodeHandle, ch); 1187 } 1188 } 1189 1190 public org.w3c.dom.Node getNode(int nodeHandle) 1191 { 1192 if (_dom != null) { 1193 return _dom.getNode(nodeHandle); 1194 } 1195 else { 1196 return super.getNode(nodeHandle); 1197 } 1198 } 1199 1200 public boolean needsTwoThreads() 1201 { 1202 if (_dom != null) { 1203 return _dom.needsTwoThreads(); 1204 } 1205 else { 1206 return super.needsTwoThreads(); 1207 } 1208 } 1209 1210 public org.xml.sax.ContentHandler getContentHandler() 1211 { 1212 if (_dom != null) { 1213 return _dom.getContentHandler(); 1214 } 1215 else { 1216 return super.getContentHandler(); 1217 } 1218 } 1219 1220 public org.xml.sax.ext.LexicalHandler getLexicalHandler() 1221 { 1222 if (_dom != null) { 1223 return _dom.getLexicalHandler(); 1224 } 1225 else { 1226 return super.getLexicalHandler(); 1227 } 1228 } 1229 1230 public org.xml.sax.EntityResolver getEntityResolver() 1231 { 1232 if (_dom != null) { 1233 return _dom.getEntityResolver(); 1234 } 1235 else { 1236 return super.getEntityResolver(); 1237 } 1238 } 1239 1240 public org.xml.sax.DTDHandler getDTDHandler() 1241 { 1242 if (_dom != null) { 1243 return _dom.getDTDHandler(); 1244 } 1245 else { 1246 return super.getDTDHandler(); 1247 } 1248 } 1249 1250 public org.xml.sax.ErrorHandler getErrorHandler() 1251 { 1252 if (_dom != null) { 1253 return _dom.getErrorHandler(); 1254 } 1255 else { 1256 return super.getErrorHandler(); 1257 } 1258 } 1259 1260 public org.xml.sax.ext.DeclHandler getDeclHandler() 1261 { 1262 if (_dom != null) { 1263 return _dom.getDeclHandler(); 1264 } 1265 else { 1266 return super.getDeclHandler(); 1267 } 1268 } 1269 1270 public void appendChild(int newChild, boolean clone, boolean cloneDepth) 1271 { 1272 if (_dom != null) { 1273 _dom.appendChild(newChild, clone, cloneDepth); 1274 } 1275 else { 1276 super.appendChild(newChild, clone, cloneDepth); 1277 } 1278 } 1279 1280 public void appendTextChild(String str) 1281 { 1282 if (_dom != null) { 1283 _dom.appendTextChild(str); 1284 } 1285 else { 1286 super.appendTextChild(str); 1287 } 1288 } 1289 1290 public SourceLocator getSourceLocatorFor(int node) 1291 { 1292 if (_dom != null) { 1293 return _dom.getSourceLocatorFor(node); 1294 } 1295 else { 1296 return super.getSourceLocatorFor(node); 1297 } 1298 } 1299 1300 public void documentRegistration() 1301 { 1302 if (_dom != null) { 1303 _dom.documentRegistration(); 1304 } 1305 else { 1306 super.documentRegistration(); 1307 } 1308 } 1309 1310 public void documentRelease() 1311 { 1312 if (_dom != null) { 1313 _dom.documentRelease(); 1314 } 1315 else { 1316 super.documentRelease(); 1317 } 1318 } 1319 1320} 1321 | Popular Tags |