Re: Bug in gnu/xml/dom/DomDocumentBuilderFactory.java?

2007-02-21 Thread Chris Burdess

Andrew Haley wrote:

The problem: gcj+Classpath fails to work with Xerces2, but Sun's Java
does work.  The means that, on Fedora, Ant doesn't run with the latest
Classpath.


gnu/xml/dom/DomDocumentBuilderFactory.java.newDocumentBuilder() does
this:

setParameter(config, expand-entity-references,
 isExpandEntityReferences() ? Boolean.TRUE :  
Boolean.FALSE);


but according to the specification of org.w3c.dom.DOMConfiguration,
expand-entity-references is not a parameter defined in the DOM.  It
seems to be local to gnu.xml.dom.ls.DomLSParser.

[ http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/ 
DOMConfiguration.html ]


This is all well and good with gnu.xml.dom.ls.DomLSParser, but if we
have Xerces2 installed in our path then we will fail, because Xerces2
does not support expand-entity-references.

Is it the case that
gnu.xml.dom.DomDocumentBuilderFactory.newDocumentBuilder is totally
incompatible with Xerces2?


Please could you file this in Bugzilla and assign it to me, I can see  
the problem and I'll come up with a workaround.


PGP.sig
Description: This is a digitally signed message part


Bug in gnu/xml/dom/DomDocumentBuilderFactory.java?

2007-02-20 Thread Andrew Haley
The problem: gcj+Classpath fails to work with Xerces2, but Sun's Java
does work.  The means that, on Fedora, Ant doesn't run with the latest
Classpath.


gnu/xml/dom/DomDocumentBuilderFactory.java.newDocumentBuilder() does
this:

setParameter(config, expand-entity-references,
 isExpandEntityReferences() ? Boolean.TRUE : Boolean.FALSE);

but according to the specification of org.w3c.dom.DOMConfiguration,
expand-entity-references is not a parameter defined in the DOM.  It
seems to be local to gnu.xml.dom.ls.DomLSParser.

[ http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/DOMConfiguration.html ]

This is all well and good with gnu.xml.dom.ls.DomLSParser, but if we
have Xerces2 installed in our path then we will fail, because Xerces2
does not support expand-entity-references.

Is it the case that
gnu.xml.dom.DomDocumentBuilderFactory.newDocumentBuilder is totally
incompatible with Xerces2?  

The odd thing is that, as I said before, Sun's
javax.xml.parsers.DocumentBuilderFactory will work with Xerces2.

Thanks,
Andrew.



Re: Bug in gnu/xml/dom/DomDocumentBuilderFactory.java?

2007-02-20 Thread Andrew Haley
Andrew Haley writes:
  The problem: gcj+Classpath fails to work with Xerces2, but Sun's Java
  does work.  The means that, on Fedora, Ant doesn't run with the latest
  Classpath.
  
  
  gnu/xml/dom/DomDocumentBuilderFactory.java.newDocumentBuilder() does
  this:
  
  setParameter(config, expand-entity-references,
   isExpandEntityReferences() ? Boolean.TRUE : Boolean.FALSE);
  
  but according to the specification of org.w3c.dom.DOMConfiguration,
  expand-entity-references is not a parameter defined in the DOM.  It
  seems to be local to gnu.xml.dom.ls.DomLSParser.
  
  [ http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/DOMConfiguration.html ]
  
  This is all well and good with gnu.xml.dom.ls.DomLSParser, but if we
  have Xerces2 installed in our path then we will fail, because Xerces2
  does not support expand-entity-references.
  
  Is it the case that
  gnu.xml.dom.DomDocumentBuilderFactory.newDocumentBuilder is totally
  incompatible with Xerces2?  
  
  The odd thing is that, as I said before, Sun's
  javax.xml.parsers.DocumentBuilderFactory will work with Xerces2.

BTW, it seems that setting entities = flase will achieve something
similar, according to
http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/DOMConfiguration.html