Loading ...
Sorry, an error occurred while loading the content.
 

jing API

Expand Messages
  • John Watson
    I ve been attempting to use the jing API to validate files against an rnc schema. Tha API seems to be a little sketchily documented. Can anybody tell me how
    Message 1 of 3 , Sep 22, 2006
      I've been attempting to use the jing API to validate files against an
      rnc schema. Tha API seems to be a little sketchily documented. Can
      anybody tell me how to get hold of validation error messages (which
      appear to be sent by default to stdout)?
    • George Cristian Bina
      Hi, You need to create a property map builder and set the error handler, like below: PropertyMapBuilder builder = new PropertyMapBuilder();
      Message 2 of 3 , Sep 22, 2006
        Hi,

        You need to create a property map builder and set the error handler,
        like below:
        PropertyMapBuilder builder = new PropertyMapBuilder();
        ValidateProperty.ERROR_HANDLER.put(builder, errorHandler);

        Then create a validation driver from these properties for Relax NG
        compact schemas

        ValidationDriver vd = new ValidationDriver(
        builder.toPropertyMap(),
        CompactSchemaReader.getInstance()
        );

        and use this validation driver to load your schema and to validate
        documents against that schema. The errors will be reported to the
        registered error handler.

        Best Regards,
        George
        ---------------------------------------------------------------------
        George Cristian Bina
        <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
        http://www.oxygenxml.com


        John Watson wrote:
        > I've been attempting to use the jing API to validate files against an
        > rnc schema. Tha API seems to be a little sketchily documented. Can
        > anybody tell me how to get hold of validation error messages (which
        > appear to be sent by default to stdout)?
        >
        >
        >
        >
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
        >
        >
        >
        >
        >
      • John Watson
        Great! Thanks George - how nice to get such a quick and accurate response.
        Message 3 of 3 , Sep 22, 2006
          Great! Thanks George - how nice to get such a quick and accurate
          response.
        Your message has been successfully submitted and would be delivered to recipients shortly.