sboag       01/07/02 12:39:42

  Modified:    java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java
  Log:
  Just check for null for the prefix in start/endPrefix mapping, and
  resolve it to "" if it is null.  The SAX2 javadoc is not explicit that
  it should be "" for the default namespace, so this seems like a
  reasonable thing to do.  The alternative is to throw an exception, but
  if we don't do something, the local-name() function will not do the
  right thing.
  
  Revision  Changes    Path
  1.8       +5 -1      xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM.java
  
  Index: SAX2DTM.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SAX2DTM.java      2001/06/27 15:00:37     1.7
  +++ SAX2DTM.java      2001/07/02 19:39:41     1.8
  @@ -1538,6 +1538,8 @@
         System.out.println("startPrefixMapping: prefix: " + prefix + ", uri: "
                            + uri);
   
  +    if(null == prefix)
  +      prefix = "";
       m_prefixMappings.addElement(prefix);  // JDK 1.1.x compat -sc
       m_prefixMappings.addElement(uri);  // JDK 1.1.x compat -sc
     }
  @@ -1560,6 +1562,9 @@
       if (DEBUG)
         System.out.println("endPrefixMapping: prefix: " + prefix);
   
  +    if(null == prefix)
  +      prefix = "";
  +
       int start = m_contextIndexes.peek();
       int index = m_prefixMappings.indexOf(prefix, start);
   
  @@ -1628,7 +1633,6 @@
             String uri, String localName, String qName, Attributes attributes)
               throws SAXException
     {
  -
       charactersFlush();
   
       int exName = m_expandedNameTable.getExpandedTypeID(uri, localName, 
DTM.ELEMENT_NODE);
  
  
  

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

Reply via email to