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/04 04:12:26 UTC

cvs commit: xml-xalan/src/org/apache/xalan/xpath/dtm DTM.java

sboag       00/08/03 19:12:26

  Modified:    src/org/apache/xalan/xpath/dtm DTM.java
  Log:
  Handle undeclared xml namespace.
  
  Revision  Changes    Path
  1.23      +11 -1     xml-xalan/src/org/apache/xalan/xpath/dtm/DTM.java
  
  Index: DTM.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/dtm/DTM.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- DTM.java	2000/06/23 03:42:23	1.22
  +++ DTM.java	2000/08/04 02:12:26	1.23
  @@ -538,10 +538,20 @@
   
           int w0;
           int colonpos = attrname.indexOf(':');
  +        // System.out.println("attrname: "+attrname);
           if(colonpos > 0)
           {
             String prefix = attrname.substring(0, colonpos);
  -          w0 = org.w3c.dom.Node.ATTRIBUTE_NODE | (stringToInt(resolveNamespace(prefix)) << 16);
  +          // System.out.println("prefix: "+prefix);
  +          if(prefix.equals("xml"))
  +          {
  +            // System.out.println("Setting the namespace to: "+org.apache.xalan.xslt.Constants.S_XMLNAMESPACEURI);
  +            w0 = org.w3c.dom.Node.ATTRIBUTE_NODE | (stringToInt(org.apache.xalan.xslt.Constants.S_XMLNAMESPACEURI) << 16);
  +          }
  +          else
  +          {
  +            w0 = org.w3c.dom.Node.ATTRIBUTE_NODE | (stringToInt(resolveNamespace(prefix)) << 16);
  +          }
           }
           else
           {