[jdom-commits] CVS update: jdom/src/java/org/jdom/output
    jhunter at cvs.jdom.org 
    jhunter at cvs.jdom.org
       
    Sun Jun 10 15:01:06 PDT 2001
    
    
  
Date:	Sunday June 10, 2001 @ 23:01
Author:	jhunter
Update of /home/cvspublic/jdom/src/java/org/jdom/output
In directory www.nmemonix.com:/tmp/cvs-serv13358/output
Modified Files:
	SAXOutputter.java 
Log Message:
Fixed SAXOutputter to declare namespaces using start/endPrefixMapping
methods.  Also added optional ability for SAXOutputter to report 
namespace declarations (the xmlns: attributes) if 
setReportNamespaceDeclarations() is true.
Changed JDOMSource to use the setRND() method to work with Xalan.
The patch is from Laurent Bihanic <laurent.bihanic at atosorigin.com>.
Below is his email accompanying the patch.  Thanks, Laurent.
-jh-
The bugs seem to be in SAXOutputter that lacks two things regarding 
namespace handling in SAX:
1. Namespace declarations for attributes are not reported as 
start/endPrefixMapping events.
2. Namespace declarations for attributes are not reported as "xmlns:..." 
attributes
Xalan actually relies on this second feature of the SAX parsers to handle 
namespaces.
Attached is a patch to SAXOutputter that fixes both problems.
I had to add a new method to SAXOutputter (setReportNamespaceDecl()) 
because reporting namespaces as xmlns attribute shall only occur if the 
"namespace-prefixes" SAX feature is set to true.
I updated the SAX feature support in JDOMSource to make use of the new 
method.
Jason, can you validate and merge these changes ? I also updated 
JDOMResult to complete the move from contrib to core (javadoc and 
FEATURE changes).
Laurent
===================================================================
File: no file SAXOutputter.java		Status: Needs Checkout
   Working revision:	1.8	Sun Jun 10 22:01:04 2001
   Repository revision:	1.8	/home/cvspublic/jdom/src/java/org/jdom/output/SAXOutputter.java,v
   Existing Tags:
	start                    	(revision: 1.1.1.1)
	jdom                     	(branch: 1.1.1)
    
    
More information about the jdom-commits
mailing list