Validating a JDOMSource with line numbers?

View: New views
2 Messages — Rating Filter:   Alert me  

Validating a JDOMSource with line numbers?

by ondra.cifka :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I validate a JDOMSource using a schema-based Validator and display validation errors using an ErrorHandler. But the getSystemId() of the SAXParseException returns null and getLineNumber() returns -1. How can I get systemId and lineNumber for the errors?

Thanks
Ondra

Re: Validating a JDOMSource with line numbers?

by Laurent Bihanic :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

A JDOM Document does not retain the system Id nor the line numbers of the
original document (same for the encoding).
If you want this information, you should use a StreamSource.

Regards,

Laurent


ondra.cifka a écrit :
> Hello,
>
> I validate a JDOMSource using a schema-based Validator and display
> validation errors using an ErrorHandler. But the getSystemId() of the
> SAXParseException returns null and getLineNumber() returns -1. How can I get
> systemId and lineNumber for the errors?
>
> Thanks
> Ondra
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@...