santiagopg    2002/06/28 10:18:53

  Modified:    java/src/org/apache/xalan/xsltc/dom DOMImpl.java
  Log:
  Copy namespace nodes of an element in xsl:copy.
  
  Revision  Changes    Path
  1.78      +14 -5     
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.77
  retrieving revision 1.78
  diff -u -r1.77 -r1.78
  --- DOMImpl.java      27 Jun 2002 18:09:55 -0000      1.77
  +++ DOMImpl.java      28 Jun 2002 17:18:53 -0000      1.78
  @@ -2701,8 +2701,8 @@
        * Performs a shallow copy (ref. XSLs copy())
        */
       public String shallowCopy(final int node, TransletOutputHandler handler)
  -     throws TransletException {
  -
  +     throws TransletException 
  +    {
        final int type = _type[node];
   
        switch(type) {
  @@ -2746,8 +2746,8 @@
   
       private String copyElement(int node, int type,
                               TransletOutputHandler handler)
  -     throws TransletException {
  -
  +     throws TransletException 
  +    {
        type = type - NTYPES;
        String name = _namesArray[type];
        final int pi = _prefix[node];
  @@ -2771,6 +2771,15 @@
                handler.startElement(name);
            }
        }
  +
  +     // Copy element namespaces
  +     for (int a = _lengthOrAttr[node]; a != NULL; a = _nextSibling[a]) {
  +         if (_type[a] == NAMESPACE) {
  +             handler.namespace(_prefixArray[_prefix[a]],
  +                               makeStringValue(a));
  +         }
  +     }
  +
        return name;
       }
   
  
  
  

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

Reply via email to