System and method for expressing XML schema validation using java in a declarative manner
AssigneeInternational Business Machines Corporation
InventorWei Zheng
Life of this patent
Estimating the term…
Abstract
A system and method for expressing XML schema validation using Java in a declarative manner is disclosed. In one embodiment of the present invention a method for processing information comprises defining a schema validation using metadata stored in a database and building a memory model using the metadata. Input data for validation is received in a validation engine, which validates the input data by executing a Java program in the validation engine using the input data and the metadata. An output is generated from the validation engine that identifies the input data as being validated or not validated.
Claims12
A method for processing information comprising:
- defining a schema validation using metadata stored in a database, the metadata including constraints defined in a declarative manner, the constraints including at least one non-structural constraint, wherein the metadata comprises:
- a target validation table that points to a XML schema to be validated;
- a validation function table pointing to a Java class to be executed;
- a transaction table that specifies a transaction context for when a validation function will be executed;
- a validation parameter table that determines how the validation function will be executed;
- and
- an external rule table;
- building a memory model using said metadata;
- receiving input data for validation in a validation engine;
- evaluating a validation condition against an external rule contained in said external rule table;
- based on the evaluation of the validation condition against the external rule, validating said input data by executing the Java class in said validation engine using said input data and said metadata, wherein the Java class is configured to perform cross element validation on said data input;
- and
- generating an output from said validation engine that identifies said input data as being validated or not validated.
A method for validating a XML schema comprising:
- expressing a set of complex constraints as declarative metadata, the complex constraints including at least one non-structural constraint;
- storing said declarative metadata in database tables, wherein the declarative metadata comprises:
- a target validation table that points to a XML schema to be validated;
- a validation function table pointing to a Java class to be executed;
- a transaction table that specifies a transaction context for when a validation function will be executed;
- a validation parameter table that determines how the validation function will be executed;
- and
- an external rule table;
- creating a runtime memory model using said declarative metadata;
- and
- evaluating a validation condition against an external rule contained in said external rule table;
- based on the evaluation of the validation condition against the external rule, validating said XML schema using said declarative metadata in a Java validation engine by executing the Java class in said validation engine, wherein the Java class is configured to perform cross element validation on said data input.
A system for performing schema validation, the system comprising a processor configured to perform a method, the method comprising:
- defining a schema validation using metadata stored in a database, the metadata including constraints defined in a declarative manner, the constraints including at least one non-structural constraint, wherein the metadata comprises:
- a target validation table that points to a XML schema to be validated;
- a validation function table pointing to a Java class to be executed;
- a transaction table that specifies a transaction context for when a validation function will be executed;
- a validation parameter table that determines how the validation function will be executed;
- and
- an external rule table;
- building a memory model using said metadata;
- receiving input data for validation in a validation engine;
- evaluating a validation condition against an external rule contained in said external rule table;
- based on the evaluation of the validation condition against the external rule, validate said input data by executing the Java class in said validation engine using said input data and said metadata, wherein the Java class is configured to perform cross element validation on said data input;
- and
- generating an output from said validation engine that identifies said input data as being validated or not validated.
A computer program product comprising a non-transitory computer usable medium having a computer readable program, wherein said computer readable program when executed on a computer causes said computer to:
- define a schema validation using metadata stored in a database, the metadata including constraints defined in a declarative manner, the constraints including at least one non-structural constraint, wherein the metadata comprises:
- a target validation table that points to a XML schema to be validated;
- a validation function table pointing to a Java class to be executed;
- a transaction table that specifies a transaction context for when a validation function will be executed;
- a validation parameter table that determines how the validation function will be executed;
- and
- an external rule table;
- build a memory model using said metadata;
- receive input data for validation in a validation engine;
- evaluate a validation condition against an external rule contained in said external rule table;
- based on the evaluation of the validation condition against the external rule, validate said input data by executing the Java class in said validation engine using said input data and said metadata, wherein the Java class is configured to perform cross element validation on said data input;
- and
- generate an output from said validation engine that identifies said input data as being validated or not validated,
- wherein said metadata further includes a validation table and further comprising using said validation table to point to a particular XML schema to be validated.
Dependencies are inferred from the claim text.