Patches for JDOMSource and JDOMResult (was: Re: [jdom-interest] JDOMResult silently absorbs document fragments)

Markus Pallo pallo at dig.de
Tue Aug 20 08:08:28 PDT 2002


Hi, 

it looks like he checks now the dtd, but crashes later...
see the stackTrace...

I will continue with the checks tomorrow.

Markus



java.lang.ArrayIndexOutOfBoundsException
        at org.apache.xerces.impl.dtd.DTDGrammar.endParameterEntity(Unknown 
Source)
        at 
org.apache.xerces.impl.dtd.XMLDTDProcessor.endParameterEntity(Unknown Source)
        at org.apache.xerces.impl.XMLDTDScannerImpl.endEntity(Unknown Source)
        at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)
        at org.apache.xerces.impl.XMLEntityManager$EntityScanner.load(Unknown 
Source)
        at org.apache.xerces.impl.XMLEntityManager$EntityScanner.load(Unknown 
Source)
        at 
org.apache.xerces.impl.XMLEntityManager$EntityScanner.skipSpaces(Unknown 
Source)
        at org.apache.xerces.impl.XMLDTDScannerImpl.skipSeparator(Unknown 
Source)
        at org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown Source)
        at 
org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDExternalSubset(Unknown Source)
        at 
org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown 
Source)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.jdom.output.SAXOutputter.dtdEvents(SAXOutputter.java:680)
        at org.jdom.output.SAXOutputter.output(SAXOutputter.java:597)
        at 
org.jdom.transform.JDOMSource$DocumentReader.parse(JDOMSource.java:432)
        at 
org.apache.xml.dtm.ref.DTMManagerDefault.getDTM(DTMManagerDefault.java:493)
        at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:590)
        at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1054)
        at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1032)
        at 
de.dig.dfc.framework.TransformerService.transformToFop(TransformerService.java:327)
        at 
de.dig.dfc.framework.TransformerService.process(TransformerService.java:117)

Markus

On Tuesday 20 August 2002 14:12, you wrote:
> Hi,
>
> Attached are 2 patches (full source and cvs diff) for JDOMSource and
> JDOMResult that fix the following problems:
>
>   - JDOMSource: Do no allocate a new XMLReader for every call to
> getXMLReader(). JDOMSource now allocates only one XMLReader and returns
> this instance for every call to getXMLReader(), thus allowing applications
> to access the XMLReader instance and configure it prior handing the
> JDOMSource to the XSL transformer.
>
>   - JDOMResult: Support for transformation results that are not well-formed
> XML documents. JDOMResult now accepts node sets as result of
> transformations and make them available to the applications as a List of
> JDOM nodes (method getResult()). Existing methods dealing only with
> Documents have been marked as deprecated.
>
> Markus, could you run a quick test to verify that the JDOMSource patch
> fixes your EntityResolver problem?
> Elliotte, could you check the new JDOMResult interface and implementation?
>
> TIA
>
> Laurent



More information about the jdom-interest mailing list