xalan-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkess...@apache.org
Subject cvs commit: xml-xalan/java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTM.java DOM2DTMdefaultNamespaceDeclarationNode.java
Date Tue, 18 Dec 2001 21:55:33 GMT
jkesselm    01/12/18 13:55:33

  Modified:    java/src/org/apache/xml/dtm/ref DTMDefaultBase.java
               java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTM.java
                        DOM2DTMdefaultNamespaceDeclarationNode.java
  Log:
  A few more subtle performance tweaks, and an actual bug.
  
  Revision  Changes    Path
  1.24      +1 -1      xml-xalan/java/src/org/apache/xml/dtm/ref/DTMDefaultBase.java
  
  Index: DTMDefaultBase.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/dtm/ref/DTMDefaultBase.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- DTMDefaultBase.java	2001/12/10 20:55:50	1.23
  +++ DTMDefaultBase.java	2001/12/18 21:55:33	1.24
  @@ -1648,7 +1648,7 @@
      */
     public short getNodeType(int nodeHandle)
     {
  -    return (short)(_exptype(makeNodeIdentity(nodeHandle)) >> ExpandedNameTable.ROTAMOUNT_TYPE);
  +    return (short)(_exptype(makeNodeIdentity(nodeHandle)) >>> ExpandedNameTable.ROTAMOUNT_TYPE);
     }
   
     /**
  
  
  
  1.27      +6 -1      xml-xalan/java/src/org/apache/xml/dtm/ref/dom2dtm/DOM2DTM.java
  
  Index: DOM2DTM.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/dtm/ref/dom2dtm/DOM2DTM.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- DOM2DTM.java	2001/12/14 19:47:28	1.26
  +++ DOM2DTM.java	2001/12/18 21:55:33	1.27
  @@ -1228,7 +1228,12 @@
      */
     public String getNodeValue(int nodeHandle)
     {
  -    int type=_type(nodeHandle);
  +    // The _type(nodeHandle) call was taking the lion's share of our
  +    // time, and was wrong anyway since it wasn't coverting handle to
  +    // identity. Inlined it.
  +    int type = _exptype(makeNodeIdentity(nodeHandle));
  +    type=(NULL != type) ? ExpandedNameTable.getType(type) : NULL;
  +    
       if(TEXT_NODE!=type && CDATA_SECTION_NODE!=type)
         return getNode(nodeHandle).getNodeValue();
       
  
  
  
  1.2       +6 -5      xml-xalan/java/src/org/apache/xml/dtm/ref/dom2dtm/DOM2DTMdefaultNamespaceDeclarationNode.java
  
  Index: DOM2DTMdefaultNamespaceDeclarationNode.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/dtm/ref/dom2dtm/DOM2DTMdefaultNamespaceDeclarationNode.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DOM2DTMdefaultNamespaceDeclarationNode.java	2001/11/29 15:45:52	1.1
  +++ DOM2DTMdefaultNamespaceDeclarationNode.java	2001/12/18 21:55:33	1.2
  @@ -84,17 +84,18 @@
     final String NOT_SUPPORTED_ERR="Unsupported operation on pseudonode";
     
     Element pseudoparent;
  -  String prefix,uri;
  -	int handle;
  +  String prefix,uri,nodename;
  +  int handle;
     DOM2DTMdefaultNamespaceDeclarationNode(Element pseudoparent,String prefix,String uri,int
handle)
     {
       this.pseudoparent=pseudoparent;
       this.prefix=prefix;
       this.uri=uri;
  -		this.handle=handle;
  +    this.handle=handle;
  +    this.nodename="xmlns:"+prefix;
     }
  -  public String getNodeName() {return "xmlns:"+prefix;}
  -  public String getName() {return getNodeName();}
  +  public String getNodeName() {return nodename;}
  +  public String getName() {return nodename;}
     public String getNamespaceURI() {return "http://www.w3.org/2000/xmlns/";}
     public String getPrefix() {return prefix;}
     public String getLocalName() {return prefix;}
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org


Mime
View raw message