: The case in point is DIH. DIH uses the standard DOM parser that comes
: w/ JDK. If it reads the xml properly do we need to complain?.  I guess
: that data-config.xml may not be used for any other purposes.

that's a vague statement as well ... there is no such thing as "the 
standard DOM parser that comes w/ JDK" ... that's an implementation detail 
of the JRE, and differnet JRE providers might use different parsers in 
their DocumentBuilders, some of which might be stricter then others.

*AND* even the choice of DocumentBuilder and DocumentBuilder factory can 
be decided at runtime -- so even if someone uses the same JRE as you, 
their servlet container might be registering it's own 
DocumentBuilderFactory.

So it's not safe to make any assumptions that just because the 
javax.xml.parsers.DocumentBuilder used in one Solr deployment cleanly 
parses a mallform XML file that it will work on any other machine.

: 
: 
: On Wed, Oct 22, 2008 at 10:10 PM, Walter Underwood
: <[EMAIL PROTECTED]> wrote:
: > On 10/22/08 8:57 AM, "Steven A Rowe" <[EMAIL PROTECTED]> wrote:
: >
: >> Telling people that it's not a problem (or required!) to write 
non-well-formed
: >> XML, because a particular XML parser can't accept well-formed XML is kind 
of
: >> insidious.
: >
: > I'm with you all the way on this.
: >
: > A parser which accepts non-well-formed XML is not an XML parser, since the
: > XML spec requires reporting a fatal error.
: >
: > It is really easy to test these things. Modern browsers have good XML
: > parsers, so put your test case in a "test.xml" file and open it in a
: > browser. If it isn't well-formed, you'll get an error.
: >
: > Here is my test XML:
: >
: > <root attribute="<"/>
: >
: > Here is what Firefox 3.0.3 says about that:
: >
: > XML Parsing Error: not well-formed
: > Location: file:///Users/wunderwood/Desktop/test.xml
: > Line Number 1, Column 18:
: >
: > <root attribute="<"/>
: > -----------------^
: >
: > wunder
: >
: >
: 
: 
: 
: -- 
: --Noble Paul
: 



-Hoss

Reply via email to