morten      01/08/13 06:33:14

  Modified:    java/src/org/apache/xalan/xsltc/compiler Parser.java
  Log:
  A small fix that will allow top-level elements of an unknown URI.
  XSLTC now ignored the element(s), while it previously reported an error
  of an unsupported XSLT extension.
  PR:           bugzilla 2840
  Obtained from:        n/a
  Submitted by: [EMAIL PROTECTED]
  Reviewed by:  [EMAIL PROTECTED]
  
  Revision  Changes    Path
  1.21      +11 -7     
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Parser.java
  
  Index: Parser.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Parser.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- Parser.java       2001/08/13 10:33:36     1.20
  +++ Parser.java       2001/08/13 13:33:14     1.21
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: Parser.java,v 1.20 2001/08/13 10:33:36 morten Exp $
  + * @(#)$Id: Parser.java,v 1.21 2001/08/13 13:33:14 morten Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -800,12 +800,16 @@
                    element.setErrorMessage(INVALID_EXT_ERROR+local);
                }
                // Check if this is an extension of some other XSLT processor
  -             else if ((_xsltc.getStylesheet() != null) &&
  -                      (_xsltc.getStylesheet().isExtension(uri))) {
  -                 node = new UnsupportedElement(uri, prefix, local);
  -                 UnsupportedElement element = (UnsupportedElement)node;
  -                 element.setErrorMessage(UNSUPPORTED_EXT_ERROR+
  -                                         prefix+":"+local);
  +             else {
  +                 Stylesheet sheet = _xsltc.getStylesheet();
  +                 if ((sheet != null) && (sheet.isExtension(uri))) {
  +                     if (sheet != (SyntaxTreeNode)_parentStack.peek()) {
  +                         node = new UnsupportedElement(uri, prefix, local);
  +                         UnsupportedElement elem = (UnsupportedElement)node;
  +                         elem.setErrorMessage(UNSUPPORTED_EXT_ERROR+
  +                                              prefix+":"+local);
  +                     }
  +                 }
                }
            }
            if (node == null) node = new LiteralElement();
  
  
  

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

Reply via email to