[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [syndication] XML validation with XSD
>Parsers are required (by specification) to stop when they encounter
>an error, which is why you're seeing this behavior. Indeed, a parser
>that does not stop at the first error would be in violation of the XML
>specifcation.
I can't find anything that says this in the spec [1] - do you have a ref?
This would certainly be expected behaviour if the XML wasn't well-formed (no
way of telling what was meant to come next). But Kanimozhi's data is well
formed, and I think it probably should be possible to report more than a
terminatin validation error. I haven't personally done much with XSD
validation, but I'm guessing that even if existing tools don't support full
error reporting then there are at least two (hacky) possibilities - dive
into the parser's source and get rid of all the "System.exit()"s or
whatever; or write a series of schema, separating out the constraints - run
them in different orders (sounds a bit unlikely, but I think it might just
work).
Cheers,
Danny.
[1] http://www.w3.org/TR/REC-xml#proc-types
>On Thu, 14 Nov 2002, skanimozhi_sel wrote:
>
>> hi,
>> we at present doing an application which requires the validation
>> of well formed XML file across an XSD.But the problem we faced is,all
>> the parsers stopped parsing when it encounterd the first error in the
>> XML file .Our requirement is we want the xml file to be parsed fully
>> and get all he errors in that file.Can anybody help me
>>
>> Thanks
>> Kanimozhi
>>
>>
>>
>>
>>
>> Your use of Yahoo! Groups is subject to
>http://docs.yahoo.com/info/terms/
>>
>>
>>
>
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>