Interface SchemaGenerationHandler


  • public interface SchemaGenerationHandler
    This interface generates a trace of traversals of ref elements encountered in rng schema. Methods in this interface provide information about namespaces, prefixes and names of various properties defined in schema. Implementations of this interface can store this information for later use. This can also be useful in debugging, as it helps in knowing which part of rng schema is parsed at present
    • Method Detail

      • startRefTraversal

        void startRefTraversal​(java.lang.String refName)
        Called when a new rng:ref element is encountered.
        Parameters:
        refName -
      • endRefTraversal

        void endRefTraversal​(java.lang.String refName)
        Called when a rng:ref element is completely traversed.
        Parameters:
        refName -
      • startSchemaConstruction

        void startSchemaConstruction​(java.lang.String ns,
                                     java.lang.String prefix)
        Called before constructing schema
        Parameters:
        ns - Namespace of schema
        prefix - Prefix of schema as defined in RelaxNG schemas
      • startPropertyConstruction

        void startPropertyConstruction​(java.lang.String ns,
                                       java.lang.String localName,
                                       java.lang.String prefix)
        Called before constructing a property
        Parameters:
        ns - Namespace of property
        localName - Name of property
        prefix - Prefix of property as defined in RelaxNG schemas
      • ignoreErrorInConstructingProperty

        boolean ignoreErrorInConstructingProperty​(java.lang.String ns,
                                                  java.lang.String localName,
                                                  RNGParseException ex)
        Reports if a RNGParseException is raised while trying to create a PropertyDescription from RNG schema.
        Parameters:
        ns - Property namespace
        localName - Property's localname
        ex - RNGParseException raised while constructing the property
        Returns:
        false if this parsing is to be discontinued, true if the error for this property is to be ignored while constructing the schema