You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mk...@apache.org on 2002/10/22 17:36:33 UTC

cvs commit: xml-xalan/java/src/org/apache/xalan/processor ProcessorExsltFunction.java

mkwan       2002/10/22 08:36:33

  Modified:    java/src/org/apache/xalan/processor
                        ProcessorExsltFunction.java
  Log:
  For bugzilla 13711
  Fix the conditions for validating the child elements of func:function.
  
  Revision  Changes    Path
  1.4       +27 -3     xml-xalan/java/src/org/apache/xalan/processor/ProcessorExsltFunction.java
  
  Index: ProcessorExsltFunction.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/processor/ProcessorExsltFunction.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ProcessorExsltFunction.java	16 Sep 2002 16:29:03 -0000	1.3
  +++ ProcessorExsltFunction.java	22 Oct 2002 15:36:33 -0000	1.4
  @@ -68,6 +68,17 @@
   import org.apache.xalan.templates.ElemVariable;
   import org.apache.xalan.templates.ElemParam;
   import org.apache.xalan.templates.ElemValueOf;
  +import org.apache.xalan.templates.ElemText;
  +import org.apache.xalan.templates.ElemTextLiteral;
  +import org.apache.xalan.templates.ElemApplyImport;
  +import org.apache.xalan.templates.ElemApplyTemplates;
  +import org.apache.xalan.templates.ElemAttribute;
  +import org.apache.xalan.templates.ElemCallTemplate;
  +import org.apache.xalan.templates.ElemComment;
  +import org.apache.xalan.templates.ElemCopy;
  +import org.apache.xalan.templates.ElemCopyOf;
  +import org.apache.xalan.templates.ElemNumber;
  +import org.apache.xalan.templates.ElemPI;
   import org.apache.xalan.templates.Constants;
   import org.apache.xpath.XPath;
   import org.apache.xalan.templates.StylesheetRoot;
  @@ -170,9 +181,22 @@
           msg = "func:result has an illegal following sibling (only xsl:fallback allowed)";
           handler.error(msg, new SAXException(msg));
         }
  -      if (elem instanceof ElemValueOf ||
  -          (elem instanceof ElemLiteralResult || elem instanceof ElemElement)
  -          && !(ancestorIsOk(elem)))
  +      
  +      if((elem instanceof ElemApplyImport
  +	 || elem instanceof ElemApplyTemplates
  +	 || elem instanceof ElemAttribute
  +	 || elem instanceof ElemCallTemplate
  +	 || elem instanceof ElemComment
  +	 || elem instanceof ElemCopy
  +	 || elem instanceof ElemCopyOf
  +	 || elem instanceof ElemElement
  +	 || elem instanceof ElemLiteralResult
  +	 || elem instanceof ElemNumber
  +	 || elem instanceof ElemPI
  +	 || elem instanceof ElemText
  +	 || elem instanceof ElemTextLiteral
  +	 || elem instanceof ElemValueOf)
  +	&& !(ancestorIsOk(elem)))
         {
           msg ="misplaced literal result in a func:function container.";
           handler.error(msg, new SAXException(msg));
  
  
  

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