Streaming validation of XML documents
First Claim
1. A method for streaming validation of eXtensible Markup Language (XML) documents, the method comprising the steps of:
- initializing a stack configured for storing stack-elements;
storing at least one stack-element on top of the stack, wherein the at least one stack-element indicates at least a validation state, relative to an XML schema that defines the structure of an XML document, for the XML document;
receiving a particular event of a series of events which is generated as the XML document is parsed by a parser, wherein the particular event indicates that the parser has encountered a particular part of the XML document;
receiving the particular part of the XML document from the parser;
determining a current validation state for the XML document relative to the XML schema, wherein determining the current validation state for the XML document comprises;
retrieving information that is stored in a current stack-element that is on top of the stack of stack elements; and
based on the retrieved information, performing the steps of;
determining that the particular part of the XML document is a content particle;
determining a particular content particle type that corresponds to the content particle;
based at least on the particular content particle type that corresponds to the content particle, validating the particular part of the XML document against the XML schema;
wherein the steps of the method are performed by one or more computer systems.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and apparatus for streaming validation of XML documents is provided. A particular event of a series of events is received. The series of events is generated as an XML document is parsed by a parser, and the received particular event indicates that the parser has encountered a particular part of the XML document. The particular part of the XML document indicated by the particular event is then received. A current validation state for the XML document is determined. The current validation state, which is one of a plurality of validation states for the XML document, indicates a validation type associated with the particular part of the XML document. Based on at least the current validation state, the particular part of the XML document is validated against an XML schema that defines the structure of the XML document.
34 Citations
42 Claims
-
1. A method for streaming validation of eXtensible Markup Language (XML) documents, the method comprising the steps of:
-
initializing a stack configured for storing stack-elements; storing at least one stack-element on top of the stack, wherein the at least one stack-element indicates at least a validation state, relative to an XML schema that defines the structure of an XML document, for the XML document; receiving a particular event of a series of events which is generated as the XML document is parsed by a parser, wherein the particular event indicates that the parser has encountered a particular part of the XML document; receiving the particular part of the XML document from the parser; determining a current validation state for the XML document relative to the XML schema, wherein determining the current validation state for the XML document comprises; retrieving information that is stored in a current stack-element that is on top of the stack of stack elements; and based on the retrieved information, performing the steps of; determining that the particular part of the XML document is a content particle; determining a particular content particle type that corresponds to the content particle; based at least on the particular content particle type that corresponds to the content particle, validating the particular part of the XML document against the XML schema; wherein the steps of the method are performed by one or more computer systems. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19)
-
-
20. A computer system for streaming validation of eXtensible Markup Language (XML) documents, comprising:
-
one or more processors; a machine-readable storage medium configured for storing a stack of stack-elements, wherein the stack-elements indicate validation states for an XML document being validated and indicate schema components of an XML schema, wherein the XML schema defines the structure of the XML document; and one or more stored sequences of instructions which, when performed by the one or more processors, cause the one or more processors to execute a validation driver that is operatively connected to the stack, wherein the validation driver is configured to; initialize the stack; store at least one stack-element on top of the stack, wherein the at least one stack-element indicates at least one validation state for the XML document; receive, from a parser, a series of events which is generated as the XML document is parsed by the parser, wherein the series of events includes at least one event which indicates that the parser has encountered at least one part of the XML document; and for a particular part of the XML document; receive the particular part of the XML document from the parser; determine a current validation state for the XML document relative to the XML schema, wherein to determine the current validation state for the XML document the validation driver is configured to; retrieve information that is stored in a current stack-element that is on top of the stack; and based on the information, determine that the particular part of the XML document is a content particle and determine a particular content particle type that corresponds to the content particle; validate the particular part of the XML document against the XML schema based at least on the particular content particle type that corresponds to the content particle. - View Dependent Claims (21, 22, 23)
-
-
24. A non-transitory machine-readable storage medium storing one or more sequences of instructions for streaming validation of eXtensible Markup Language (XML) documents, wherein the one or more sequences of instructions, when executed by one or more processors, cause the one or more processors to perform steps comprising:
-
initializing a stack configured for storing stack-elements; storing at least one stack-element on top of the stack, wherein the at least one stack-element indicates at least a validation state, relative to an XML schema that defines the structure of an XML document, for the XML document; receiving a particular event of a series of events which is generated as the XML document is parsed by a parser, wherein the particular event indicates that the parser has encountered a particular part of the XML document; receiving the particular part of the XML document from the parser; determining a current validation state for the XML document relative to the XML schema, wherein determining the current validation state for the XML document comprises; retrieving information that is stored in a current stack-element that is on top of the stack of stack elements; and based on the retrieved information, performing the steps of; determining that the particular part of the XML document is a content particle; determining a particular content particle type that corresponds to the content particle; based at least on the particular content particle type that corresponds to the content particle, validating the particular part of the XML document against the XML schema. - View Dependent Claims (25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42)
-
Specification