morten      01/10/12 07:11:24

  Modified:    java/src/org/apache/xalan/xsltc/dom DOMImpl.java
  Log:
  Updated Mode.java to properly handle patterns matching on node(), comment() 
and
  processing-instruction(). Also had to make a small change to the 
setStartNode()
  method in the FollowingIterator (inner class of DOMImpl.java) to properly
  handle attribute-nodes as start nodes. Also, I had to change 
ParentLocationPath
  to remove duplicates that can be produced by the FollowingIterator when
  started with an attribute node.
  PR:           bugzilla 2551
  Obtained from:        n/a
  Submitted by: [EMAIL PROTECTED]
  Reviewed by:  [EMAIL PROTECTED]
  
  Revision  Changes    Path
  1.42      +8 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/dom/DOMImpl.java
  
  Index: DOMImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/dom/DOMImpl.java,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- DOMImpl.java      2001/10/09 16:48:15     1.41
  +++ DOMImpl.java      2001/10/12 14:11:24     1.42
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: DOMImpl.java,v 1.41 2001/10/09 16:48:15 morten Exp $
  + * @(#)$Id: DOMImpl.java,v 1.42 2001/10/12 14:11:24 morten Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -174,7 +174,8 @@
        * Returns 'true' if a specific node is an element (of any type)
        */
       private boolean isElement(final int node) {
  -     return ((node < _firstAttributeNode) && (_type[node] >= NTYPES));
  +     if ((node<_firstAttributeNode) && (_type[node]>=NTYPES)) return true;
  +     return false;
       }
   
       /**
  @@ -1137,7 +1138,11 @@
                     
        public NodeIterator setStartNode(int node) {
            if (_isRestartable) {
  -             if (node >= _firstAttributeNode) node = _parent[node];
  +             if (node >= _firstAttributeNode) {
  +                 node = _parent[node];
  +                 int child = _offsetOrChild[node];
  +                 if (child != NULL) node = child;
  +             }
                _startNode = node;
                // find rightmost descendant (or self)
                int current;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to