bruno       2003/03/17 02:44:07

  Modified:    src/java/org/apache/cocoon/xml/dom DOMStreamer.java
  Log:
  Don't generate xmlns attributes anymore. This gave a problem with Saxon and
  is also more consistent with the other SAX-generating components.
  
  Revision  Changes    Path
  1.8       +5 -5      cocoon-2.1/src/java/org/apache/cocoon/xml/dom/DOMStreamer.java
  
  Index: DOMStreamer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/xml/dom/DOMStreamer.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DOMStreamer.java  16 Mar 2003 08:07:29 -0000      1.7
  +++ DOMStreamer.java  17 Mar 2003 10:44:07 -0000      1.8
  @@ -466,9 +466,10 @@
                               Map.Entry entry = (Map.Entry) localNsDeclIt.next();
                               String pr = (String) entry.getKey();
                               String ns = (String) entry.getValue();
  -                            String pr1 = pr.equals("") ? "xmlns" : pr;
  -                            String qn = pr.equals("") ? "xmlns" : "xmlns:" + pr;
  -                            newAttrs.addAttribute("", pr1, qn, "CDATA", ns);
  +                            // the following lines enable the creation of explicit 
xmlns attributes
  +                            //String pr1 = pr.equals("") ? "xmlns" : pr;
  +                            //String qn = pr.equals("") ? "xmlns" : "xmlns:" + pr;
  +                            //newAttrs.addAttribute("", pr1, qn, "CDATA", ns);
                               // System.out.println("starting prefix mapping  for 
prefix " + pr + " for " + ns);
                               contentHandler.startPrefixMapping(pr, ns);
                           }
  @@ -535,7 +536,6 @@
            * @return the namespace, or null if not found.
            */
           public String getNamespaceForPrefix(String prefix, Element 
namespaceContext) {
  -            // TODO cache this information in the ElementInfo objects?
               int type;
               Node parent = namespaceContext;
               String namespace = null;
  
  
  

Reply via email to