santiagopg    02/04/22 09:37:13

  Modified:    java/src/org/apache/xalan/xsltc/compiler Tag:
                        jaxp-ri-1_2_0-fcs-branch Parser.java
  Log:
  Namespace support for element-available().
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.38.8.3  +4 -8      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.38.8.2
  retrieving revision 1.38.8.3
  diff -u -r1.38.8.2 -r1.38.8.3
  --- Parser.java       17 Apr 2002 20:25:26 -0000      1.38.8.2
  +++ Parser.java       22 Apr 2002 16:37:13 -0000      1.38.8.3
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: Parser.java,v 1.38.8.2 2002/04/17 20:25:26 santiagopg Exp $
  + * @(#)$Id: Parser.java,v 1.38.8.3 2002/04/22 16:37:13 santiagopg Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -618,8 +618,8 @@
                                COMPILER_PACKAGE + '.' + className);
       }
   
  -    public boolean elementSupported(QName qname) {
  -     return(_instructionClasses.get(qname) != null);
  +    public boolean elementSupported(String namespace, String localName) {
  +     return(_instructionClasses.get(getQName(namespace, XSL, localName)) != null);
       }
   
       public boolean functionSupported(String fname) {
  @@ -1101,11 +1101,7 @@
                             String qname, Attributes attributes) 
        throws SAXException {
        final int col = qname.lastIndexOf(':');
  -     final String prefix;
  -     if (col == -1)
  -         prefix = null;
  -     else
  -         prefix = qname.substring(0, col);
  +     final String prefix = (col == -1) ? null : qname.substring(0, col);
   
        SyntaxTreeNode element = makeInstance(uri, prefix, localname);
        if (element == null) {
  
  
  

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

Reply via email to