[jdom-interest] Getting more detail from JDOMException.
Elliotte Rusty Harold
elharo at metalab.unc.edu
Tue Oct 17 04:57:26 PDT 2000
When working on my XInclude processor in JDOM
<http://www.ibiblio.org/xml/XInclude/> the problem seemed a little
deeper to me. The processor had to notice semantic problems with
the specific vocabulary (XInclude) and report those errors. These are
not well-formedness errors or validity errors, just violations that
are specific to my vocabulary such as circular include or a URL that
can't be retrieved.
It would be extremely useful to be able to locate the exact line
number and perhaps column number where the problem occurred. However,
short of reparsing the problem file with SAX to look for the line
number of the offending element, I couldn't find an easy way to get
this. This means the user who receives an error message has to hunt
through the entire file to try to find the mistake. Something like
the SAX2 Locator interface, or at least the functionality of that
interface, would seem to be useful for at least some use cases,
though perhaps this is a 1.1 addition.
--
+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
| The XML Bible (IDG Books, 1999) |
| http://metalab.unc.edu/xml/books/bible/ |
| http://www.amazon.com/exec/obidos/ISBN=0764532367/cafeaulaitA/ |
+----------------------------------+---------------------------------+
| Read Cafe au Lait for Java News: http://metalab.unc.edu/javafaq/ |
| Read Cafe con Leche for XML News: http://metalab.unc.edu/xml/ |
+----------------------------------+---------------------------------+
More information about the jdom-interest
mailing list