cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From je...@apache.org
Subject cvs commit: cocoon-2.1/src/java/org/apache/cocoon/xml/dom DOMStreamer.java
Date Tue, 11 Mar 2003 06:50:00 GMT
jefft       2003/03/10 22:50:00

  Modified:    src/java/org/apache/cocoon/xml/dom DOMStreamer.java
  Log:
  Better error messages for DOM 1-related errors
  
  Revision  Changes    Path
  1.5       +4 -3      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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DOMStreamer.java	10 Mar 2003 18:08:34 -0000	1.4
  +++ DOMStreamer.java	11 Mar 2003 06:50:00 -0000	1.5
  @@ -340,9 +340,10 @@
                       String namespaceURI = node.getNamespaceURI();
                       String prefix = node.getPrefix();
                       String localName = node.getLocalName();
  +                    String nodeName = node.getNodeName();  // SAX 1 node name, for debugging
   
                       if (localName == null)
  -                        throw new SAXException("[NamespaceNormalizingDOMStreamer] Encountered
a DOM Element without a localName. DOM Level 1 trees are not supported by this DOMStreamer.");
  +                        throw new SAXException("[NamespaceNormalizingDOMStreamer] Encountered
a DOM Element '"+nodeName+"' without a localName. DOM Level 1 trees are not supported by this
DOMStreamer.");
   
                       if (namespaceURI != null) {
                           // no prefix means: make this the default namespace
  @@ -390,7 +391,7 @@
                           String attrPrefix = null;
   
                           if (attr.getLocalName() == null)
  -                            throw new SAXException("[NamespaceNormalizingDOMStreamer] Encountered
an attribute without a local name, this DOM streamer does not support that.");
  +                            throw new SAXException("[NamespaceNormalizingDOMStreamer] Encountered
an attribute '"+attrName+"' without a local name, on node '"+nodeName+"'. This DOM streamer
does not support DOM 1 attributes.");
   
                           // only do non-namespace attributes
                           if (!(attrName.equals("xmlns") || attrName.startsWith("xmlns:")))
{
  
  
  

Mime
View raw message