You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@locus.apache.org on 2000/08/07 23:33:42 UTC

cvs commit: xml-xalan/java/src/org/apache/xalan/utils AttList.java

sboag       00/08/07 14:33:41

  Modified:    java/src/org/apache/xalan/utils AttList.java
  Log:
  Use DOMHelper to process namespaced attributes.
  
  Revision  Changes    Path
  1.2       +14 -2     xml-xalan/java/src/org/apache/xalan/utils/AttList.java
  
  Index: AttList.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/utils/AttList.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AttList.java	2000/06/19 16:53:11	1.1
  +++ AttList.java	2000/08/07 21:33:41	1.2
  @@ -58,6 +58,7 @@
   
   import org.w3c.dom.*;
   import org.xml.sax.*;
  +import org.apache.xpath.DOMHelper;
   
   
   /**
  @@ -68,13 +69,24 @@
   {
     NamedNodeMap m_attrs;
     int m_lastIndex;
  +  // ARGHH!!  JAXP Uses Xerces without setting the namespace processing to ON!
  +  // DOM2Helper m_dh = new DOM2Helper();
  +  DOMHelper m_dh;
     
     public AttList(NamedNodeMap attrs)
     {
       m_attrs = attrs;
       m_lastIndex = m_attrs.getLength() - 1;
  +    m_dh = new DOMHelper();
     }
     
  +  public AttList(NamedNodeMap attrs, DOMHelper dh)
  +  {
  +    m_attrs = attrs;
  +    m_lastIndex = m_attrs.getLength() - 1;
  +    m_dh = dh;
  +  }
  +  
     public int getLength ()
     {
       return m_attrs.getLength();
  @@ -90,7 +102,7 @@
      */
     public String getURI (int index)
     {
  -	  return null;
  +	  return m_dh.getNamespaceOfNode(((Attr)m_attrs.item(index)));
     }
   
     /**
  @@ -103,7 +115,7 @@
      */
     public String getLocalName (int index)
     {
  -	  return null;
  +	  return m_dh.getLocalNameOfNode(((Attr)m_attrs.item(index)));
     }
   
     public String getQName (int i)