You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mm...@locus.apache.org on 2000/09/29 18:56:06 UTC

cvs commit: xml-xalan/src/org/apache/xalan/xslt TemplateList.java

mmidy       00/09/29 09:56:05

  Modified:    src/org/apache/xalan/xslt TemplateList.java
  Log:
  Make sure appropriate nodes match the wilcard pattern
  
  Revision  Changes    Path
  1.11      +8 -5      xml-xalan/src/org/apache/xalan/xslt/TemplateList.java
  
  Index: TemplateList.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xslt/TemplateList.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- TemplateList.java	2000/08/18 17:41:07	1.10
  +++ TemplateList.java	2000/09/29 16:56:05	1.11
  @@ -252,11 +252,11 @@
   
         case Node.CDATA_SECTION_NODE:
         case Node.TEXT_NODE:
  -        matchPat = locateMatchPatternList2(XPath.PSEUDONAME_TEXT, false);
  +        matchPat = locateMatchPatternList2(XPath.PSEUDONAME_TEXT, true);
           break;
   
         case Node.COMMENT_NODE:
  -        matchPat = locateMatchPatternList2(XPath.PSEUDONAME_COMMENT, false);
  +        matchPat = locateMatchPatternList2(XPath.PSEUDONAME_COMMENT, true);
           break;
   
         case Node.DOCUMENT_NODE:
  @@ -269,7 +269,7 @@
   
         default:
           {
  -          matchPat = locateMatchPatternList2(targetNode.getNodeName(), false);
  +          matchPat = locateMatchPatternList2(targetNode.getNodeName(), true);
           }
         }
   
  @@ -351,10 +351,13 @@
           MatchPattern2 nextMatchPat = matchPat.getNext();
   
           // We also have to consider wildcard matches.
  -        if((null == nextMatchPat) && !matchPat.m_targetString.equals("*") &&
  +        if((null == nextMatchPat) && !matchPat.m_targetString.equals("*") 
  +           && (Node.DOCUMENT_NODE != targetNodeType)
  +					 && (Node.ATTRIBUTE_NODE != targetNodeType)
  +					 /*
              ((Node.ELEMENT_NODE == targetNodeType) ||
               (Node.ATTRIBUTE_NODE == targetNodeType) ||
  -            (Node.PROCESSING_INSTRUCTION_NODE == targetNodeType)))
  +            (Node.PROCESSING_INSTRUCTION_NODE == targetNodeType))*/)
           {
             nextMatchPat = (MatchPattern2)m_patternTable.get("*");
           }