jycli       2004/02/20 12:56:44

  Modified:    java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
  Log:
  Fix for bugzilla bug report 26697
  
  XSLTC supports convert a NodeList to an internal DOM iterator.
  Use setAttributeNS method to copy attribute node when an attribute
  has a prefix, which maps to a namespace URI
  
  Reviewed by Morris Kwan ([EMAIL PROTECTED])
  
  Revision  Changes    Path
  1.73      +7 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/runtime/BasisLibrary.java
  
  Index: BasisLibrary.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/runtime/BasisLibrary.java,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- BasisLibrary.java 16 Feb 2004 22:55:55 -0000      1.72
  +++ BasisLibrary.java 20 Feb 2004 20:56:43 -0000      1.73
  @@ -1125,8 +1125,12 @@
                          org.w3c.dom.NamedNodeMap attributes = 
curr.getAttributes();
                          for (int k = 0; k < attributes.getLength(); k++) {
                            org.w3c.dom.Node attr = attributes.item(k);
  -                         element.setAttribute(attr.getNodeName(), 
  -                         attr.getNodeValue());
  +                         String attrURI = attr.getNamespaceURI();
  +                         if (null != attr && attrURI != Constants.XMLNS_URI)
  +                                 element.setAttributeNS(attrURI, 
  +                                     attr.getNodeName(), 
attr.getNodeValue());
  +                         else element.setAttribute(attr.getNodeName(),  
  +                                 attr.getNodeValue());
                          }
                        }
                        copyNodes(curr.getChildNodes(), doc, element);
  
  
  

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

Reply via email to