摘要:
Techniques are provided for ensuring lexical fidelity when an XML document is stored in a binary format. Operations, on the XML data, that would cause the loss of lexical fidelity between the original XML document and the binary-encoded version of the XML document are not performed. Such operations include the removal of unnecessary whitespace characters, certain data type conversions, CRLF normalization, the “collapsing” of two-tag empty elements into a single tag empty element, and the replacing of entity references or numeric character references with another value. An XML schema, to which the XML document conforms, may indicate that the XML document is to be stored in a lexical fidelity mode. Additionally, or alternatively, the database statement that (when executed) causes the XML document to be stored in a binary format may so indicate.
摘要:
Data used and generated by the process of validating XML documents is divided into two categories: compile-time static data and runtime data. Runtime data may be specific to a particular XML document and changes when validating the XML document, while compile-time data does not change in this way. For example, compile-time data may be data that defines, according to a schema, the descendant elements and ordering between them. Runtime data is information generated to track which descendants occurred in a particular XML document being validated. Compile-time static data, once generated to validate a particular XML document, is cached within a shared volatile memory. Once the compile-time data is cached, the compile-time static data may be used to validate other XML documents without the need to regenerate the compile-time static data.
摘要:
Data used and generated by the process of validating XML documents is divided into two categories: compile-time static data and runtime data. Runtime data may be specific to a particular XML document and changes when validating the XML document, while compile-time data does not change in this way. For example, compile-time data may be data that defines, according to a schema, the descendant elements and ordering between them. Runtime data is information generated to track which descendants occurred in a particular XML document being validated. Compile-time static data, once generated to validate a particular XML document, is cached within a shared volatile memory. Once the compile-time data is cached, the compile-time static data may be used to validate other XML documents without the need to regenerate the compile-time static data.
摘要:
Techniques are described herein for efficient and scalable processing of complex sets of XML schemas. The techniques described herein provide for reducing duplication of schema elements in volatile memory by building an XML schema in-memory model that stores repeating schema elements in in-memory data structures that are separate from in-memory data structures that store the parent schema elements which logically include or otherwise refer to the repeating schema elements. The techniques described herein also provide for faster generation of an in-memory model of an XML schema by pre-loading, in data structures on persistent storage, of schema elements from dependent XML schemas that are referenced and/or incorporated by the XML schema. The techniques described herein also provide for efficient processing of inter-dependent XML schemas by tracking all unresolved schema elements from dependent XML schemas and freeing the portions of volatile memory, which are used to process schema elements from the dependent XML schemas, as soon as the dependent schema elements being processed are stored in data structures on persistent storage.
摘要:
Techniques are described herein for efficient and scalable processing of complex sets of XML schemas. The techniques described herein provide for reducing duplication of schema elements in volatile memory by building an XML schema in-memory model that stores repeating schema elements in in-memory data structures that are separate from in-memory data structures that store the parent schema elements which logically include or otherwise refer to the repeating schema elements. The techniques described herein also provide for faster generation of an in-memory model of an XML schema by pre-loading, in data structures on persistent storage, of schema elements from dependent XML schemas that are referenced and/or incorporated by the XML schema. The techniques described herein also provide for efficient processing of inter-dependent XML schemas by tracking all unresolved schema elements from dependent XML schemas and freeing the portions of volatile memory, which are used to process schema elements from the dependent XML schemas, as soon as the dependent schema elements being processed are stored in data structures on persistent storage.
摘要:
Data used and generated by the process of validating XML documents is divided into two categories: compile-time static data and runtime data. Runtime data may be specific to a particular XML document and changes when validating the XML document, while compile-time data does not change in this way. For example, compile-time data may be data that defines, according to a schema, the descendant elements and ordering between them. Runtime data is information generated to track which descendants occurred in a particular XML document being validated. Compile-time static data, once generated to validate a particular XML document, is cached within a shared volatile memory. Once the compile-time data is cached, the compile-time static data may be used to validate other XML documents without the need to regenerate the compile-time static data.
摘要:
Techniques are provided for ensuring lexical fidelity when an XML document is stored in a binary format. Operations, on the XML data, that would cause the loss of lexical fidelity between the original XML document and the binary-encoded version of the XML document are not performed. Such operations include the removal of unnecessary whitespace characters, certain data type conversions, CRLF normalization, the “collapsing” of two-tag empty elements into a single tag empty element, and the replacing of entity references or numeric character references with another value. An XML schema, to which the XML document conforms, may indicate that the XML document is to be stored in a lexical fidelity mode. Additionally, or alternatively, the database statement that (when executed) causes the XML document to be stored in a binary format may so indicate.
摘要:
A method and apparatus for validating XML documents in a streaming fashion is provided. A streaming validator validates an XML document by comparing the contents of the XML document to an XML schema. Tokens are generated for each element or attribute of the XML schema and for each element or attribute of the XML document using the same generator token function. The elements and attributes of the XML document and XML schema are compared using tokens rather than string comparisons to perform the validation more efficiently.
摘要:
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.
摘要:
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.