Sign In | Register Now About Bytes | Help | Site Map
Connecting Tech Pros Worldwide

Design & Implementation for validating XML documents

Question posted by: mathieu (Guest) on June 28th, 2008 12:15 PM
Hi there,

Could someone please suggest an open source implementation of a
validating XML parser ? I am interested in how this thing can
(should?) be designed. In particular how the errors should be handle:
1. If one at a time, it make is difficult to handle from a GUI, since
only one error can be corrected at a time
2. All errors are reported, which means that false positive may be
reported
Also how does the implementation report which elements contains
errors (using name, file position...).

Thanks
-Mathieu
Martin Honnen's Avatar
Martin Honnen
Guest
n/a Posts
June 28th, 2008
12:25 PM
#2

Re: Design & Implementation for validating XML documents
mathieu wrote:
Quote:
Could someone please suggest an open source implementation of a
validating XML parser ?


Apache Xerces has a Java and a C++ version: http://xerces.apache.org/

--

Martin Honnen
http://JavaScript.FAQTs.com/

Peter Flynn's Avatar
Peter Flynn
Guest
n/a Posts
June 28th, 2008
11:15 PM
#3

Re: Design & Implementation for validating XML documents
mathieu wrote:
Quote:
Hi there,
>
Could someone please suggest an open source implementation of a
validating XML parser ?


SP is at ftp://ftp.jclark.com/pub/sp/sp-1.3.4.tar.gz
rxp is at http://www.inf.ed.ac.uk/research/is...ge?view=1&id=80
Quote:
I am interested in how this thing can
(should?) be designed. In particular how the errors should be handle:


This is always a problem, since the author cannot know what the user
wants to do on a given occasion: stop or continue.
Quote:
1. If one at a time, it make is difficult to handle from a GUI, since
only one error can be corrected at a time


And when the first error is corrected, the validation must start again
from the beginning.
Quote:
2. All errors are reported, which means that false positive may be
reported


This is very common because an error may not be recognisable as such
until some later condition makes it impossible to continue.
Quote:
Also how does the implementation report which elements contains
errors (using name, file position...).


onsgmls reports line number and character position, and optionally the
names of open entities. In a synchronous typographical interface, an
error can be indicated by many means (highlighting, change of focus,
error log, ...)

///Peter
--
XML FAQ: http://xml.silmaril.ie/

Joseph J. Kesselman's Avatar
Joseph J. Kesselman
Guest
n/a Posts
June 30th, 2008
02:15 PM
#4

Re: Design & Implementation for validating XML documents
mathieu wrote:
Quote:
1. If one at a time, it make is difficult to handle from a GUI, since
only one error can be corrected at a time
2. All errors are reported, which means that false positive may be
reported

Quote:
Also how does the implementation report which elements contains
errors (using name, file position...).


I honestly believe XPath to the offending point is a more meaningful way
to report this, but whether it's more useful depends in part on the
quality of the tooling available to the user (and/or the user's skill
level).

 
Not the answer you were looking for? Post your question . . .
190,182 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors