1 16 19 20 package org.apache.xalan.lib.sql; 21 22 import java.io.File ; 23 import java.io.FileOutputStream ; 24 import java.io.IOException ; 25 import java.io.PrintStream ; 26 27 import javax.xml.transform.SourceLocator ; 28 29 import org.apache.xml.dtm.DTM; 30 import org.apache.xml.dtm.DTMAxisIterator; 31 import org.apache.xml.dtm.DTMAxisTraverser; 32 import org.apache.xml.dtm.DTMManager; 33 import org.apache.xml.dtm.ref.DTMDefaultBaseIterators; 34 import org.apache.xml.utils.FastStringBuffer; 35 import org.apache.xml.utils.StringBufferPool; 36 import org.apache.xml.utils.SuballocatedIntVector; 37 import org.apache.xml.utils.XMLString; 38 39 import org.w3c.dom.Node ; 40 41 import org.xml.sax.ContentHandler ; 42 import org.xml.sax.DTDHandler ; 43 import org.xml.sax.EntityResolver ; 44 import org.xml.sax.ErrorHandler ; 45 import org.xml.sax.ext.DeclHandler ; 46 import org.xml.sax.ext.LexicalHandler ; 47 48 51 public class DTMDocument extends DTMDefaultBaseIterators 52 { 53 54 56 public interface CharacterNodeHandler 57 { 58 63 public void characters( Node node )throws org.xml.sax.SAXException ; 64 } 65 66 68 private boolean DEBUG = false; 69 70 72 protected static final String S_NAMESPACE = "http://xml.apache.org/xalan/SQLExtension"; 73 74 76 protected static final String S_ATTRIB_NOT_SUPPORTED = "Not Supported"; 77 79 protected static final String S_ISTRUE = "true"; 80 82 protected static final String S_ISFALSE = "false"; 83 84 86 protected static final String S_DOCUMENT = "#root"; 87 89 protected static final String S_TEXT_NODE = "#text"; 90 92 protected static final String S_ELEMENT_NODE = "#element"; 93 94 96 protected int m_Document_TypeID = 0; 97 99 protected int m_TextNode_TypeID = 0; 100 101 102 105 protected ObjectArray m_ObjectArray = new ObjectArray(); 106 107 115 protected SuballocatedIntVector m_attribute; 116 117 121 protected int m_DocumentIdx; 122 123 124 128 public DTMDocument( DTMManager mgr, int ident ) 129 { 130 super(mgr, null, ident, 131 null, mgr.getXMLStringFactory(), true); 132 133 m_attribute = new SuballocatedIntVector(DEFAULT_BLOCKSIZE); 134 } 135 136 143 private int allocateNodeObject( Object o ) 144 { 145 m_size++; 147 return m_ObjectArray.append(o); 148 } 149 150 158 protected int addElementWithData( Object o, int level, int extendedType, int parent, int prevsib ) 159 { 160 int elementIdx = addElement(level,extendedType,parent,prevsib); 161 162 int data = allocateNodeObject(o); 163 m_firstch.setElementAt(data,elementIdx); 164 165 m_exptype.setElementAt(m_TextNode_TypeID, data); 166 m_parent.setElementAt(elementIdx, data); 168 169 m_prevsib.setElementAt(DTM.NULL, data); 170 m_nextsib.setElementAt(DTM.NULL, data); 171 m_attribute.setElementAt(DTM.NULL, data); 172 m_firstch.setElementAt(DTM.NULL, data); 173 174 return elementIdx; 175 } 176 177 184 protected int addElement( int level, int extendedType, int parent, int prevsib ) 185 { 186 int node = DTM.NULL; 187 188 try 189 { 190 node = allocateNodeObject(S_ELEMENT_NODE); 192 193 m_exptype.setElementAt(extendedType, node); 194 m_nextsib.setElementAt(DTM.NULL, node); 195 m_prevsib.setElementAt(prevsib, node); 196 197 m_parent.setElementAt(parent, node); 198 m_firstch.setElementAt(DTM.NULL, node); 199 m_attribute.setElementAt(DTM.NULL, node); 201 202 if (prevsib != DTM.NULL) 203 { 204 if (m_nextsib.elementAt(prevsib) != DTM.NULL) 207 m_nextsib.setElementAt(m_nextsib.elementAt(prevsib), node); 208 209 m_nextsib.setElementAt(node, prevsib); 211 } 212 213 if ((parent != DTM.NULL) && (m_prevsib.elementAt(node) == DTM.NULL)) 219 { 220 m_firstch.setElementAt(node, parent); 221 } 222 } 223 catch(Exception e) 224 { 225 error("Error in addElement: "+e.getMessage()); 226 } 227 228 return node; 229 } 230 231 242 protected int addAttributeToNode( Object o, int extendedType, int pnode ) 243 { 244 int attrib = DTM.NULL; 245 int prevsib = DTM.NULL; 246 int lastattrib = DTM.NULL; 247 int value = DTM.NULL; 248 249 try 250 { 251 attrib = allocateNodeObject(o); 253 254 m_attribute.setElementAt(DTM.NULL, attrib); 255 m_exptype.setElementAt(extendedType, attrib); 256 258 m_nextsib.setElementAt(DTM.NULL, attrib); 260 m_prevsib.setElementAt(DTM.NULL,attrib); 261 m_parent.setElementAt(pnode, attrib); 265 m_firstch.setElementAt(DTM.NULL, attrib); 266 267 if (m_attribute.elementAt(pnode) != DTM.NULL) 268 { 269 lastattrib = m_attribute.elementAt(pnode); 272 m_nextsib.setElementAt(lastattrib, attrib); 273 m_prevsib.setElementAt(attrib, lastattrib); 274 } 275 m_attribute.setElementAt(attrib, pnode); 278 } 279 catch(Exception e) 280 { 281 error("Error in addAttributeToNode: "+e.getMessage()); 282 } 283 284 return attrib; 285 } 286 287 296 protected void cloneAttributeFromNode( int toNode, int fromNode ) 297 { 298 try 299 { 300 if (m_attribute.elementAt(toNode) != DTM.NULL) 301 { 302 error("Cloneing Attributes, where from Node already had addtibures assigned"); 303 } 304 305 m_attribute.setElementAt(m_attribute.elementAt(fromNode), toNode); 306 } 307 catch(Exception e) 308 { 309 error("Cloning attributes"); 310 } 311 } 312 313 314 318 public int getFirstAttribute( int parm1 ) 319 { 320 if (DEBUG) System.out.println("getFirstAttribute("+ parm1+")"); 321 int nodeIdx = makeNodeIdentity(parm1); 322 if (nodeIdx != DTM.NULL) 323 { 324 int attribIdx = m_attribute.elementAt(nodeIdx); 325 return makeNodeHandle(attribIdx); 326 } 327 else return DTM.NULL; 328 } 329 330 334 public String getNodeValue( int parm1 ) 335 { 336 if (DEBUG) System.out.println("getNodeValue(" + parm1 + ")"); 337 try 338 { 339 Object o = m_ObjectArray.getAt(makeNodeIdentity(parm1)); 340 if (o != null && o != S_ELEMENT_NODE) 341 { 342 return o.toString(); 343 } 344 else 345 { 346 return ""; 347 } 348 } 349 catch(Exception e) 350 { 351 error("Getting String Value"); 352 return null; 353 } 354 } 355 356 357 366 public XMLString getStringValue(int nodeHandle) 367 { 368 int nodeIdx = makeNodeIdentity(nodeHandle); 369 if (DEBUG) System.out.println("getStringValue(" + nodeIdx + ")"); 370 371 Object o = m_ObjectArray.getAt(nodeIdx); 372 if ( o == S_ELEMENT_NODE ) 373 { 374 FastStringBuffer buf = StringBufferPool.get(); 375 String s; 376 377 try 378 { 379 getNodeData(nodeIdx, buf); 380 381 s = (buf.length() > 0) ? buf.toString() : ""; 382 } 383 finally 384 { 385 StringBufferPool.free(buf); 386 } 387 388 return m_xstrf.newstr( s ); 389 } 390 else if( o != null ) 391 { 392 return m_xstrf.newstr(o.toString()); 393 } 394 else 395 return(m_xstrf.emptystr()); 396 } 397 398 420 protected void getNodeData(int nodeIdx, FastStringBuffer buf) 421 { 422 for ( int child = _firstch(nodeIdx) ; child != DTM.NULL ; child = _nextsib(child) ) 423 { 424 Object o = m_ObjectArray.getAt(child); 425 if ( o == S_ELEMENT_NODE ) 426 getNodeData(child, buf); 427 else if ( o != null ) 428 buf.append(o.toString()); 429 } 430 } 431 432 433 434 435 439 public int getNextAttribute( int parm1 ) 440 { 441 int nodeIdx = makeNodeIdentity(parm1); 442 if (DEBUG) System.out.println("getNextAttribute(" + nodeIdx + ")"); 443 if (nodeIdx != DTM.NULL) return makeNodeHandle(m_nextsib.elementAt(nodeIdx)); 444 else return DTM.NULL; 445 } 446 447 448 451 protected int getNumberOfNodes( ) 452 { 453 if (DEBUG) System.out.println("getNumberOfNodes()"); 454 return m_size; 455 } 456 457 460 protected boolean nextNode( ) 461 { 462 if (DEBUG) System.out.println("nextNode()"); 463 return false; 464 } 465 466 467 473 protected void createExpandedNameTable( ) 474 { 475 m_Document_TypeID = 476 m_expandedNameTable.getExpandedTypeID(S_NAMESPACE, S_DOCUMENT, DTM.DOCUMENT_NODE); 477 478 m_TextNode_TypeID = 479 m_expandedNameTable.getExpandedTypeID(S_NAMESPACE, S_TEXT_NODE, DTM.TEXT_NODE); 480 } 481 482 483 486 public void dumpDTM( ) 487 { 488 try 489 { 490 File f = new File ("DTMDump.txt"); 492 System.err.println("Dumping... "+f.getAbsolutePath()); 493 PrintStream ps = new PrintStream (new FileOutputStream (f)); 494 495 while (nextNode()){} 496 497 int nRecords = m_size; 498 499 ps.println("Total nodes: " + nRecords); 500 501 for (int i = 0; i < nRecords; i++) 502 { 503 ps.println("=========== " + i + " ==========="); 504 ps.println("NodeName: " + getNodeName(makeNodeHandle(i))); 505 ps.println("NodeNameX: " + getNodeNameX(makeNodeHandle(i))); 506 ps.println("LocalName: " + getLocalName(makeNodeHandle(i))); 507 ps.println("NamespaceURI: " + getNamespaceURI(makeNodeHandle(i))); 508 ps.println("Prefix: " + getPrefix(makeNodeHandle(i))); 509 510 int exTypeID = getExpandedTypeID(makeNodeHandle(i)); 511 512 ps.println("Expanded Type ID: " 513 + Integer.toHexString(exTypeID)); 514 515 int type = getNodeType(makeNodeHandle(i)); 516 String typestring; 517 518 switch (type) 519 { 520 case DTM.ATTRIBUTE_NODE : 521 typestring = "ATTRIBUTE_NODE"; 522 break; 523 case DTM.CDATA_SECTION_NODE : 524 typestring = "CDATA_SECTION_NODE"; 525 break; 526 case DTM.COMMENT_NODE : 527 typestring = "COMMENT_NODE"; 528 break; 529 case DTM.DOCUMENT_FRAGMENT_NODE : 530 typestring = "DOCUMENT_FRAGMENT_NODE"; 531 break; 532 case DTM.DOCUMENT_NODE : 533 typestring = "DOCUMENT_NODE"; 534 break; 535 case DTM.DOCUMENT_TYPE_NODE : 536 typestring = "DOCUMENT_NODE"; 537 break; 538 case DTM.ELEMENT_NODE : 539 typestring = "ELEMENT_NODE"; 540 break; 541 case DTM.ENTITY_NODE : 542 typestring = "ENTITY_NODE"; 543 break; 544 case DTM.ENTITY_REFERENCE_NODE : 545 typestring = "ENTITY_REFERENCE_NODE"; 546 break; 547 case DTM.NAMESPACE_NODE : 548 typestring = "NAMESPACE_NODE"; 549 break; 550 case DTM.NOTATION_NODE : 551 typestring = "NOTATION_NODE"; 552 break; 553 case DTM.NULL : 554 typestring = "NULL"; 555 break; 556 case DTM.PROCESSING_INSTRUCTION_NODE : 557 typestring = "PROCESSING_INSTRUCTION_NODE"; 558 break; 559 case DTM.TEXT_NODE : 560 typestring = "TEXT_NODE"; 561 break; 562 default : 563 typestring = "Unknown!"; 564 break; 565 } 566 567 ps.println("Type: " + typestring); 568 569 int firstChild = _firstch(i); 570 571 if (DTM.NULL == firstChild) 572 ps.println("First child: DTM.NULL"); 573 else if (NOTPROCESSED == firstChild) 574 ps.println("First child: NOTPROCESSED"); 575 else 576 ps.println("First child: " + firstChild); 577 578 int prevSibling = _prevsib(i); 579 580 if (DTM.NULL == prevSibling) 581 ps.println("Prev sibling: DTM.NULL"); 582 else if (NOTPROCESSED == prevSibling) 583 ps.println("Prev sibling: NOTPROCESSED"); 584 else 585 ps.println("Prev sibling: " + prevSibling); 586 587 int nextSibling = _nextsib(i); 588 589 if (DTM.NULL == nextSibling) 590 ps.println("Next sibling: DTM.NULL"); 591 else if (NOTPROCESSED == nextSibling) 592 ps.println("Next sibling: NOTPROCESSED"); 593 else 594 ps.println("Next sibling: " + nextSibling); 595 596 int parent = _parent(i); 597 598 if (DTM.NULL == parent) 599 ps.println("Parent: DTM.NULL"); 600 else if (NOTPROCESSED == parent) 601 ps.println("Parent: NOTPROCESSED"); 602 else 603 ps.println("Parent: " + parent); 604 605 int level = _level(i); 606 607 ps.println("Level: " + level); 608 ps.println("Node Value: " + getNodeValue(i)); 609 ps.println("String Value: " + getStringValue(i)); 610 611 ps.println("First Attribute Node: " + m_attribute.elementAt(i)); 612 } 613 614 } 615 catch(IOException ioe) 616 { 617 ioe.printStackTrace(System.err); 618 System.exit(-1); 619 } 620 } 621 622 623 646 protected static void dispatchNodeData( Node node, ContentHandler ch, int depth )throws org.xml.sax.SAXException 647 { 648 649 switch (node.getNodeType()) 650 { 651 case Node.DOCUMENT_FRAGMENT_NODE : 652 case Node.DOCUMENT_NODE : 653 case Node.ELEMENT_NODE : 654 { 655 for (Node child = node.getFirstChild(); null != child; 656 child = child.getNextSibling()) 657 { 658 dispatchNodeData(child, ch, depth+1); 659 } 660 } 661 break; 662 case Node.PROCESSING_INSTRUCTION_NODE : case Node.COMMENT_NODE : 664 if(0 != depth) 665 break; 666 case Node.TEXT_NODE : 669 case Node.CDATA_SECTION_NODE : 670 case Node.ATTRIBUTE_NODE : 671 String str = node.getNodeValue(); 672 if(ch instanceof CharacterNodeHandler) 673 { 674 ((CharacterNodeHandler)ch).characters(node); 675 } 676 else 677 { 678 ch.characters(str.toCharArray(), 0, str.length()); 679 } 680 break; 681 default : 685 break; 687 } 688 } 689 690 691 692 693 694 695 696 697 704 public void setProperty( String property, Object value ) 705 { 706 } 707 708 714 public SourceLocator getSourceLocatorFor( int node ) 715 { 716 return null; 717 } 718 719 723 protected int getNextNodeIdentity( int parm1 ) 724 { 725 if (DEBUG) System.out.println("getNextNodeIdenty(" + parm1 + ")"); 726 return DTM.NULL; 727 } 728 729 735 public int getAttributeNode( int parm1, String parm2, String parm3 ) 736 { 737 if (DEBUG) 738 { 739 System.out.println( 740 "getAttributeNode(" + 741 parm1 + "," + 742 parm2 + "," + 743 parm3 + ")"); 744 } 745 return DTM.NULL; 746 } 747 748 752 public String getLocalName( int parm1 ) 753 { 754 int exID = getExpandedTypeID(parm1); 756 757 if (DEBUG) 758 { 759 DEBUG = false; 760 System.out.print("getLocalName(" + parm1 + ") -> "); 761 System.out.println("..." + getLocalNameFromExpandedNameID(exID) ); 762 DEBUG = true; 763 } 764 765 return getLocalNameFromExpandedNameID(exID); 766 } 767 768 772 public String getNodeName( int parm1 ) 773 { 774 int exID = getExpandedTypeID( parm1 ); 776 if (DEBUG) 777 { 778 DEBUG = false; 779 System.out.print("getLocalName(" + parm1 + ") -> "); 780 System.out.println("..." + getLocalNameFromExpandedNameID(exID) ); 781 DEBUG = true; 782 } 783 return getLocalNameFromExpandedNameID(exID); 784 } 785 786 790 public boolean isAttributeSpecified( int parm1 ) 791 { 792 if (DEBUG) System.out.println("isAttributeSpecified(" + parm1 + ")"); 793 return false; 794 } 795 796 800 public String getUnparsedEntityURI( String parm1 ) 801 { 802 if (DEBUG) System.out.println("getUnparsedEntityURI(" + parm1 + ")"); 803 return ""; 804 } 805 806 809 public DTDHandler getDTDHandler( ) 810 { 811 if (DEBUG) System.out.println("getDTDHandler()"); 812 return null; 813 } 814 815 819 public String getPrefix( int parm1 ) 820 { 821 if (DEBUG) System.out.println("getPrefix(" + parm1 + ")"); 822 return ""; 823 } 824 825 828 public EntityResolver getEntityResolver( ) 829 { 830 if (DEBUG) System.out.println("getEntityResolver()"); 831 return null; 832 } 833 834 837 public String getDocumentTypeDeclarationPublicIdentifier( ) 838 { 839 if (DEBUG) System.out.println("get_DTD_PubId()"); 840 return ""; 841 } 842 843 846 public LexicalHandler getLexicalHandler( ) 847 { 848 if (DEBUG) System.out.println("getLexicalHandler()"); 849 return null; 850 } 851 854 public boolean needsTwoThreads( ) 855 { 856 if (DEBUG) System.out.println("needsTwoThreads()"); 857 return false; 858 } 859 860 863 public ContentHandler getContentHandler( ) 864 { 865 if (DEBUG) System.out.println("getContentHandler()"); 866 return null; 867 } 868 869 877 public void dispatchToEvents( int parm1, ContentHandler parm2 )throws org.xml.sax.SAXException 878 { 879 if (DEBUG) 880 { 881 System.out.println( 882 "dispathcToEvents(" + 883 parm1 + "," + 884 parm2 + ")"); 885 } 886 return; 887 } 888 889 893 public String getNamespaceURI( int parm1 ) 894 { 895 if (DEBUG) System.out.println("getNamespaceURI(" +parm1+")"); 896 return ""; 897 } 898 899 908 public void dispatchCharactersEvents( int nodeHandle, ContentHandler ch, boolean normalize )throws org.xml.sax.SAXException 909 { 910 if (DEBUG) 911 { 912 System.out.println("dispatchCharacterEvents(" + 913 nodeHandle + "," + 914 ch + "," + 915 normalize + ")"); 916 } 917 918 if(normalize) 919 { 920 XMLString str = getStringValue(nodeHandle); 921 str = str.fixWhiteSpace(true, true, false); 922 str.dispatchCharactersEvents(ch); 923 } 924 else 925 { 926 int type = getNodeType(nodeHandle); 927 Node node = getNode(nodeHandle); 928 dispatchNodeData(node, ch, 0); 929 } 930 } 931 932 936 public boolean supportsPreStripping( ) 937 { 938 if (DEBUG) System.out.println("supportsPreStripping()"); 939 return super.supportsPreStripping(); 940 } 941 942 946 protected int _exptype( int parm1 ) 947 { 948 if (DEBUG) System.out.println("_exptype(" + parm1 + ")"); 949 return super._exptype( parm1); 950 } 951 952 956 protected SuballocatedIntVector findNamespaceContext( int parm1 ) 957 { 958 if (DEBUG) System.out.println("SuballocatedIntVector(" + parm1 + ")"); 959 return super.findNamespaceContext( parm1); 960 } 961 962 966 protected int _prevsib( int parm1 ) 967 { 968 if (DEBUG) System.out.println("_prevsib(" + parm1+ ")"); 969 return super._prevsib( parm1); 970 } 971 972 973 977 protected short _type( int parm1 ) 978 { 979 if (DEBUG) System.out.println("_type(" + parm1 + ")"); 980 return super._type( parm1); 981 } 982 983 987 public Node getNode( int parm1 ) 988 { 989 if (DEBUG) System.out.println("getNode(" + parm1 + ")"); 990 return super.getNode( parm1); 991 } 992 993 997 public int getPreviousSibling( int parm1 ) 998 { 999 if (DEBUG) System.out.println("getPrevSib(" + parm1 + ")"); 1000 return super.getPreviousSibling( parm1); 1001 } 1002 1003 1007 public String getDocumentStandalone( int parm1 ) 1008 { 1009 if (DEBUG) System.out.println("getDOcStandAlone(" + parm1 + ")"); 1010 return super.getDocumentStandalone( parm1); 1011 } 1012 1013 1017 public String getNodeNameX( int parm1 ) 1018 { 1019 if (DEBUG) System.out.println("getNodeNameX(" + parm1 + ")"); 1020 return getNodeName(parm1); 1022 1023 } 1024 1025 1030 public void setFeature( String parm1, boolean parm2 ) 1031 { 1032 if (DEBUG) 1033 { 1034 System.out.println( 1035 "setFeature(" + 1036 parm1 + "," + 1037 parm2 + ")"); 1038 } 1039 super.setFeature( parm1, parm2); 1040 } 1041 1042 1046 protected int _parent( int parm1 ) 1047 { 1048 if (DEBUG) System.out.println("_parent(" + parm1 + ")"); 1049 return super._parent( parm1); 1050 } 1051 1052 1057 protected void indexNode( int parm1, int parm2 ) 1058 { 1059 if (DEBUG) System.out.println("indexNode("+parm1+","+parm2+")"); 1060 super.indexNode( parm1, parm2); 1061 } 1062 1063 1066 protected boolean getShouldStripWhitespace( ) 1067 { 1068 if (DEBUG) System.out.println("getShouldStripWS()"); 1069 return super.getShouldStripWhitespace(); 1070 } 1071 1072 1075 protected void popShouldStripWhitespace( ) 1076 { 1077 if (DEBUG) System.out.println("popShouldStripWS()"); 1078 super.popShouldStripWhitespace(); 1079 } 1080 1081 1086 public boolean isNodeAfter( int parm1, int parm2 ) 1087 { 1088 if (DEBUG) System.out.println("isNodeAfter(" + parm1 + "," + parm2 + ")"); 1089 return super.isNodeAfter( parm1, parm2); 1090 } 1091 1092 1096 public int getNamespaceType( int parm1 ) 1097 { 1098 if (DEBUG) System.out.println("getNamespaceType(" + parm1 + ")"); 1099 return super.getNamespaceType( parm1); 1100 } 1101 1102 1106 protected int _level( int parm1 ) 1107 { 1108 if (DEBUG) System.out.println("_level(" + parm1 + ")"); 1109 return super._level( parm1); 1110 } 1111 1112 1113 1117 protected void pushShouldStripWhitespace( boolean parm1 ) 1118 { 1119 if (DEBUG) System.out.println("push_ShouldStripWS(" + parm1 + ")"); 1120 super.pushShouldStripWhitespace( parm1); 1121 } 1122 1123 1127 public String getDocumentVersion( int parm1 ) 1128 { 1129 if (DEBUG) System.out.println("getDocVer("+parm1+")"); 1130 return super.getDocumentVersion( parm1); 1131 } 1132 1133 1138 public boolean isSupported( String parm1, String parm2 ) 1139 { 1140 if (DEBUG) System.out.println("isSupported("+parm1+","+parm2+")"); 1141 return super.isSupported( parm1, parm2); 1142 } 1143 1144 1145 1149 protected void setShouldStripWhitespace( boolean parm1 ) 1150 { 1151 if (DEBUG) System.out.println("set_ShouldStripWS("+parm1+")"); 1152 super.setShouldStripWhitespace( parm1); 1153 } 1154 1155 1156 1161 protected void ensureSizeOfIndex( int parm1, int parm2 ) 1162 { 1163 if (DEBUG) System.out.println("ensureSizeOfIndex("+parm1+","+parm2+")"); 1164 super.ensureSizeOfIndex( parm1, parm2); 1165 } 1166 1167 1171 protected void ensureSize( int parm1 ) 1172 { 1173 if (DEBUG) System.out.println("ensureSize("+parm1+")"); 1174 1175 } 1179 1180 1184 public String getDocumentEncoding( int parm1 ) 1185 { 1186 if (DEBUG) System.out.println("getDocumentEncoding("+parm1+")"); 1187 return super.getDocumentEncoding( parm1); 1188 } 1189 1190 1196 public void appendChild( int parm1, boolean parm2, boolean parm3 ) 1197 { 1198 if (DEBUG) 1199 { 1200 System.out.println( 1201 "appendChild(" + 1202 parm1 + "," + 1203 parm2 + "," + 1204 parm3 + ")"); 1205 } 1206 super.appendChild( parm1, parm2, parm3); 1207 } 1208 1209 1213 public short getLevel( int parm1 ) 1214 { 1215 if (DEBUG) System.out.println("getLevel("+parm1+")"); 1216 return super.getLevel( parm1); 1217 } 1218 1219 1222 public String getDocumentBaseURI( ) 1223 { 1224 if (DEBUG) System.out.println("getDocBaseURI()"); 1225 return super.getDocumentBaseURI(); 1226 } 1227 1228 1234 public int getNextNamespaceNode( int parm1, int parm2, boolean parm3 ) 1235 { 1236 if (DEBUG) 1237 { 1238 System.out.println( 1239 "getNextNamesapceNode(" + 1240 parm1 + "," + 1241 parm2 + "," + 1242 parm3 + ")"); 1243 } 1244 return super.getNextNamespaceNode( parm1, parm2, parm3); 1245 } 1246 1247 1251 public void appendTextChild( String parm1 ) 1252 { 1253 if (DEBUG) System.out.println("appendTextChild(" + parm1 + ")"); 1254 super.appendTextChild( parm1); 1255 } 1256 1257 1264 protected int findGTE( int[] parm1, int parm2, int parm3, int parm4 ) 1265 { 1266 if (DEBUG) 1267 { 1268 System.out.println( 1269 "findGTE("+ 1270 parm1 + "," + 1271 parm2 + "," + 1272 parm3 + ")"); 1273 } 1274 return super.findGTE( parm1, parm2, parm3, parm4); 1275 } 1276 1277 1282 public int getFirstNamespaceNode( int parm1, boolean parm2 ) 1283 { 1284 if (DEBUG) System.out.println("getFirstNamespaceNode()"); 1285 return super.getFirstNamespaceNode( parm1, parm2); 1286 } 1287 1288 1292 public int getStringValueChunkCount( int parm1 ) 1293 { 1294 if (DEBUG) System.out.println("getStringChunkCount(" + parm1 + ")"); 1295 return super.getStringValueChunkCount( parm1); 1296 } 1297 1298 1302 public int getLastChild( int parm1 ) 1303 { 1304 if (DEBUG) System.out.println("getLastChild(" + parm1 + ")"); 1305 return super.getLastChild( parm1); 1306 } 1307 1308 1312 public boolean hasChildNodes( int parm1 ) 1313 { 1314 if (DEBUG) System.out.println("hasChildNodes(" + parm1 + ")"); 1315 return super.hasChildNodes( parm1); 1316 } 1317 1318 1322 public short getNodeType( int parm1 ) 1323 { 1324 if (DEBUG) 1325 { 1326 DEBUG=false; 1327 System.out.print("getNodeType(" + parm1 + ") "); 1328 int exID = getExpandedTypeID(parm1); 1329 String name = getLocalNameFromExpandedNameID(exID); 1330 System.out.println( 1331 ".. Node name [" + name + "]" + 1332 "[" + getNodeType( parm1) + "]"); 1333 1334 DEBUG=true; 1335 } 1336 1337 return super.getNodeType( parm1); 1338 } 1339 1340 1344 public boolean isCharacterElementContentWhitespace( int parm1 ) 1345 { 1346 if (DEBUG) System.out.println("isCharacterElementContentWhitespace(" + parm1 +")"); 1347 return super.isCharacterElementContentWhitespace( parm1); 1348 } 1349 1350 1354 public int getFirstChild( int parm1 ) 1355 { 1356 if (DEBUG) System.out.println("getFirstChild(" + parm1 + ")"); 1357 return super.getFirstChild( parm1); 1358 } 1359 1360 1364 public String getDocumentSystemIdentifier( int parm1 ) 1365 { 1366 if (DEBUG) System.out.println("getDocSysID(" + parm1 + ")"); 1367 return super.getDocumentSystemIdentifier( parm1); 1368 } 1369 1370 1375 protected void declareNamespaceInContext( int parm1, int parm2 ) 1376 { 1377 if (DEBUG) System.out.println("declareNamespaceContext("+parm1+","+parm2+")"); 1378 super.declareNamespaceInContext( parm1, parm2); 1379 } 1380 1381 1385 public String getNamespaceFromExpandedNameID( int parm1 ) 1386 { 1387 if (DEBUG) 1388 { 1389 DEBUG = false; 1390 System.out.print("getNamespaceFromExpandedNameID("+parm1+")"); 1391 System.out.println("..." + super.getNamespaceFromExpandedNameID( parm1) ); 1392 DEBUG = true; 1393 } 1394 return super.getNamespaceFromExpandedNameID( parm1); 1395 } 1396 1397 1401 public String getLocalNameFromExpandedNameID( int parm1 ) 1402 { 1403 if (DEBUG) 1404 { 1405 DEBUG = false; 1406 System.out.print("getLocalNameFromExpandedNameID("+parm1+")"); 1407 System.out.println("..." + super.getLocalNameFromExpandedNameID( parm1)); 1408 DEBUG = true; 1409 } 1410 return super.getLocalNameFromExpandedNameID( parm1); 1411 } 1412 1413 1417 public int getExpandedTypeID( int parm1 ) 1418 { 1419 if (DEBUG) System.out.println("getExpandedTypeID("+parm1+")"); 1420 return super.getExpandedTypeID( parm1); 1421 } 1422 1423 1426 public int getDocument( ) 1427 { 1428 if (DEBUG) System.out.println("getDocument()"); 1429 return super.getDocument(); 1430 } 1431 1432 1433 1438 protected int findInSortedSuballocatedIntVector( SuballocatedIntVector parm1, int parm2 ) 1439 { 1440 if (DEBUG) 1441 { 1442 System.out.println( 1443 "findInSortedSubAlloctedVector(" + 1444 parm1 + "," + 1445 parm2 + ")"); 1446 } 1447 return super.findInSortedSuballocatedIntVector( parm1, parm2); 1448 } 1449 1450 1454 public boolean isDocumentAllDeclarationsProcessed( int parm1 ) 1455 { 1456 if (DEBUG) System.out.println("isDocumentAllDeclProc("+parm1+")"); 1457 return super.isDocumentAllDeclarationsProcessed( parm1); 1458 } 1459 1460 1464 protected void error( String parm1 ) 1465 { 1466 if (DEBUG) System.out.println("error("+parm1+")"); 1467 super.error( parm1); 1468 } 1469 1470 1471 1475 protected int _firstch( int parm1 ) 1476 { 1477 if (DEBUG) System.out.println("_firstch("+parm1+")"); 1478 return super._firstch( parm1); 1479 } 1480 1481 1485 public int getOwnerDocument( int parm1 ) 1486 { 1487 if (DEBUG) System.out.println("getOwnerDoc("+parm1+")"); 1488 return super.getOwnerDocument( parm1); 1489 } 1490 1491 1495 protected int _nextsib( int parm1 ) 1496 { 1497 if (DEBUG) System.out.println("_nextSib("+parm1+")"); 1498 return super._nextsib( parm1); 1499 } 1500 1501 1505 public int getNextSibling( int parm1 ) 1506 { 1507 if (DEBUG) System.out.println("getNextSibling("+parm1+")"); 1508 return super.getNextSibling( parm1); 1509 } 1510 1511 1512 1515 public boolean getDocumentAllDeclarationsProcessed( ) 1516 { 1517 if (DEBUG) System.out.println("getDocAllDeclProc()"); 1518 return super.getDocumentAllDeclarationsProcessed(); 1519 } 1520 1521 1525 public int getParent( int parm1 ) 1526 { 1527 if (DEBUG) System.out.println("getParent("+parm1+")"); 1528 return super.getParent( parm1); 1529 } 1530 1531 1537 public int getExpandedTypeID( String parm1, String parm2, int parm3 ) 1538 { 1539 if (DEBUG) System.out.println("getExpandedTypeID()"); 1540 return super.getExpandedTypeID( parm1, parm2, parm3); 1541 } 1542 1543 1547 public void setDocumentBaseURI( String parm1 ) 1548 { 1549 if (DEBUG) System.out.println("setDocBaseURI()"); 1550 super.setDocumentBaseURI( parm1); 1551 } 1552 1553 1559 public char[] getStringValueChunk( int parm1, int parm2, int[] parm3 ) 1560 { 1561 if (DEBUG) 1562 { 1563 System.out.println("getStringChunkValue(" + 1564 parm1 + "," + 1565 parm2 + ")"); 1566 } 1567 return super.getStringValueChunk( parm1, parm2, parm3); 1568 } 1569 1570 1574 public DTMAxisTraverser getAxisTraverser( int parm1 ) 1575 { 1576 if (DEBUG) System.out.println("getAxixTraverser("+parm1+")"); 1577 return super.getAxisTraverser( parm1); 1578 } 1579 1580 1585 public DTMAxisIterator getTypedAxisIterator( int parm1, int parm2 ) 1586 { 1587 if (DEBUG) System.out.println("getTypedAxisIterator("+parm1+","+parm2+")"); 1588 return super.getTypedAxisIterator( parm1, parm2); 1589 } 1590 1591 1595 public DTMAxisIterator getAxisIterator( int parm1 ) 1596 { 1597 if (DEBUG) System.out.println("getAxisIterator("+parm1+")"); 1598 return super.getAxisIterator( parm1); 1599 } 1600 1604 public int getElementById( String parm1 ) 1605 { 1606 if (DEBUG) System.out.println("getElementByID("+parm1+")"); 1607 return DTM.NULL; 1608 } 1609 1610 1613 public DeclHandler getDeclHandler( ) 1614 { 1615 if (DEBUG) System.out.println("getDeclHandler()"); 1616 return null; 1617 } 1618 1619 1622 public ErrorHandler getErrorHandler( ) 1623 { 1624 if (DEBUG) System.out.println("getErrorHandler()"); 1625 return null; 1626 } 1627 1628 1631 public String getDocumentTypeDeclarationSystemIdentifier( ) 1632 { 1633 if (DEBUG) System.out.println("get_DTD-SID()"); 1634 return null; 1635 } 1636 1637 1638} 1639 | Popular Tags |