morten      01/10/16 04:10:25

  Modified:    java/src/org/apache/xalan/xsltc/dom DOMImpl.java
  Log:
  A few add'ons to the namespace axis implementation. Added support for
  the namespace-uri() function when applied to namespace nodes.
  PR:           n/a
  Obtained from:        n/a
  Submitted by: [EMAIL PROTECTED]
  Reviewed by:  [EMAIL PROTECTED]
  
  Revision  Changes    Path
  1.46      +17 -8     
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.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- DOMImpl.java      2001/10/16 10:58:59     1.45
  +++ DOMImpl.java      2001/10/16 11:10:25     1.46
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: DOMImpl.java,v 1.45 2001/10/16 10:58:59 morten Exp $
  + * @(#)$Id: DOMImpl.java,v 1.46 2001/10/16 11:10:25 morten Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -2165,7 +2165,11 @@
        case DOM.COMMENT:
            return EMPTYSTRING;
        case DOM.NAMESPACE:
  -         return _prefixArray[_prefix[node]];
  +         final int index = _prefix[node];
  +         if (index < _prefixArray.length)
  +             return _prefixArray[index];
  +         else
  +             return EMPTYSTRING;
        case DOM.PROCESSING_INSTRUCTION:
            final String pistr = makeStringValue(node);
            final int col = pistr.indexOf(' ');
  @@ -2193,12 +2197,17 @@
        * Returns the namespace URI to which a node belongs
        */
       public String getNamespaceName(final int node) {
  -     final int type = getNamespaceType(node);
  -     final String name = _uriArray[type];
  -     if (name == null)
  -         return(EMPTYSTRING);
  -     else
  -         return(name);
  +     if (_type[node] == NAMESPACE) {
  +         return getNodeValue(node);
  +     }
  +     else {
  +         final int type = getNamespaceType(node);
  +         final String name = _uriArray[type];
  +         if (name == null)
  +             return(EMPTYSTRING);
  +         else
  +             return(name);
  +     }
       }
   
       /**
  
  
  

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

Reply via email to