Patent ID: 7890479

Claim:
A system to validate a fragment of a structured document, said system comprising computer storage storing computer readable program code, which when executed by a processor, implements: a generic parser to perform a low level validation; a schema validation parser to perform a high level validation; a schema-loading module loading a fragment associated with a structured document from a schema in annotated automaton encoding format; a scanner tokenizing said loaded fragment; a run-time validation engine receiving output of said scanner and outputting a validation pass message based on an LR parsing technique as follows: obtaining a first token from said fragment of said structured document, determining whether said first token is of element type said fragment of said structured document that is to be validated against, and if so, obtaining next token from said fragment of said structured document, checking whether said next token signifies end of said fragment of said structured document, and if so, identifying a FOLLOW token from a type-mapping table for said element type; based on said FOLLOW token, performing a low level validation using said generic parser and performing a high level validation using said schema validation parser; and returning a validation pass if both validations of said generic parser and schema validation parser are successful and an annotated automaton encoding stack is empty; and if said next token does not signify end of said fragment of said structured document, continuing validation as in validating an entire structured document, and when successfully validated as in an entire structured document, returning to step (iii) until end of said structured document token is received and outputting a validation pass when said annotated automaton encoding stack is empty.