• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Validating XML against RelaxNG/Schematron using MSV

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello!

Ok, I'm using MSV to validate XML files against RelaxNG with embedded Schematron.
Here is my problem.

Is there a way to retrieve following information when error happens:
- error type (something like BadElementName, BadAtributeName, MissingElement....
- element/attribute name where error happened
- excpected element/attribute name (one in shema, if element/attribute name is incorrect)
- incorrect value in case regexp validation fails

SAXParseException returns only errorMessage, line and row of error (which are approximate as stated in documentation).

I have noticed there are ErrorInfo and ValidityViolation inside MSV Verifier (they contain all info I need), but I have no idea how to retrieve error information, that those classes contain, when parsing error happens.

Anyone?

Mario B.
 
Whoever got anywhere by being normal? Just ask this exceptional tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic