1 16 19 package org.apache.xalan.xsltc.dom; 20 21 import org.apache.xalan.xsltc.DOM; 22 import org.apache.xalan.xsltc.TransletException; 23 import org.apache.xalan.xsltc.StripFilter; 24 import org.apache.xalan.xsltc.runtime.Hashtable; 25 import org.apache.xalan.xsltc.runtime.BasisLibrary; 26 import org.apache.xalan.xsltc.runtime.AttributeList; 27 28 import org.apache.xml.dtm.DTMAxisIterator; 29 import org.apache.xml.dtm.DTMAxisTraverser; 30 import org.apache.xml.dtm.DTMWSFilter; 31 import org.apache.xml.utils.XMLString; 32 33 import org.apache.xml.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 _dom.startElement(null, _openElementName.substring(index+1), _openElementName, _attributes); 576 577 578 _openElementName = null; 579 } 580 } 581 582 private void prepareNewDOM() throws SAXException 584 { 585 _dom = (SAXImpl)_dtmManager.getDTM(null, true, _wsfilter, 586 true, false, false, 587 _initSize, _buildIdIndex); 588 _dom.startDocument(); 589 for (int i = 0; i < _size; i++) { 591 String str = _textArray[i]; 592 _dom.characters(str.toCharArray(), 0, str.length()); 593 } 594 _size = 0; 595 } 596 597 public void startDocument() throws SAXException 598 { 599 } 600 601 public void endDocument() throws SAXException 602 { 603 if (_dom != null) { 604 _dom.endDocument(); 605 } 606 else { 607 super.endDocument(); 608 } 609 } 610 611 public void characters(String str) throws SAXException 612 { 613 if (_dom != null) { 614 characters(str.toCharArray(), 0, str.length()); 615 } 616 else { 617 super.characters(str); 618 } 619 } 620 621 public void characters(char[] ch, int offset, int length) 622 throws SAXException 623 { 624 if (_dom != null) { 625 maybeEmitStartElement(); 626 _dom.characters(ch, offset, length); 627 } 628 else { 629 super.characters(ch, offset, length); 630 } 631 } 632 633 public boolean setEscaping(boolean escape) throws SAXException 634 { 635 if (_dom != null) { 636 return _dom.setEscaping(escape); 637 } 638 else { 639 return super.setEscaping(escape); 640 } 641 } 642 643 public void startElement(String elementName) throws SAXException 644 { 645 if (_dom == null) { 646 prepareNewDOM(); 647 } 648 649 maybeEmitStartElement(); 650 _openElementName = elementName; 651 _attributes.clear(); 652 } 653 654 public void startElement(String uri, String localName, String qName) 655 throws SAXException 656 { 657 startElement(qName); 658 } 659 660 public void startElement(String uri, String localName, String qName, Attributes attributes) 661 throws SAXException 662 { 663 startElement(qName); 664 } 665 666 public void endElement(String elementName) throws SAXException 667 { 668 maybeEmitStartElement(); 669 _dom.endElement(null, null, elementName); 670 } 671 672 public void endElement(String uri, String localName, String qName) 673 throws SAXException 674 { 675 endElement(qName); 676 } 677 678 public void addUniqueAttribute(String qName, String value, int flags) 679 throws SAXException 680 { 681 addAttribute(qName, value); 682 } 683 684 public void addAttribute(String name, String value) 685 { 686 if (_openElementName != null) { 687 _attributes.add(name, value); 688 } 689 else { 690 BasisLibrary.runTimeError(BasisLibrary.STRAY_ATTRIBUTE_ERR, name); 691 } 692 } 693 694 public void namespaceAfterStartElement(String prefix, String uri) 695 throws SAXException 696 { 697 if (_dom == null) { 698 prepareNewDOM(); 699 } 700 701 _dom.startPrefixMapping(prefix, uri); 702 } 703 704 public void comment(String comment) throws SAXException 705 { 706 if (_dom == null) { 707 prepareNewDOM(); 708 } 709 710 maybeEmitStartElement(); 711 char[] chars = comment.toCharArray(); 712 _dom.comment(chars, 0, chars.length); 713 } 714 715 public void comment(char[] chars, int offset, int length) 716 throws SAXException 717 { 718 if (_dom == null) { 719 prepareNewDOM(); 720 } 721 722 maybeEmitStartElement(); 723 _dom.comment(chars, offset, length); 724 } 725 726 public void processingInstruction(String target, String data) 727 throws SAXException 728 { 729 if (_dom == null) { 730 prepareNewDOM(); 731 } 732 733 maybeEmitStartElement(); 734 _dom.processingInstruction(target, data); 735 } 736 737 738 739 public void setFeature(String featureId, boolean state) 740 { 741 if (_dom != null) { 742 _dom.setFeature(featureId, state); 743 } 744 } 745 746 public void setProperty(String property, Object value) 747 { 748 if (_dom != null) { 749 _dom.setProperty(property, value); 750 } 751 } 752 753 public DTMAxisTraverser getAxisTraverser(final int axis) 754 { 755 if (_dom != null) { 756 return _dom.getAxisTraverser(axis); 757 } 758 else { 759 return super.getAxisTraverser(axis); 760 } 761 } 762 763 public boolean hasChildNodes(int nodeHandle) 764 { 765 if (_dom != null) { 766 return _dom.hasChildNodes(nodeHandle); 767 } 768 else { 769 return super.hasChildNodes(nodeHandle); 770 } 771 } 772 773 public int getFirstChild(int nodeHandle) 774 { 775 if (_dom != null) { 776 return _dom.getFirstChild(nodeHandle); 777 } 778 else { 779 return super.getFirstChild(nodeHandle); 780 } 781 } 782 783 public int getLastChild(int nodeHandle) 784 { 785 if (_dom != null) { 786 return _dom.getLastChild(nodeHandle); 787 } 788 else { 789 return super.getLastChild(nodeHandle); 790 } 791 } 792 793 public int getAttributeNode(int elementHandle, String namespaceURI, String name) 794 { 795 if (_dom != null) { 796 return _dom.getAttributeNode(elementHandle, namespaceURI, name); 797 } 798 else { 799 return super.getAttributeNode(elementHandle, namespaceURI, name); 800 } 801 } 802 803 public int getFirstAttribute(int nodeHandle) 804 { 805 if (_dom != null) { 806 return _dom.getFirstAttribute(nodeHandle); 807 } 808 else { 809 return super.getFirstAttribute(nodeHandle); 810 } 811 } 812 813 public int getFirstNamespaceNode(int nodeHandle, boolean inScope) 814 { 815 if (_dom != null) { 816 return _dom.getFirstNamespaceNode(nodeHandle, inScope); 817 } 818 else { 819 return super.getFirstNamespaceNode(nodeHandle, inScope); 820 } 821 } 822 823 public int getNextSibling(int nodeHandle) 824 { 825 if (_dom != null) { 826 return _dom.getNextSibling(nodeHandle); 827 } 828 else { 829 return super.getNextSibling(nodeHandle); 830 } 831 } 832 833 public int getPreviousSibling(int nodeHandle) 834 { 835 if (_dom != null) { 836 return _dom.getPreviousSibling(nodeHandle); 837 } 838 else { 839 return super.getPreviousSibling(nodeHandle); 840 } 841 } 842 843 public int getNextAttribute(int nodeHandle) 844 { 845 if (_dom != null) { 846 return _dom.getNextAttribute(nodeHandle); 847 } 848 else { 849 return super.getNextAttribute(nodeHandle); 850 } 851 } 852 853 public int getNextNamespaceNode(int baseHandle, int namespaceHandle, 854 boolean inScope) 855 { 856 if (_dom != null) { 857 return _dom.getNextNamespaceNode(baseHandle, namespaceHandle, inScope); 858 } 859 else { 860 return super.getNextNamespaceNode(baseHandle, namespaceHandle, inScope); 861 } 862 } 863 864 public int getOwnerDocument(int nodeHandle) 865 { 866 if (_dom != null) { 867 return _dom.getOwnerDocument(nodeHandle); 868 } 869 else { 870 return super.getOwnerDocument(nodeHandle); 871 } 872 } 873 874 public int getDocumentRoot(int nodeHandle) 875 { 876 if (_dom != null) { 877 return _dom.getDocumentRoot(nodeHandle); 878 } 879 else { 880 return super.getDocumentRoot(nodeHandle); 881 } 882 } 883 884 public XMLString getStringValue(int nodeHandle) 885 { 886 if (_dom != null) { 887 return _dom.getStringValue(nodeHandle); 888 } 889 else { 890 return super.getStringValue(nodeHandle); 891 } 892 } 893 894 public int getStringValueChunkCount(int nodeHandle) 895 { 896 if (_dom != null) { 897 return _dom.getStringValueChunkCount(nodeHandle); 898 } 899 else { 900 return super.getStringValueChunkCount(nodeHandle); 901 } 902 } 903 904 public char[] getStringValueChunk(int nodeHandle, int chunkIndex, 905 int[] startAndLen) 906 { 907 if (_dom != null) { 908 return _dom.getStringValueChunk(nodeHandle, chunkIndex, startAndLen); 909 } 910 else { 911 return super.getStringValueChunk(nodeHandle, chunkIndex, startAndLen); 912 } 913 } 914 915 public int getExpandedTypeID(String namespace, String localName, int type) 916 { 917 if (_dom != null) { 918 return _dom.getExpandedTypeID(namespace, localName, type); 919 } 920 else { 921 return super.getExpandedTypeID(namespace, localName, type); 922 } 923 } 924 925 public String getLocalNameFromExpandedNameID(int ExpandedNameID) 926 { 927 if (_dom != null) { 928 return _dom.getLocalNameFromExpandedNameID(ExpandedNameID); 929 } 930 else { 931 return super.getLocalNameFromExpandedNameID(ExpandedNameID); 932 } 933 } 934 935 public String getNamespaceFromExpandedNameID(int ExpandedNameID) 936 { 937 if (_dom != null) { 938 return _dom.getNamespaceFromExpandedNameID(ExpandedNameID); 939 } 940 else { 941 return super.getNamespaceFromExpandedNameID(ExpandedNameID); 942 } 943 } 944 945 public String getLocalName(int nodeHandle) 946 { 947 if (_dom != null) { 948 return _dom.getLocalName(nodeHandle); 949 } 950 else { 951 return super.getLocalName(nodeHandle); 952 } 953 } 954 955 public String getPrefix(int nodeHandle) 956 { 957 if (_dom != null) { 958 return _dom.getPrefix(nodeHandle); 959 } 960 else { 961 return super.getPrefix(nodeHandle); 962 } 963 } 964 965 public String getNamespaceURI(int nodeHandle) 966 { 967 if (_dom != null) { 968 return _dom.getNamespaceURI(nodeHandle); 969 } 970 else { 971 return super.getNamespaceURI(nodeHandle); 972 } 973 } 974 975 public String getNodeValue(int nodeHandle) 976 { 977 if (_dom != null) { 978 return _dom.getNodeValue(nodeHandle); 979 } 980 else { 981 return super.getNodeValue(nodeHandle); 982 } 983 } 984 985 public short getNodeType(int nodeHandle) 986 { 987 if (_dom != null) { 988 return _dom.getNodeType(nodeHandle); 989 } 990 else { 991 return super.getNodeType(nodeHandle); 992 } 993 } 994 995 public short getLevel(int nodeHandle) 996 { 997 if (_dom != null) { 998 return _dom.getLevel(nodeHandle); 999 } 1000 else { 1001 return super.getLevel(nodeHandle); 1002 } 1003 } 1004 1005 public boolean isSupported(String feature, String version) 1006 { 1007 if (_dom != null) { 1008 return _dom.isSupported(feature, version); 1009 } 1010 else { 1011 return super.isSupported(feature, version); 1012 } 1013 } 1014 1015 public String getDocumentBaseURI() 1016 { 1017 if (_dom != null) { 1018 return _dom.getDocumentBaseURI(); 1019 } 1020 else { 1021 return super.getDocumentBaseURI(); 1022 } 1023 } 1024 1025 public void setDocumentBaseURI(String baseURI) 1026 { 1027 if (_dom != null) { 1028 _dom.setDocumentBaseURI(baseURI); 1029 } 1030 else { 1031 super.setDocumentBaseURI(baseURI); 1032 } 1033 } 1034 1035 public String getDocumentSystemIdentifier(int nodeHandle) 1036 { 1037 if (_dom != null) { 1038 return _dom.getDocumentSystemIdentifier(nodeHandle); 1039 } 1040 else { 1041 return super.getDocumentSystemIdentifier(nodeHandle); 1042 } 1043 } 1044 1045 public String getDocumentEncoding(int nodeHandle) 1046 { 1047 if (_dom != null) { 1048 return _dom.getDocumentEncoding(nodeHandle); 1049 } 1050 else { 1051 return super.getDocumentEncoding(nodeHandle); 1052 } 1053 } 1054 1055 public String getDocumentStandalone(int nodeHandle) 1056 { 1057 if (_dom != null) { 1058 return _dom.getDocumentStandalone(nodeHandle); 1059 } 1060 else { 1061 return super.getDocumentStandalone(nodeHandle); 1062 } 1063 } 1064 1065 public String getDocumentVersion(int documentHandle) 1066 { 1067 if (_dom != null) { 1068 return _dom.getDocumentVersion(documentHandle); 1069 } 1070 else { 1071 return super.getDocumentVersion(documentHandle); 1072 } 1073 } 1074 1075 public boolean getDocumentAllDeclarationsProcessed() 1076 { 1077 if (_dom != null) { 1078 return _dom.getDocumentAllDeclarationsProcessed(); 1079 } 1080 else { 1081 return super.getDocumentAllDeclarationsProcessed(); 1082 } 1083 } 1084 1085 public String getDocumentTypeDeclarationSystemIdentifier() 1086 { 1087 if (_dom != null) { 1088 return _dom.getDocumentTypeDeclarationSystemIdentifier(); 1089 } 1090 else { 1091 return super.getDocumentTypeDeclarationSystemIdentifier(); 1092 } 1093 } 1094 1095 public String getDocumentTypeDeclarationPublicIdentifier() 1096 { 1097 if (_dom != null) { 1098 return _dom.getDocumentTypeDeclarationPublicIdentifier(); 1099 } 1100 else { 1101 return super.getDocumentTypeDeclarationPublicIdentifier(); 1102 } 1103 } 1104 1105 public int getElementById(String elementId) 1106 { 1107 if (_dom != null) { 1108 return _dom.getElementById(elementId); 1109 } 1110 else { 1111 return super.getElementById(elementId); 1112 } 1113 } 1114 1115 public boolean supportsPreStripping() 1116 { 1117 if (_dom != null) { 1118 return _dom.supportsPreStripping(); 1119 } 1120 else { 1121 return super.supportsPreStripping(); 1122 } 1123 } 1124 1125 public boolean isNodeAfter(int firstNodeHandle, int secondNodeHandle) 1126 { 1127 if (_dom != null) { 1128 return _dom.isNodeAfter(firstNodeHandle, secondNodeHandle); 1129 } 1130 else { 1131 return super.isNodeAfter(firstNodeHandle, secondNodeHandle); 1132 } 1133 } 1134 1135 public boolean isCharacterElementContentWhitespace(int nodeHandle) 1136 { 1137 if (_dom != null) { 1138 return _dom.isCharacterElementContentWhitespace(nodeHandle); 1139 } 1140 else { 1141 return super.isCharacterElementContentWhitespace(nodeHandle); 1142 } 1143 } 1144 1145 public boolean isDocumentAllDeclarationsProcessed(int documentHandle) 1146 { 1147 if (_dom != null) { 1148 return _dom.isDocumentAllDeclarationsProcessed(documentHandle); 1149 } 1150 else { 1151 return super.isDocumentAllDeclarationsProcessed(documentHandle); 1152 } 1153 } 1154 1155 public boolean isAttributeSpecified(int attributeHandle) 1156 { 1157 if (_dom != null) { 1158 return _dom.isAttributeSpecified(attributeHandle); 1159 } 1160 else { 1161 return super.isAttributeSpecified(attributeHandle); 1162 } 1163 } 1164 1165 public void dispatchCharactersEvents(int nodeHandle, org.xml.sax.ContentHandler ch, 1166 boolean normalize) 1167 throws org.xml.sax.SAXException 1168 { 1169 if (_dom != null) { 1170 _dom.dispatchCharactersEvents(nodeHandle, ch, normalize); 1171 } 1172 else { 1173 super.dispatchCharactersEvents(nodeHandle, ch, normalize); 1174 } 1175 } 1176 1177 public void dispatchToEvents(int nodeHandle, org.xml.sax.ContentHandler ch) 1178 throws org.xml.sax.SAXException 1179 { 1180 if (_dom != null) { 1181 _dom.dispatchToEvents(nodeHandle, ch); 1182 } 1183 else { 1184 super.dispatchToEvents(nodeHandle, ch); 1185 } 1186 } 1187 1188 public org.w3c.dom.Node getNode(int nodeHandle) 1189 { 1190 if (_dom != null) { 1191 return _dom.getNode(nodeHandle); 1192 } 1193 else { 1194 return super.getNode(nodeHandle); 1195 } 1196 } 1197 1198 public boolean needsTwoThreads() 1199 { 1200 if (_dom != null) { 1201 return _dom.needsTwoThreads(); 1202 } 1203 else { 1204 return super.needsTwoThreads(); 1205 } 1206 } 1207 1208 public org.xml.sax.ContentHandler getContentHandler() 1209 { 1210 if (_dom != null) { 1211 return _dom.getContentHandler(); 1212 } 1213 else { 1214 return super.getContentHandler(); 1215 } 1216 } 1217 1218 public org.xml.sax.ext.LexicalHandler getLexicalHandler() 1219 { 1220 if (_dom != null) { 1221 return _dom.getLexicalHandler(); 1222 } 1223 else { 1224 return super.getLexicalHandler(); 1225 } 1226 } 1227 1228 public org.xml.sax.EntityResolver getEntityResolver() 1229 { 1230 if (_dom != null) { 1231 return _dom.getEntityResolver(); 1232 } 1233 else { 1234 return super.getEntityResolver(); 1235 } 1236 } 1237 1238 public org.xml.sax.DTDHandler getDTDHandler() 1239 { 1240 if (_dom != null) { 1241 return _dom.getDTDHandler(); 1242 } 1243 else { 1244 return super.getDTDHandler(); 1245 } 1246 } 1247 1248 public org.xml.sax.ErrorHandler getErrorHandler() 1249 { 1250 if (_dom != null) { 1251 return _dom.getErrorHandler(); 1252 } 1253 else { 1254 return super.getErrorHandler(); 1255 } 1256 } 1257 1258 public org.xml.sax.ext.DeclHandler getDeclHandler() 1259 { 1260 if (_dom != null) { 1261 return _dom.getDeclHandler(); 1262 } 1263 else { 1264 return super.getDeclHandler(); 1265 } 1266 } 1267 1268 public void appendChild(int newChild, boolean clone, boolean cloneDepth) 1269 { 1270 if (_dom != null) { 1271 _dom.appendChild(newChild, clone, cloneDepth); 1272 } 1273 else { 1274 super.appendChild(newChild, clone, cloneDepth); 1275 } 1276 } 1277 1278 public void appendTextChild(String str) 1279 { 1280 if (_dom != null) { 1281 _dom.appendTextChild(str); 1282 } 1283 else { 1284 super.appendTextChild(str); 1285 } 1286 } 1287 1288 public SourceLocator getSourceLocatorFor(int node) 1289 { 1290 if (_dom != null) { 1291 return _dom.getSourceLocatorFor(node); 1292 } 1293 else { 1294 return super.getSourceLocatorFor(node); 1295 } 1296 } 1297 1298 public void documentRegistration() 1299 { 1300 if (_dom != null) { 1301 _dom.documentRegistration(); 1302 } 1303 else { 1304 super.documentRegistration(); 1305 } 1306 } 1307 1308 public void documentRelease() 1309 { 1310 if (_dom != null) { 1311 _dom.documentRelease(); 1312 } 1313 else { 1314 super.documentRelease(); 1315 } 1316 } 1317 1318} 1319 | Popular Tags |