US20080082570A1 - Document Processing System, Method And Program - Google Patents

Document Processing System, Method And Program Download PDF

Info

Publication number
US20080082570A1
US20080082570A1 US11/841,621 US84162107A US2008082570A1 US 20080082570 A1 US20080082570 A1 US 20080082570A1 US 84162107 A US84162107 A US 84162107A US 2008082570 A1 US2008082570 A1 US 2008082570A1
Authority
US
United States
Prior art keywords
finite state
document
state automaton
xml
group
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Abandoned
Application number
US11/841,621
Inventor
Naohiko Uramoto
Hiroshi Maruyama
Kento Tamura
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Publication of US20080082570A1 publication Critical patent/US20080082570A1/en
Abandoned legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/221Parsing markup language streams
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/14Tree-structured documents
    • G06F40/143Markup, e.g. Standard Generalized Markup Language [SGML] or Document Type Definition [DTD]

Definitions

  • the present invention is directed to processing a document described in a structured language such as the extensible markup language (XML). More particularly it is directed to determining which of a plurality of prepared structure type definitions a document to be processed matches.
  • XML extensible markup language
  • a format is designated by using a DTD. More specifically, DTD files such as a quotation DTD and a contract DTD are respectively prepared for formats. Although it is technically possible to write a plurality of formats by one DTD but in actuality different DTDs are ordinarily used for a plurality of formats.
  • no DTD is designated for XML document.
  • no DTD can be designated in a situation described below.
  • SOAP simple object access protocol
  • the SOAP specification functions as an envelop containing an XML document. That is, an XML document is transferred by being wrapped in a SOAP envelop in accordance with a SOAP.
  • a SOAP uses not a DTD but an XML schema as a structure type definition (schema). Therefore, even if an XML document contained in a SOAP envelop matches a predetermined DTD, it is not possible to designate the DTD for the XML document by DOCTYPE declaration. Also in the case of an XML document with an electronic signature, a DTD cannot be designated for the XML document due to the same mechanism.
  • a DTD for this XML document cannot be designated by DOCTYPE declaration. Therefore, processing for actually verifying the XML document with respect to DTDs is also required to identify a DTD for the XML document. In this case, to enable identification of the DTD for the XML document in a processed state, the DTD for the XML document may be described in a SOAP header or the like. However, there is no standard method for designating a DTD.
  • an aspect of the present invention is, assuming that a set of a structure type definitions are given, to enable processing for ascertaining to which one of the structure type definitions a received XML document matches be performed at a high speed.
  • Another aspect of the present invention is to realize a system for performing such processing with no influence on existing system configurations and implementations of XML processors.
  • the present invention is realized as a document processing system constructed as described below.
  • the document processing system has a decision rule generation section for generating a decision rule for determining whether a document described in a structured language such as XML matches at least one of a plurality of structure type definitions (e.g., DTDs) on the basis of unique elements of the structure type definitions, and a determination section for determining whether the document to be processed matches at least one of the structure type definitions on the basis of the decision rule generated by the decision rule generation section.
  • a decision rule generation section for generating a decision rule for determining whether a document described in a structured language such as XML matches at least one of a plurality of structure type definitions (e.g., DTDs) on the basis of unique elements of the structure type definitions
  • a determination section for determining whether the document to be processed matches at least one of the structure type definitions on the basis of the decision rule generated by the decision rule generation section.
  • Another example embodiment of a document processing system in accordance with the present invention has an input section for inputting an XML document to be processed, an XML parser for analyzing the XML document input by the input section, and a DTD (Document Type Definition) determination section for determining at least one of a group of DTDs to which the XML document matches by determination as to whether or not an element unique to the DTD is included in the XML document on the basis of the result of analysis by the XML parser.
  • DTD Document Type Definition
  • Still another document processing system in accordance with the present invention has a nondeterministic finite state automaton generation section for generating a nondeterministic finite state automaton corresponding to a group of structure type definitions (e.g., DTDs) to at least one of which a document described in a structured language such as XML should match, a deterministic finite state automaton generation section by converting the nondeterministic finite state automaton generated by the nondeterministic finite state automaton generation section to a deterministic finite state automaton, and a determination section for determining on the basis of the deterministic finite state automaton generated by the determinative automaton generation section whether the document to be processed matches at least one of the group of structural type definitions.
  • a group of structure type definitions e.g., DTDs
  • a deterministic finite state automaton generation section by converting the nondeterministic finite state automaton generated by the nondeterministic finite state automaton generation section to a deterministic finite state automaton
  • the present invention is also realized as a document processing method for processing a document described in a structured language such as XML by using a computer. That is, this document processing method includes the step of generating a decision rule for determining whether a document to be processed matches at least one of a plurality of structure type definitions (e.g., DTDs) on the basis of unique elements of the structure type definitions, and the step of determining whether the document to be processed matches at least one of the structure type definitions on the basis of the generated decision rule.
  • structure type definitions e.g., DTDs
  • Another document processing method in accordance with the present invention includes the step of inputting and analyzing the XML document and examining whether or not an element unique to any one of a group of DTDs (Document Type Definitions) to at least one of which the XML document to be processed should match is included in the XML document based on the result of the analysis, and identifying the DTD to which the XML document matches.
  • DTDs Document Type Definitions
  • Still another document processing method in accordance with the present invention includes a first group of steps of reading out from a memory a group of structure type definitions to at least one of which the document should match and generating a first nondeterministic finite state automaton corresponding to each of structure type definitions included in the group of structural type definitions, a second group of steps of combining the first nondeterministic finite state automatons into a second nondeterministic finite state automaton corresponding to the whole of the group of structural type definitions, a third group of steps of converting the second nondeterministic finite state automaton into a deterministic finite state automaton, and a fourth group of steps of determining whether the document to be processed matches at least one of the group of structural type definitions on the basis of the deterministic finite state automaton.
  • the present invention may be realized as a program for realizing the above-described document processing system by using a computer or making a computer execute processes corresponding to the steps in the document processing method.
  • This program may be provided by being distributed for example in a state of being stored in a magnetic disk, an optical disk, a semiconductor memory or any other recording medium or distributed over a network.
  • FIG. 1 is a diagram schematically showing an example of a hardware configuration of a computer suitable for implementation of an XML document determination system in accordance with a first embodiment of the present invention
  • FIG. 2 is a block diagram for explaining the configuration of the XML document determination system in accordance with the first embodiment
  • FIG. 3 is a flowchart for explaining the operation of a decision rule generation section in the first embodiment
  • FIG. 4 is a diagram for explaining the flow of XML document determination processing in the first embodiment
  • FIG. 5 is a diagram showing an example of DTDs
  • FIG. 6 is a diagram showing an example of an XML document to be processed
  • FIG. 7 is a diagram showing another example of the XML document to be processed.
  • FIG. 8 is a diagram showing an index of rules each formed of one element and relating to the DTDs shown in FIG. 5 ;
  • FIG. 9 is a diagram showing decision rules obtained from the index of FIG. 8 ;
  • FIG. 10 is a diagram showing an index formed by adding rules each formed of two elements to the index of FIG. 8 ;
  • FIG. 11 is a diagram showing an index formed by reflecting in FIG. 9 decision rules obtained from the index of FIG. 10 ;
  • FIG. 12 is a diagram showing a state where the decision rules shown in FIG. 11 are narrowed down;
  • FIG. 13 is a diagram showing a decision rule base formed from the decision rules shown in FIG. 12 and relating to four DTDs D 1 to D 4 ;
  • FIG. 14 is a block diagram for explaining a configuration of an XML document determination system in a second embodiment of the present invention.
  • FIG. 15 is a diagram showing an example of DTDs
  • FIG. 16 is a diagram showing NFAs corresponding to D 5 , D 6 , and D 7 shown in FIG. 15 ;
  • FIG. 17 is a diagram showing a sum automaton of the three NFAs shown in FIG. 16 ;
  • FIG. 18 is a diagram showing an algorithm extended in accordance with the embodiment in a case where a DFA is generated by using a partial construction method
  • FIG. 19 is a diagram showing a DFA generated by the algorithm shown in FIG. 18 from the NFA shown in FIG. 17 ;
  • FIG. 20 is a flowchart for explaining DTD determination processing by an XML verification section in the second embodiment
  • FIG. 21 is a diagram showing NFAs generated with respect to the DTDs shown in FIG. 15 ;
  • FIG. 22 is a diagram showing a sum automaton of the NFAs shown in FIG. 21 ;
  • FIG. 23 is a diagram showing an algorithm extended in accordance with an example of modification of the embodiment in a case where a DFA is generated by using a partial construction method
  • FIG. 24 is a diagram showing a DFA generated from the sum automaton shown in FIG. 22 so that the algorithm shown in FIG. 23 is reflected therein;
  • FIG. 25 is a flowchart for explaining DTD determination processing by an XML verification section in the modification of the second embodiment.
  • the present invention enables processing for ascertaining to which structure type definition a received XML document matches be performed at a high speed. It also provides a system for performing such processing with no influence on existing system configurations and implementation of XML processors.
  • the present invention is realized as a document processing system in which the document processing system has a decision rule generation section for generating a decision rule for determining whether a document described in a structured language such as XML matches at least one of a plurality of structure type definitions (e.g., DTDs) on the basis of unique elements of the structure type definitions, and a determination section for determining whether the document to be processed matches at least one of the structure type definitions on the basis of the decision rule generated by the decision rule generation section.
  • a decision rule generation section for generating a decision rule for determining whether a document described in a structured language such as XML matches at least one of a plurality of structure type definitions (e.g., DTDs) on the basis of unique elements of the structure type definitions
  • a determination section for determining whether the document to be processed matches at least one of the structure type definitions on the basis of the decision rule generated by the decision rule generation section.
  • the decision rule generation section forms a rule base for identifying the corresponding structure type definition by using the decision rule on condition that a predetermined element occurs, and the determination section identifies the structure type definition to which the document to be processed matches by collating a sequence of events obtained from the document with the rule base.
  • Another embodiment of a document processing system in accordance with the present invention has an input section for inputting an XML document to be processed, an XML parser for analyzing the XML document input by the input section, and a DTD (Document Type Definition) determination section for determining at least one of a group of DTDs to which the XML document matches by determination as to whether or not an element unique to the DTD is included in the XML document on the basis of the result of analysis by the XML parser.
  • DTD Document Type Definition
  • Still another document processing system in accordance with the present invention has a nondeterministic finite state automaton generation section for generating a nondeterministic finite state automaton corresponding to a group of structure type definitions (e.g., DTDs) to at least one of which a document described in a structured language such as XML should match, a deterministic finite state automaton generation section by converting the nondeterministic finite state automaton generated by the nondeterministic finite state automaton generation section to a deterministic finite state automaton, and a determination section for determining on the basis of the deterministic finite state automaton generated by the determinative automaton generation section whether the document to be processed matches at least one of the group of structural type definitions.
  • a group of structure type definitions e.g., DTDs
  • a deterministic finite state automaton generation section by converting the nondeterministic finite state automaton generated by the nondeterministic finite state automaton generation section to a deterministic finite state automaton
  • the nondeterministic finite state automaton generation section generates the nondeterministic finite state automaton corresponding to the group of structure type definitions by combining nondeterministic finite state automatons corresponding to the structure type definitions included in the group of structure type definitions, and imparts particular information designating the corresponding structure type definition to the portions corresponding to the structure type definitions in the nondeterministic finite state automaton corresponding to the group of structure type definitions.
  • the deterministic finite state automaton generation section imparts to the generated deterministic finite state automaton the particular information imparted to the nondeterministic finite state automaton after updating the particular information.
  • the determination section traces the determinative finite state automaton on the basis of the document to be processed, and identifies the structure type definition to which the document matches on the basis of the particular information imparted to the traced portion.
  • a bit vector having a number of bits corresponding to the number of structured languages may be used.
  • the bit vector imparted to each of the predetermined portions of the automaton may be referred to recognize the corresponding structured language.
  • This particular information may be imparted to state transitions or states in the nondeterministic finite state automaton and the deterministic finite state automaton.
  • the present invention is also realized as a document processing method for processing a document described in a structured language such as XML by using a computer.
  • the document processing method includes the step of generating a decision rule for determining whether a document to be processed matches at least one of a plurality of structure type definitions (e.g., DTDs) on the basis of unique elements of the structure type definitions, and determining whether the document to be processed matches at least one of the structure type definitions on the basis of the generated decision rule.
  • the step of generating the decision rule includes the step of extracting a sequence of elements constituting each of the structure type definitions, and the step of selecting, as a decision rule, each of the extracted sequence of elements which occurs in only one of the structure type definitions.
  • Another document processing method in accordance with the present invention includes the step of inputting and analyzing the XML document and examining whether or not an element unique to any one of a group of DTDs (Document Type Definitions) to at least one of which the XML document to be processed should match is included in the XML document based on the result of the analysis, and identifying the DTD to which the XML document matches.
  • DTDs Document Type Definitions
  • Still another document processing method in accordance with the present invention includes a first group of steps of reading out from a memory a group of structure type definitions to at least one of which the document should match and generating a first nondeterministic finite state automaton corresponding to each of structure type definitions included in the group of structural type definitions, a second group of steps of combining the first nondeterministic finite state automatons into a second nondeterministic finite state automaton corresponding to the whole of the group of structural type definitions, a third group of steps of converting the second nondeterministic finite state automaton into a deterministic finite state automaton, and a fourth group of steps of determining whether the document to be processed matches at least one of the group of structural type definitions on the basis of the deterministic finite state automaton.
  • the first group of steps includes a step of imparting, to each of the first nondeterministic finite state automatons, particular information designating the corresponding structure type definition
  • the second group of steps includes a step of imparting the particular information to the portions corresponding to the structure type definition in the second nondeterministic finite state automatons
  • the third group of steps includes a step of imparting to the generated deterministic finite state automaton the particular information imparted to the nondeterministic finite state automaton after updating the particular information
  • the fourth group of steps includes a step of tracing the determinative finite state automaton on the basis of the document to be processed, and identifying the structure type definition to which the document matches on the basis of the particular information imparted to the traced portion.
  • the present invention may be realized as a program for realizing the above-described document processing system by using a computer or making a computer to execute processings corresponding to the steps in the document processing method.
  • This program may be provided by being distributed in a state of being stored in a magnetic disk, an optical disk, a semiconductor memory or any other recording medium or distributed over a network.
  • a set of DTDs some of which is probable to correspond to an XML document to be handled are scanned in advance to generate a discrimination rule for discrimination of each of the DTDs from the others.
  • Each discrimination rule is used for discrimination of the corresponding DTD when an XML document matches the DTD, thereby enabling the DTD to which the XML document matches be identified with efficiency.
  • FIG. 1 is a diagram schematically showing an example of a hardware configuration of a computer suitable for implementation of an XML document determination system in accordance with the first embodiment of the present invention.
  • the computer shown in FIG. 1 has a central processing unit (CPU) 101 , which is a computation means, a main memory 103 connected to the CPU 101 via a mother board (M/B) chip set 102 and a CPU bus, a video card 104 also connected to the CPU 101 via the M/B chip set 102 and an accelerated graphic port (AGP), a hard disk 105 and a network interface 106 each connected to the M/B chip set 102 via a peripheral component interconnect (PCI) bus, and a floppy disk drive 108 and a keyboard/mouse 109 each connected to the M/B chip set 102 via the PCI bus, a bridge circuit 107 and a low-speed bus such as an industry standard architecture (ISA) bus.
  • This computer has a clock oscillator and a controller for controlling the clock oscillator (both not shown) provided as means for controlling the operating performance (operating clock) of the CPU 101 as described below.
  • FIG. 1 only illustrates an example of the hardware configuration of the computer for implementation of this embodiment, and the computer may have any of other various configurations if this embodiment can be applied to it.
  • a video memory may be provided in place of the video card 104 and image data may be processed by the CPU 101 alone.
  • a sound mechanism for speech input/output may be provided.
  • a compact disc-read only memory (CD-ROM) drive and a digital versatile disc-read only memory (DVD-ROM) drive may be provided by means of an interface such as an AT attachment (ATA).
  • ATA AT attachment
  • FIG. 2 is a block diagram for explaining the configuration of the XML document determination system in accordance with the first embodiment of the present invention.
  • the XML document determination system of the first embodiment has a decision rule generation section 10 which generates, by scanning a set of a plurality of DTDs, a decision rule for determining to which of the DTDs an XML document matches, a decision rule base storage section 20 which generates a rule base (decision rule base) from the set of decision rules generated by the decision rule generation section 10 and stores the rule base, a DTD storage section 30 in which the set of DTDs to some of which an XML document to be handled should match is stored, an XML parser 40 for analyzing an XML document (input document) to be processed, and a DTD determination section 50 which determines to which one of the DTDs an XML document analyzed by the XML parser 40 matches by collating the decision rules in the decision rule base.
  • a decision rule generation section 10 which generates, by scanning
  • the XML document determination system also has an input section (not shown) to which XML documents (input documents) to be processed after being analyzed by the XML parser 40 are input via a network or a predetermined input device, and through which the input documents are stored in a main memory 103 or the like.
  • the decision rule generation section 10 the XML parser 40 and the DTD determination section 50 are software blocks realized by using the program-controlled CPU 101 shown in FIG. 1 .
  • a program for realizing these functions by controlling the CPU 101 is provided by being distributed in a state of being stored in a magnetic disk, an optical disk, a semiconductor memory or any other recording medium or distributed over a network, and is stored in the main memory 103 .
  • the decision rule base storage section 20 and the DTD storage section 30 are realized in the main memory 103 . Data stored in the main memory 103 can be saved to a storage, e.g., the hard disk 150 if necessary.
  • Processing in this embodiment is broadly divided into decision rule generation processing by the decision rule generation section 10 and XML document determination processing performed by using the XML parser 40 and the DTD determination section 50 . Therefore the system shown in FIG. 2 may be such that the decision rule generation section 10 , the XML parser 40 and the DTD determination section 50 are realized by using one computer, or such that, for example, the decision rule generation section 10 is realized by using one computer and the XML parser 40 and the DTD determination section 50 are realized by using another computer.
  • the decision rule base is delivered from the computer operating as the decision rule generation section 10 to the computer operating as the XML parser 40 and the DTD determination section 50 by means of a network or a recording medium such as a magnetic disk. Also, the decision rule base storage section 20 and DTD storage section 30 are provided in combination with each computer.
  • An input to the XML document determination system of this embodiment is an XML document having no DTD information
  • an output from the XML document determination system is a DTD to which the input XML document matches. If an XML document matches a plurality of DTDs, the corresponding DTDs are output. Matching of a given XML document to Dn.dtd which is a predetermined DTD indicates that the result of verification of the XML document with Dn.dtd assumed to be designated is “valid”.
  • the method of determining a DTD for an XML document in this embodiment is based on the idea that if an element (sequence) defined as an indispensable element in a predetermined DTD does not occur in other DTDs (that is, the DTD has an element (sequence) specific to it), the DTD to which this XML document matches can be uniquely determined at the stage when it is confirmed that the element occurs in the given XML document. That is, an (indispensable) element or a sequence of elements which exists only in a certain DTD is found from a set of DTDs and a set of rules for determination is constructed, thereby enabling a DTD to which an XML document matches be determined at a high speed.
  • the decision rule generation section 10 first generates decision rules on the basis of the above-described idea.
  • FIG. 3 is a flowchart for explaining the operation of the decision rule generation section 10 .
  • the decision rule generation section 10 reads out from the DTD storage section 30 a set of DTDs to some of which an XML document to be handled is probable to match, and sets the read set of DTDs as an object to be processed.
  • the decision rule generation section 10 then extracts an exclusive rule which occurs for only one DTD from the obtained rule formed of the n elements, i.e., a rule in which only one DTD is related in the formed index, and sets the extracted rule as a decision rule for the corresponding DTD (step 305 ).
  • the decision rule generation section 10 checks whether rules have been set with respect to all the DTDs, returns the process to step 302 if there is a DTD with which no rule has been set (step 306 ), and repeats the processing from step 303 by incrementing the value of parameter n by one. After setting rules with respect to all the DTDs, the decision rule generation section 10 narrows down the set rules (step 307 ).
  • narrowing down of rules is performed on the following three principles.
  • the decision rule generation section 10 After generating decision rules in the above-described manner, the decision rule generation section 10 combines the generated decision rules into a decision rule base and stores the decision rule base in the decision rule base storage section 20 .
  • the decision rule base used in this embodiment is constituted by a rule set formed of if-then rules and a flag set. That is, it is a rule base for identifying a DTD when a corresponding condition which is occurrence of a predetermined element is satisfied.
  • Each rule is in if (test)-then (action) form.
  • decision rules are organized as described below.
  • FIG. 4 is a diagram for explaining the flow of XML document determination processing in this embodiment.
  • XML document determination processing includes XML document analysis processing performed by the XML parser 40 and determination processing performed by the DTD determination section 50 . It is assumed that at an initial stage an XML document (input document) input via a network or the like to be processed is stored in the main memory 103 shown in FIG. 1 in a state of being accessible by the CPU 101 operating as the XML parser 40 and the DTD determination section 50 .
  • the XML parser 40 first reads out the XML document to be processed from the main memory 103 and analyzes the XML document.
  • the XML parser 40 scans the XML document from the beginning and extracts occurrences of elements and attributes as events. A sequence of events thereby extracted is delivered to the DTD determination section 50 .
  • an SAX parser for example, may be used.
  • the DTD determination section 50 examines the sequence of events received from the XML parser 40 by using the decision rule base stored in the decision rule base storage section 20 . More specifically, in all the flags in the decision rule base, “false” is first set.
  • test portion of each rule in the decision rule base is checked. If the element passes the test, then an action is executed. If a DTD name is written in the action portion, the DTD name is output and the processing is terminated.
  • a validating XML processor verifies the processing-object XML document on the basis of the DTD with the DTD name output from the DTD determination section 50 . By this verification, final verification is made as to whether the XML document matches the DTD.
  • XML document verification processing performed by the validating XML processor is the same as verification in the conventional art. However, since DTD to be verified are narrowed by the above-described determination processing performed by the XML parser 40 and the DTD determination section 50 , the overall processing cost is remarkably reduced.
  • the validating XML processor may be provided in an application using the XML document or may be provided as a component of the XML document determination system in accordance with the present invention. In the case where it is provided in the system of this embodiment, the output from the system is not the DTD to which an XML document to be processed matches but a verification result as to whether the XML document matches the determined DTD.
  • DTDs D 1 , D 2 , D 3 , and D 4 shown in FIG. 5 are assumed to have been provided as a set of DTDs to some of which a transferred XML document is possible to match.
  • the decision rule generation section 10 first extracts decision rules from the set of four DTDs shown in FIG. 5 and forms a decision rule base.
  • element sequences (rules) each consisting of one element are extracted on the basis of element type declarations contained in the DTDs D 1 , D 2 , D 3 , and D 4 shown in FIG. 5 , and an index shown in FIG. 8 is formed. Rules each occurring with only one DTD (indicated by one DTD name shown alone on the right-hand section of the index) are extracted and set as decision rules for the corresponding DTDs.
  • FIG. 9 shows decision rules obtained from the index shown in FIG. 8 .
  • DTDs (D 1 , D 3 ) exit with which no rule has been set. The process then returns to step 302 in FIG. 3 and the same processing is repeated with respect to rules each formed of two elements.
  • An index shown in FIG. 10 is thereby formed. Rules each occurring with only one DTD are extracted and set as decision rules for the corresponding DTDs.
  • FIG. 11 is a diagram formed by reflecting in FIG. 9 the decision rules obtained from the index shown in FIG. 10 . In the state shown in FIG. 11 , rules are set with respect to all the DTDs. Then the rules are narrowed down. According to the decision rules shown in FIG. 11 , the decision rules relating to D 2 , D 3 , and D 4 are narrowed down. Narrowing down of the decision rule relating to D 4 will be described in detail by way of example.
  • Rule—D 4 ⁇ (F), (H), (F, H), (H, G?) ⁇ .
  • element H is scanned before element F according to the definition of D 4 shown in FIG. 5 .
  • Each of these elements is an indispensable element. Therefore, if a given XML document matches D 4 , element F exists necessarily. Consequently, the rule relating to element H can be removed according to the principle (1).
  • the rule (F) in which the number of elements is fixed exists with D 4 , the rule including occurrence of a variable number of elements (H, G?) is removed according to the principle (2).
  • the remaining two rules (F) and (F, H), (F) is part of (F, H). Therefore the rule (F, H) having a longer total length of elements is removed according to the principle (3).
  • the same processing is performed on the decision rules relating to D 2 and D 3 .
  • the decision rules shown in FIG. 11 are narrowed down as shown in FIG. 12 .
  • the decision rule generation section 10 forms a decision rule base from the decision rules shown in FIG. 12 , and stores the decision rule base in the decision rule base storage section 20 .
  • FIG. 13 shows the decision rule base which is formed from the decision rules shown in FIG. 12 , and which relates to the four DTDs D 1 to D 4 .
  • the DTD determination section 50 determines the DTD for the XML document by using generated decision rule base.
  • the XML parser 40 obtains event sequence by analyzing the XML document to be processed, and delivers the event sequence to the DTD determination section 50 .
  • the DTD determination section 50 collate the XML document event sequence received from the XML parser 40 with the decision rule base stored in the decision rule base storage section 20 to determine to which one of the DTDs the XML document matches.
  • the XML document shown in FIG. 7 is assumed to have been input as an object of processing.
  • the XML parser 40 analyzes this XML document to extract events:
  • an automaton corresponding to each element type declaration of a DTD to which an XML document to be handled is probable to match is generated. Determination processing using such automatons is performed on DTDs to some of which the XML document is probable to match to enable efficient identification of the DTD to which the XML document matches.
  • This embodiment of the present invention can be realized by using a computer having the same hardware configuration as that of the computer for the first embodiment.
  • FIG. 14 is a block diagram for explaining the configuration of an XML document determination system in accordance with the second embodiment.
  • the XML document determination system of this embodiment has a DTD storage section 1410 in which a set of DTDs to some of which an XML document to be handled should match is stored, a nondeterministic finite state automaton (NFA) generation section 1420 which generates an NFA from m number of element type declarations (regarded as regular representations) with respect to one element name on the basis of the set of DTDs, a deterministic finite state automaton (DFA) generation section 1430 which converts the generated NFA into a DFA, an XML parser 1440 for analyzing an XML document (input document) to be processed, and an XML verification section 1450 which determines to which one of the DTDs the XML document analyzed by the XML parser 1440 matches by using the DFA generated by the DFA generation section 1430 .
  • NFA nondeterministic finite state automat
  • the XML document determination system also has an input section (not shown) to which XML documents (input documents) to be processed after being analyzed by the XML parser 1440 are input via a network or a predetermined input device, and through which the input documents are stored in a main memory 103 or the like.
  • the NFA generation section 1420 , the DFA generation section 1430 , the XML parser 1440 and the XML verification section 1450 are software blocks realized by the program-controlled CPU 101 shown in FIG. 1 .
  • a program for realizing these functions by controlling the CPU 101 is provided by being distributed in a state of being stored in a magnetic disk, an optical disk, a semiconductor memory or any other recording medium or distributed over a network, and is stored in the main memory 103 .
  • the DTD storage section 1410 is realized in the main memory 103 . Data stored in the main memory 103 can be saved to a storage, e.g., the hard disk 150 if necessary.
  • NFA generation processing performed by the NFA generation section 1420 DFA generation processing performed by the DFA generation section 1430 , and DTD determination (verification) processing performed by the XML parser 1440 and the XML verification section 1450 are independent of each other. Therefore the components may be realized by using one computer or a plurality of computers.
  • DFAs are delivered from the computer operating as the NFA generation section 1420 and the DFA generation section 1430 to the computer operating as the XML parser 1440 and the XML verification section 1450 via a network or a recording medium such as a magnetic disk.
  • the DTD storage section 1410 is provided in combination with each computer.
  • An input to the XML document determination system of this embodiment is an XML document having no DTD information
  • an output from the XML document determination system is a verification result as to whether the XML document matches the DTD determined in accordance with this embodiment.
  • DTDs D 5 , D 6 , and D 7 shown in FIG. 15 are assumed to have been initially stored in the DTD storage section 1410 .
  • an element type declaration is defined with respect to element A, as shown in FIG. 15 .
  • the NFA generation section 1420 first generates an NFA corresponding to each of the three DTDs shown in FIG. 15 .
  • a well-known method can be used for generation of NFAs in this embodiment. It will not be described in this specification.
  • FIG. 16 is a diagram showing NFAs corresponding to D 5 , D 6 , and D 7 shown in FIG. 15 .
  • the NFA generation section 1420 imparts a bit vector having a length m (m is the number of DTDs), that is, formed by m bits (elements), to a transition rule ⁇ (q, a), a ⁇ in each of the generated NFAs, sets the ith (1 ⁇ i ⁇ m) bit to a value 1 (turns on the bit) with respect to the ith DTD, and sets the other bits to a value 0 (turns off the bits).
  • m is the number of DTDs
  • the NFA generation section 1420 combines the generated m NFAs into a sum automaton (A 1
  • FIG. 17 is a diagram showing the sum automaton obtained from the three NFAs shown in FIG. 16 . Referring to FIG. 17 , the bit vectors imparted to the NFAs shown in FIG. 16 are imparted at corresponding position in the sum automaton.
  • the sum automaton (NFA) generated as described above is stored in a predetermined area in the main memory 103 . Thereafter, the DFA generation section 1430 reads out from the main memory 103 the sum automaton (NFA) generated by the NFA generation section 1420 , and converts the sum automaton into a DFA.
  • a well-known method e.g., a partial construction method can be used.
  • a necessary bit vector is computed to be imparted to a transition rule newly generated.
  • FIG. 18 is a diagram showing an algorithm expanded in accordance with this embodiment in a case where a DFA is generated by using the partial construction method.
  • the partial construction method is a method of constructing a DFA by regarding as one state a state set which can be reached from a predetermined state.
  • the portion indicated by being underlined in FIG. 18 corresponds to the extended portion in accordance with this embodiment, i.e., the operation for imparting a bit vector to the state of a generated DFA.
  • FIG. 18 is a diagram showing an algorithm expanded in accordance with this embodiment in a case where a DFA is generated by using the partial construction method.
  • the partial construction method is a method of constructing a DFA by regarding as one state a state set which can be reached from a predetermined state.
  • the portion indicated by being underlined in FIG. 18 corresponds to the extended portion in accordance with this embodiment, i.e., the operation for imparting a bit vector to the state of a generated DFA.
  • T is a state set (e.g., ⁇ 1, 2, 3 ⁇ );
  • DTran[T, a] is a transition rule for transition from the state (set) T by an input symbol a;
  • Dstates is a stack in which the state set is placed;
  • ⁇ -closure(q) is a set of states of NFA each of which can be reached only by ⁇ -transition from the state of NFA;
  • ⁇ -closure(T) is a set of states of NFA each of which can be reached only by ⁇ -transition from a predetermined state s of NFA contained in T;
  • move(T, a) is a set of states of NFA to one of which a transition is made by input symbol a from the predetermined state s of NFA contained in T.
  • the algorithm will be will be outlined with reference to the NFA shown in FIG. 17 and to FIG. 18 .
  • the NFA shown in FIG. 17 is defined as shown below.
  • unmarked state T in Dstatus (only ⁇ 0, 1, 4, 10, 11, 13 ⁇ exists and this is selected) is marked and processed with respect to each of the symbols which are the elements of ⁇ .
  • bit vectors for the new transition rule are generated and imparted to the states of U to each of which a transition is made by input of symbol B.
  • transition rule relating to the DFA with the bit vector is obtained by processing with respect to symbol B. That is,
  • the corresponding bit vector is (0, 0, 1). If ⁇ 11, 12, 13 ⁇ is a new state Q 2 ,
  • FIG. 19 is a diagram showing a DFA generated from the NFA shown in FIG. 17 on the basis of the algorithm shown in FIG. 18 .
  • the XML parser 1440 reads out the XML document to be processed from the main memory 103 and analyzes the XML document.
  • the XML parser 1440 scans the XML document from the beginning and extracts occurrences of elements and attributes as events. A sequence of events thereby extracted is delivered to the XML verification section 1450 .
  • the XML verification section 1450 determines to which of the DTDs the XML document to be processed matches by using the DFA obtained as described above. Therefore the XML verification section 1450 corresponds to the DTD determination section 50 in the first embodiment. In this embodiment, however, since determination is made by using a DFA generated from DTDs, matching of the XML document to some of the DTDs can be ensured if the processing proceeds to the final state of DFA. That is, verification of the XML document with respect to the DTDs is simultaneously performed.
  • FIG. 20 is a flowchart for explaining DTD determination processing performed by the XML verification section 1450 .
  • the XML verification section 1450 first sets a state s as initial state Q 0 (step 2001 ) and performs a sequence of processing operations from initial state Q 0 (step 2002 ).
  • step 2002 determines whether the state s is the final state. For example, determination as to whether the state s is the final state is made by setting a flag for identifying each state as the final or non-final state.
  • the occurrences of the elements are input in the order of elements A, B, and D and the processing is repeated in accordance with the above-described procedure.
  • the DFA shown in FIG. 19 state transitions 0 ⁇ 1 ⁇ 7 are made to reach the final state.
  • DTD determination processing using a DFA may be stopped when a DTD to which an XML document should match is uniquely determined. For example, when a transition from state 0 to state 5 in the DFA shown in FIG. 19 occurs, the DTD to which the XML document should match is limited to D 7 shown in FIG. 15 . The processing may be stopped at this stage.
  • the XML document determination system of this embodiment outputs the kind of DTD determined in the same manner as in the first embodiment and delivers the kind of DTD to the application for processing the XML document.
  • the above-described second embodiment of the present invention is implemented in a complicated manner since bit vectors are imparted to the state transitions in the NFA and DFA, so that the actual processing by a computer is liable to be lower in speed. Then a method of imparting bit vectors not to state transitions but to states is taken into consideration.
  • This method reduces the amount of hardware resources required for processing because the number of states is smaller than the number of state transitions in the NFA and DFA.
  • a system in which bit vectors are imparted to states can be easily implemented since it has an affinity to an ordinary method for realizing an automaton in a computer.
  • the NFA generation section 1420 of this embodiment generates NFAs respectively corresponding to DTDs stored in the DTD storage section 1410 , imparts a bit vector having a length m (m: the number of DTDs) to each state, and also imparts to each state a termination-possible flag for discrimination between the final and non-final states.
  • FIG. 21 is a diagram showing NFAs generated in this manner with respect to the three DTDs (D 5 , D 6 , D 7 ) shown in FIG. 15 .
  • the final state corresponds to “1” of the termination-possible flag.
  • FIG. 22 is a diagram showing the sum automaton of the three NFAs shown in FIG. 21 . As shown in FIG. 22 , the three final states corresponding to the NFAs shown in FIG. 21 exist.
  • the DFA generation section 1430 converts the sum automaton generated by the NFA generation section 1420 into a DFA.
  • Expression ⁇ -closureWB(q) (q represents a predetermined state in each NFA) represents information formed of three elements:
  • ⁇ -closureWB(T) (T is a state set) represents the result of obtaining ⁇ -closureWB(q) with respect to each state q in T and obtaining the sum of the elements obtained from ⁇ -closureWB(q).
  • FIG. 23 is a diagram showing an extended algorithm in which the above-described operations are reflected in a case where a DFA is generated by using a partial construction method.
  • FIG. 24 is a diagram showing a DFA generated from the sum automaton shown in FIG. 22 .
  • the XML verification section 1450 determines to which one of the DTDs the XML document to be processed matches by using the DFA obtained as described above.
  • FIG. 25 is a flowchart for explaining DTD determination processing performed by the XML verification section 1450 .
  • the XML verification section 1450 first sets a state s as initial state Q 0 (step 2501 ) and performs a sequence of processing operations from initial state Q 0 (step 2502 ). If only one of the bits of the bit vector imparted to the state s presently observed is 1, the DTD corresponding to the bit position at which 1 is set is selected as a matching DTD (steps 2503 and 2504 ).
  • the state s′ is then set as the state s and the process returns to step 2502 (step 2507 ). If the state s is the final state, the DTD corresponding to the bit position at which 1 is set in the bit vector imparted to the state s is selected as a matching DTD and the process is terminated (steps 2502 , 2508 ).
  • the time taken to form the index in the first embodiment is about O(m*k).
  • O(m*k) means that the computation can be completed within a time period which is a constant multiple of m*k.
  • k represents the number of times the processing shown in the flowchart of FIG. 3 is repeated for extraction of rules formed of one element and extraction of rules formed of two elements, for example. If the number of specific elements existing in each DTD is larger, the amount of processing for forming the index is smaller and the time required for processing is shorter. The time required for making decision rules from the index is about O(n).
  • NFAs and a DFA a larger amount of processing is required to form NFAs and a DFA.
  • ) proportional to the length of regular representation r is required.
  • the time required to generate NFAs is about O(n*1). It is thought that the value of 1 is larger than the value of k in ordinary cases. Therefore the first embodiment has a higher efficiency at a preparatory stage (when performing processing for generating decision rules or a DFA) before determination of a DTD to which an XML document should match.
  • a state transition table (DFA) is stored in a memory. Therefore the cost for the memory space used in the second embodiment is higher than that in the first embodiment.
  • the first embodiment determination is only made as to the probability of an XML document to be processed matching to a predetermined DTD, and it is not certain whether the XML document truly matches the determined DTD before verification using a validating XML processor or the like is actually performed.
  • the second embodiment it can be ensured that the XML document to be processed matches the determined DTD when the final state of the DFA is reached.
  • the occurrence and sequence of the elements are used for criteria for determination.
  • the above-described determination method may also be applied to processing using attribute definitions.
  • no meaning is attached to the order of attributes, and the occurrences of attributes and fixed attribute values may form decision rules.
  • processing for identifying the structure type definition can be performed at a high speed. Also, according to the present invention, a system for performing such processing can be realized without influencing the existing system configurations and implementation of XML processors.
  • the present invention can be realized in hardware, software, or a combination of hardware and software.
  • a visualization tool according to the present invention can be realized in a centralized fashion in one computer system, or in a distributed fashion where different elements are spread across several interconnected computer systems. Any kind of computer system—or other apparatus adapted for carrying out the methods and/or functions described herein—is suitable.
  • a typical combination of hardware and software could be a general purpose computer system with a computer program that, when being loaded and executed, controls the computer system such that it carries out the methods described herein.
  • the present invention can also be embedded in a computer program product, which comprises all the features enabling the implementation of the methods described herein, and which—when loaded in a computer system—is able to carry out these methods.
  • Computer program means or computer program in the present context include any expression, in any language, code or notation, of a set of instructions intended to cause a system having an information processing capability to perform a particular function either directly or after conversion to another language, code or notation, and/or reproduction in a different material form.
  • the invention includes an article of manufacture which comprises a computer usable medium having computer readable program code means embodied therein for causing a function described above.
  • the computer readable program code means in the article of manufacture comprises computer readable program code means for causing a computer to effect the steps of a method of this invention.
  • the present invention may be implemented as a computer program product comprising a computer usable medium having computer readable program code means embodied therein for causing a function described above.
  • the computer readable program code means in the computer program product comprising computer readable program code means for causing a computer to effect one or more functions of this invention.
  • the present invention may be implemented as a program storage device readable by machine, tangibly embodying a program of instructions executable by the machine to perform method steps for causing one or more functions of this invention.

Abstract

To perform processing at a high speed to identify some of the structure type definitions in a given definition set to which a received XML document matches. There are provided a decision rule generation section which generates a decision rule for determining to which one of a plurality of DTDs an XML document matches on the basis of unique elements of the DTDs, and a DTD determination section which determines to which one of the plurality of DTDs the XML document to be processed matches on the basis of the decision rule generated by the decision rule generation section.

Description

    FIELD OF THE INVENTION
  • The present invention is directed to processing a document described in a structured language such as the extensible markup language (XML). More particularly it is directed to determining which of a plurality of prepared structure type definitions a document to be processed matches.
  • BACKGROUND ART
  • In the field of information communication through networks, systems in which data, etc., are exchanged by using XML formats are becoming prevalent. Ordinarily, not a single XML document format but a plurality of XML document formats exist as the format of XML documents exchanged as business data, etc., between companies. For example, with respect to a leasing contract system, formats for a quotation request, a contract document, a request item inquiry, etc., are conceivable.
  • In XML, a format is designated by using a DTD. More specifically, DTD files such as a quotation DTD and a contract DTD are respectively prepared for formats. Although it is technically possible to write a plurality of formats by one DTD but in actuality different DTDs are ordinarily used for a plurality of formats.
  • In some case, there is a need to recognize the format of an XML document by identifying a DTD to which the XML document matches. For example, in a case where processing according to the contents of a transferred XML document is performed on the XML document, a key for an electronic signature is used according to the format. In such a case, if a DTD has been explicitly designated for the XML document to be processed, it is apparent that the DTD to which the XML document matches can be identified. However, if no explicit designation has been made, processing for actually verifying the XML document with respect to DTDs is required.
  • In some case, no DTD is designated for XML document. For example, no DTD can be designated in a situation described below. In recent years, system construction through Web services has been spotlighted and such Web services use a simple object access protocol (SOAP) for exchange of XML documents. The SOAP specification functions as an envelop containing an XML document. That is, an XML document is transferred by being wrapped in a SOAP envelop in accordance with a SOAP. A SOAP uses not a DTD but an XML schema as a structure type definition (schema). Therefore, even if an XML document contained in a SOAP envelop matches a predetermined DTD, it is not possible to designate the DTD for the XML document by DOCTYPE declaration. Also in the case of an XML document with an electronic signature, a DTD cannot be designated for the XML document due to the same mechanism.
  • As described above, if there is a need to identify a DTD for an XML document, and if no DTD is explicitly designated for the XML document to be processed, processing for actually verifying the XML document with respect to DTDs is required to identify a DTD for the XML document.
  • In the case of an XML document processed in accordance with a SOAP or by processing with an electronic signature, a DTD for this XML document cannot be designated by DOCTYPE declaration. Therefore, processing for actually verifying the XML document with respect to DTDs is also required to identify a DTD for the XML document. In this case, to enable identification of the DTD for the XML document in a processed state, the DTD for the XML document may be described in a SOAP header or the like. However, there is no standard method for designating a DTD.
  • As described, it is necessary in some case to perform processing for verification with respect to DTDs for recognition of the format of an XML document to be processed. In a case where an XML document to be processed has a multiplicity of formats, however, a process for verifying the XML document with respect to all DTDs is troublesome and time-consuming. The same problem is also encountered with a structure type definition (e.g., the above-mentioned XML schema) other than DTDs.
  • SUMMARY OF THE INVENTION
  • Therefore an aspect of the present invention is, assuming that a set of a structure type definitions are given, to enable processing for ascertaining to which one of the structure type definitions a received XML document matches be performed at a high speed.
  • Another aspect of the present invention is to realize a system for performing such processing with no influence on existing system configurations and implementations of XML processors.
  • In an example embodiment to achieve these aspects, the present invention is realized as a document processing system constructed as described below. The document processing system has a decision rule generation section for generating a decision rule for determining whether a document described in a structured language such as XML matches at least one of a plurality of structure type definitions (e.g., DTDs) on the basis of unique elements of the structure type definitions, and a determination section for determining whether the document to be processed matches at least one of the structure type definitions on the basis of the decision rule generated by the decision rule generation section.
  • Another example embodiment of a document processing system in accordance with the present invention has an input section for inputting an XML document to be processed, an XML parser for analyzing the XML document input by the input section, and a DTD (Document Type Definition) determination section for determining at least one of a group of DTDs to which the XML document matches by determination as to whether or not an element unique to the DTD is included in the XML document on the basis of the result of analysis by the XML parser.
  • Still another document processing system in accordance with the present invention has a nondeterministic finite state automaton generation section for generating a nondeterministic finite state automaton corresponding to a group of structure type definitions (e.g., DTDs) to at least one of which a document described in a structured language such as XML should match, a deterministic finite state automaton generation section by converting the nondeterministic finite state automaton generated by the nondeterministic finite state automaton generation section to a deterministic finite state automaton, and a determination section for determining on the basis of the deterministic finite state automaton generated by the determinative automaton generation section whether the document to be processed matches at least one of the group of structural type definitions.
  • The present invention is also realized as a document processing method for processing a document described in a structured language such as XML by using a computer. That is, this document processing method includes the step of generating a decision rule for determining whether a document to be processed matches at least one of a plurality of structure type definitions (e.g., DTDs) on the basis of unique elements of the structure type definitions, and the step of determining whether the document to be processed matches at least one of the structure type definitions on the basis of the generated decision rule.
  • Another document processing method in accordance with the present invention includes the step of inputting and analyzing the XML document and examining whether or not an element unique to any one of a group of DTDs (Document Type Definitions) to at least one of which the XML document to be processed should match is included in the XML document based on the result of the analysis, and identifying the DTD to which the XML document matches.
  • Still another document processing method in accordance with the present invention includes a first group of steps of reading out from a memory a group of structure type definitions to at least one of which the document should match and generating a first nondeterministic finite state automaton corresponding to each of structure type definitions included in the group of structural type definitions, a second group of steps of combining the first nondeterministic finite state automatons into a second nondeterministic finite state automaton corresponding to the whole of the group of structural type definitions, a third group of steps of converting the second nondeterministic finite state automaton into a deterministic finite state automaton, and a fourth group of steps of determining whether the document to be processed matches at least one of the group of structural type definitions on the basis of the deterministic finite state automaton.
  • Also, the present invention may be realized as a program for realizing the above-described document processing system by using a computer or making a computer execute processes corresponding to the steps in the document processing method. This program may be provided by being distributed for example in a state of being stored in a magnetic disk, an optical disk, a semiconductor memory or any other recording medium or distributed over a network.
  • BRIEF DESCRIPTION OF THE DRAWINGS
  • FIG. 1 is a diagram schematically showing an example of a hardware configuration of a computer suitable for implementation of an XML document determination system in accordance with a first embodiment of the present invention;
  • FIG. 2 is a block diagram for explaining the configuration of the XML document determination system in accordance with the first embodiment;
  • FIG. 3 is a flowchart for explaining the operation of a decision rule generation section in the first embodiment;
  • FIG. 4 is a diagram for explaining the flow of XML document determination processing in the first embodiment;
  • FIG. 5 is a diagram showing an example of DTDs;
  • FIG. 6 is a diagram showing an example of an XML document to be processed;
  • FIG. 7 is a diagram showing another example of the XML document to be processed;
  • FIG. 8 is a diagram showing an index of rules each formed of one element and relating to the DTDs shown in FIG. 5;
  • FIG. 9 is a diagram showing decision rules obtained from the index of FIG. 8;
  • FIG. 10 is a diagram showing an index formed by adding rules each formed of two elements to the index of FIG. 8;
  • FIG. 11 is a diagram showing an index formed by reflecting in FIG. 9 decision rules obtained from the index of FIG. 10;
  • FIG. 12 is a diagram showing a state where the decision rules shown in FIG. 11 are narrowed down;
  • FIG. 13 is a diagram showing a decision rule base formed from the decision rules shown in FIG. 12 and relating to four DTDs D1 to D4;
  • FIG. 14 is a block diagram for explaining a configuration of an XML document determination system in a second embodiment of the present invention;
  • FIG. 15 is a diagram showing an example of DTDs;
  • FIG. 16 is a diagram showing NFAs corresponding to D5, D6, and D7 shown in FIG. 15;
  • FIG. 17 is a diagram showing a sum automaton of the three NFAs shown in FIG. 16;
  • FIG. 18 is a diagram showing an algorithm extended in accordance with the embodiment in a case where a DFA is generated by using a partial construction method;
  • FIG. 19 is a diagram showing a DFA generated by the algorithm shown in FIG. 18 from the NFA shown in FIG. 17;
  • FIG. 20 is a flowchart for explaining DTD determination processing by an XML verification section in the second embodiment;
  • FIG. 21 is a diagram showing NFAs generated with respect to the DTDs shown in FIG. 15;
  • FIG. 22 is a diagram showing a sum automaton of the NFAs shown in FIG. 21;
  • FIG. 23 is a diagram showing an algorithm extended in accordance with an example of modification of the embodiment in a case where a DFA is generated by using a partial construction method;
  • FIG. 24 is a diagram showing a DFA generated from the sum automaton shown in FIG. 22 so that the algorithm shown in FIG. 23 is reflected therein; and
  • FIG. 25 is a flowchart for explaining DTD determination processing by an XML verification section in the modification of the second embodiment.
  • DESCRIPTION OF SYMBOLS
      • 10 . . . decision rule generation section
      • 20 . . . decision rule base storage section
      • 30 . . . DTD storage section
      • 40 . . . XML parser
      • 50 . . . DTD determination section
      • 101 . . . Central processing unit (CPU)
      • 102 . . . M/B (mother board) chip set
      • 103 . . . Main memory
      • 105 . . . Hard disk
      • 1410 . . . DTD storage section
      • 1420 . . . NFA generation section
      • 1430 . . . DFA generation section
      • 1450 . . . XML verification section
    DESCRIPTION OF THE INVENTION
  • The present invention enables processing for ascertaining to which structure type definition a received XML document matches be performed at a high speed. It also provides a system for performing such processing with no influence on existing system configurations and implementation of XML processors.
  • The present invention is realized as a document processing system in which the document processing system has a decision rule generation section for generating a decision rule for determining whether a document described in a structured language such as XML matches at least one of a plurality of structure type definitions (e.g., DTDs) on the basis of unique elements of the structure type definitions, and a determination section for determining whether the document to be processed matches at least one of the structure type definitions on the basis of the decision rule generated by the decision rule generation section.
  • More specifically, the decision rule generation section forms a rule base for identifying the corresponding structure type definition by using the decision rule on condition that a predetermined element occurs, and the determination section identifies the structure type definition to which the document to be processed matches by collating a sequence of events obtained from the document with the rule base.
  • Another embodiment of a document processing system in accordance with the present invention has an input section for inputting an XML document to be processed, an XML parser for analyzing the XML document input by the input section, and a DTD (Document Type Definition) determination section for determining at least one of a group of DTDs to which the XML document matches by determination as to whether or not an element unique to the DTD is included in the XML document on the basis of the result of analysis by the XML parser.
  • Still another document processing system in accordance with the present invention has a nondeterministic finite state automaton generation section for generating a nondeterministic finite state automaton corresponding to a group of structure type definitions (e.g., DTDs) to at least one of which a document described in a structured language such as XML should match, a deterministic finite state automaton generation section by converting the nondeterministic finite state automaton generated by the nondeterministic finite state automaton generation section to a deterministic finite state automaton, and a determination section for determining on the basis of the deterministic finite state automaton generated by the determinative automaton generation section whether the document to be processed matches at least one of the group of structural type definitions.
  • In this document processing system, particular information for identification for portions corresponding to the structure type definitions included in the group of structure type definitions is imparted to the generated automaton. That is, the nondeterministic finite state automaton generation section generates the nondeterministic finite state automaton corresponding to the group of structure type definitions by combining nondeterministic finite state automatons corresponding to the structure type definitions included in the group of structure type definitions, and imparts particular information designating the corresponding structure type definition to the portions corresponding to the structure type definitions in the nondeterministic finite state automaton corresponding to the group of structure type definitions. The deterministic finite state automaton generation section imparts to the generated deterministic finite state automaton the particular information imparted to the nondeterministic finite state automaton after updating the particular information. The determination section traces the determinative finite state automaton on the basis of the document to be processed, and identifies the structure type definition to which the document matches on the basis of the particular information imparted to the traced portion.
  • As the particular information, a bit vector having a number of bits corresponding to the number of structured languages may be used. In such a case, if the bits in the bit vector are respectively related to the structured languages, the bit vector imparted to each of the predetermined portions of the automaton may be referred to recognize the corresponding structured language. This particular information may be imparted to state transitions or states in the nondeterministic finite state automaton and the deterministic finite state automaton.
  • The present invention is also realized as a document processing method for processing a document described in a structured language such as XML by using a computer. In an example embodiment the document processing method includes the step of generating a decision rule for determining whether a document to be processed matches at least one of a plurality of structure type definitions (e.g., DTDs) on the basis of unique elements of the structure type definitions, and determining whether the document to be processed matches at least one of the structure type definitions on the basis of the generated decision rule. More specifically, the step of generating the decision rule includes the step of extracting a sequence of elements constituting each of the structure type definitions, and the step of selecting, as a decision rule, each of the extracted sequence of elements which occurs in only one of the structure type definitions.
  • Another document processing method in accordance with the present invention includes the step of inputting and analyzing the XML document and examining whether or not an element unique to any one of a group of DTDs (Document Type Definitions) to at least one of which the XML document to be processed should match is included in the XML document based on the result of the analysis, and identifying the DTD to which the XML document matches.
  • Still another document processing method in accordance with the present invention includes a first group of steps of reading out from a memory a group of structure type definitions to at least one of which the document should match and generating a first nondeterministic finite state automaton corresponding to each of structure type definitions included in the group of structural type definitions, a second group of steps of combining the first nondeterministic finite state automatons into a second nondeterministic finite state automaton corresponding to the whole of the group of structural type definitions, a third group of steps of converting the second nondeterministic finite state automaton into a deterministic finite state automaton, and a fourth group of steps of determining whether the document to be processed matches at least one of the group of structural type definitions on the basis of the deterministic finite state automaton.
  • Preferably, particular information for identification for portions corresponding to the structure type definitions included in the group of structure type definitions is imparted to the automaton when the automaton is generated. That is, the first group of steps includes a step of imparting, to each of the first nondeterministic finite state automatons, particular information designating the corresponding structure type definition, the second group of steps includes a step of imparting the particular information to the portions corresponding to the structure type definition in the second nondeterministic finite state automatons, the third group of steps includes a step of imparting to the generated deterministic finite state automaton the particular information imparted to the nondeterministic finite state automaton after updating the particular information, and the fourth group of steps includes a step of tracing the determinative finite state automaton on the basis of the document to be processed, and identifying the structure type definition to which the document matches on the basis of the particular information imparted to the traced portion.
  • Also, the present invention may be realized as a program for realizing the above-described document processing system by using a computer or making a computer to execute processings corresponding to the steps in the document processing method. This program may be provided by being distributed in a state of being stored in a magnetic disk, an optical disk, a semiconductor memory or any other recording medium or distributed over a network.
  • The present invention will be described in detail with respect to first and second embodiments thereof with reference to the accompanying drawings. While each embodiment of the present invention is described below with respect to a case where XML document structure type definitions (schema) are DTDs, the same method can also be applied to processing on other structure type definitions.
  • FIRST EMBODIMENT
  • In the first embodiment, a set of DTDs some of which is probable to correspond to an XML document to be handled are scanned in advance to generate a discrimination rule for discrimination of each of the DTDs from the others. Each discrimination rule is used for discrimination of the corresponding DTD when an XML document matches the DTD, thereby enabling the DTD to which the XML document matches be identified with efficiency.
  • FIG. 1 is a diagram schematically showing an example of a hardware configuration of a computer suitable for implementation of an XML document determination system in accordance with the first embodiment of the present invention.
  • The computer shown in FIG. 1 has a central processing unit (CPU) 101, which is a computation means, a main memory 103 connected to the CPU 101 via a mother board (M/B) chip set 102 and a CPU bus, a video card 104 also connected to the CPU 101 via the M/B chip set 102 and an accelerated graphic port (AGP), a hard disk 105 and a network interface 106 each connected to the M/B chip set 102 via a peripheral component interconnect (PCI) bus, and a floppy disk drive 108 and a keyboard/mouse 109 each connected to the M/B chip set 102 via the PCI bus, a bridge circuit 107 and a low-speed bus such as an industry standard architecture (ISA) bus. This computer has a clock oscillator and a controller for controlling the clock oscillator (both not shown) provided as means for controlling the operating performance (operating clock) of the CPU 101 as described below.
  • FIG. 1 only illustrates an example of the hardware configuration of the computer for implementation of this embodiment, and the computer may have any of other various configurations if this embodiment can be applied to it. For example, only a video memory may be provided in place of the video card 104 and image data may be processed by the CPU 101 alone. A sound mechanism for speech input/output may be provided. Also, a compact disc-read only memory (CD-ROM) drive and a digital versatile disc-read only memory (DVD-ROM) drive may be provided by means of an interface such as an AT attachment (ATA).
  • FIG. 2 is a block diagram for explaining the configuration of the XML document determination system in accordance with the first embodiment of the present invention. Referring to FIG. 2, the XML document determination system of the first embodiment has a decision rule generation section 10 which generates, by scanning a set of a plurality of DTDs, a decision rule for determining to which of the DTDs an XML document matches, a decision rule base storage section 20 which generates a rule base (decision rule base) from the set of decision rules generated by the decision rule generation section 10 and stores the rule base, a DTD storage section 30 in which the set of DTDs to some of which an XML document to be handled should match is stored, an XML parser 40 for analyzing an XML document (input document) to be processed, and a DTD determination section 50 which determines to which one of the DTDs an XML document analyzed by the XML parser 40 matches by collating the decision rules in the decision rule base. The XML document determination system also has an input section (not shown) to which XML documents (input documents) to be processed after being analyzed by the XML parser 40 are input via a network or a predetermined input device, and through which the input documents are stored in a main memory 103 or the like.
  • In the system configuration shown in FIG. 2, the decision rule generation section 10, the XML parser 40 and the DTD determination section 50 are software blocks realized by using the program-controlled CPU 101 shown in FIG. 1. A program for realizing these functions by controlling the CPU 101 is provided by being distributed in a state of being stored in a magnetic disk, an optical disk, a semiconductor memory or any other recording medium or distributed over a network, and is stored in the main memory 103. Also, the decision rule base storage section 20 and the DTD storage section 30 are realized in the main memory 103. Data stored in the main memory 103 can be saved to a storage, e.g., the hard disk 150 if necessary.
  • Processing in this embodiment is broadly divided into decision rule generation processing by the decision rule generation section 10 and XML document determination processing performed by using the XML parser 40 and the DTD determination section 50. Therefore the system shown in FIG. 2 may be such that the decision rule generation section 10, the XML parser 40 and the DTD determination section 50 are realized by using one computer, or such that, for example, the decision rule generation section 10 is realized by using one computer and the XML parser 40 and the DTD determination section 50 are realized by using another computer. In the latter case, the decision rule base is delivered from the computer operating as the decision rule generation section 10 to the computer operating as the XML parser 40 and the DTD determination section 50 by means of a network or a recording medium such as a magnetic disk. Also, the decision rule base storage section 20 and DTD storage section 30 are provided in combination with each computer.
  • The functions of the XML document determination system shown in FIG. 2 will now be described in detail. An input to the XML document determination system of this embodiment is an XML document having no DTD information, and an output from the XML document determination system is a DTD to which the input XML document matches. If an XML document matches a plurality of DTDs, the corresponding DTDs are output. Matching of a given XML document to Dn.dtd which is a predetermined DTD indicates that the result of verification of the XML document with Dn.dtd assumed to be designated is “valid”.
  • The method of determining a DTD for an XML document in this embodiment is based on the idea that if an element (sequence) defined as an indispensable element in a predetermined DTD does not occur in other DTDs (that is, the DTD has an element (sequence) specific to it), the DTD to which this XML document matches can be uniquely determined at the stage when it is confirmed that the element occurs in the given XML document. That is, an (indispensable) element or a sequence of elements which exists only in a certain DTD is found from a set of DTDs and a set of rules for determination is constructed, thereby enabling a DTD to which an XML document matches be determined at a high speed. The decision rule generation section 10 first generates decision rules on the basis of the above-described idea.
  • FIG. 3 is a flowchart for explaining the operation of the decision rule generation section 10. The decision rule generation section 10 reads out from the DTD storage section 30 a set of DTDs to some of which an XML document to be handled is probable to match, and sets the read set of DTDs as an object to be processed. Referring to FIG. 3, the decision rule generation section 10 initializes a parameter n which indicates the number of elements (steps 301 and 302), extracts a sequence of elements (referred to as a rule) consisting of n elements (initially n=1), and forms an index for relating the rule and DTD names to each other (steps 303 and 304). The decision rule generation section 10 then extracts an exclusive rule which occurs for only one DTD from the obtained rule formed of the n elements, i.e., a rule in which only one DTD is related in the formed index, and sets the extracted rule as a decision rule for the corresponding DTD (step 305). The decision rule generation section 10 checks whether rules have been set with respect to all the DTDs, returns the process to step 302 if there is a DTD with which no rule has been set (step 306), and repeats the processing from step 303 by incrementing the value of parameter n by one. After setting rules with respect to all the DTDs, the decision rule generation section 10 narrows down the set rules (step 307).
  • To narrow down the rules, redundancy is removed from the set rules and optimal ones among the decision rules are selected. The number of selected decision rules with respect to one DTD is not limited to one. In this embodiment, narrowing down of rules is performed on the following three principles.
      • (1) An XML document is analyzed by being scanned in document order, i.e., from the beginning to the end of the document. Of rules set with respect to a predetermined DTD, some relating to an element which occurs earlier in the DTD are selected while the others relating to an element which occur later in the DTD are removed.
      • (2) In an element type declaration for an XML document, occurrence of a variable of number of elements is permitted (by *, +, ?, etc.). The processing cost in the case of testing as to whether this rule is met is high. Therefore, such a rule is removed if a rule in which the numbers of elements are not variable exists already.
      • (3) In a case where a predetermined rule is part of another rule, one of these rules is necessarily met if the other is met. In such a case, therefore, in order to reduce the processing cost for testing as to whether each rule is met, one of the two rules in which the total length of the constituent elements is shorter than that in the other rule is selected and the other rule is removed.
  • After generating decision rules in the above-described manner, the decision rule generation section 10 combines the generated decision rules into a decision rule base and stores the decision rule base in the decision rule base storage section 20.
  • The decision rule base used in this embodiment is constituted by a rule set formed of if-then rules and a flag set. That is, it is a rule base for identifying a DTD when a corresponding condition which is occurrence of a predetermined element is satisfied. Each rule is in if (test)-then (action) form. In the test portion, a logical expression formed of a test “an element occurs” and an expression in the form of “flag==true/false” is described.
  • Further, in the decision rule base, decision rules are organized as described below.
      • (1) As a decision rule formed of only one element (e.g., an element A), a rule in the form:
        • “if (element A occurs) then Di”
      •  is registered in the decision rule base. In this expression, Di is a symbol indicating a DTD which meets this decision rule.
      • (2) A decision rule having a plurality of elements is made in such a manner that a flag is set with respect to occurrence of an element except for the last element. For example, with respect a sequence of elements B and C, two rules:
        • “if (element B occurs) then flag1=true”, and
        • “if (element C occurs && flag1=true) then Dj”
      •  are made. In this expression, Dj is a symbol indicating a DTD which meets this decision rule.
      • (3) A rule with a symbol for permission of a variable number of elements such as *, +, or ? is registered in a state without the symbol.
  • XML document determination processing performed by the XML parser 40 and the DTD determination section 50 using the above-described decision rule base will next be described.
  • FIG. 4 is a diagram for explaining the flow of XML document determination processing in this embodiment. XML document determination processing includes XML document analysis processing performed by the XML parser 40 and determination processing performed by the DTD determination section 50. It is assumed that at an initial stage an XML document (input document) input via a network or the like to be processed is stored in the main memory 103 shown in FIG. 1 in a state of being accessible by the CPU 101 operating as the XML parser 40 and the DTD determination section 50.
  • Referring to FIG. 4, the XML parser 40 first reads out the XML document to be processed from the main memory 103 and analyzes the XML document. The XML parser 40 scans the XML document from the beginning and extracts occurrences of elements and attributes as events. A sequence of events thereby extracted is delivered to the DTD determination section 50. As the XML parser 40, an SAX parser, for example, may be used. The DTD determination section 50 examines the sequence of events received from the XML parser 40 by using the decision rule base stored in the decision rule base storage section 20. More specifically, in all the flags in the decision rule base, “false” is first set. When an element occurs in the event sequence which is being processed, the test portion of each rule in the decision rule base is checked. If the element passes the test, then an action is executed. If a DTD name is written in the action portion, the DTD name is output and the processing is terminated.
  • After the above-described processing, a validating XML processor verifies the processing-object XML document on the basis of the DTD with the DTD name output from the DTD determination section 50. By this verification, final verification is made as to whether the XML document matches the DTD. XML document verification processing performed by the validating XML processor is the same as verification in the conventional art. However, since DTD to be verified are narrowed by the above-described determination processing performed by the XML parser 40 and the DTD determination section 50, the overall processing cost is remarkably reduced. The validating XML processor may be provided in an application using the XML document or may be provided as a component of the XML document determination system in accordance with the present invention. In the case where it is provided in the system of this embodiment, the output from the system is not the DTD to which an XML document to be processed matches but a verification result as to whether the XML document matches the determined DTD.
  • Processing in accordance with this embodiment will be described with respect to concrete examples of DTDs and XML documents. Four DTDs D1, D2, D3, and D4 shown in FIG. 5 are assumed to have been provided as a set of DTDs to some of which a transferred XML document is possible to match.
  • A case where a DTD to which an XML document ex1.xml shown in FIG. 6 matches is determined will be discussed. In this case, since an element E occurs in the XML document ex1.xml since element E exists only in D2, the XML document ex1.xml is supposed to match to D2 (at least not to match to any of the other DTDs) at the stage when the occurrence of element E is confirmed.
  • A case where a DTD to which an XML document ex2.xml shown in FIG. 7 matches is determined will also be discussed. In this case, none of the elements occurring in this XML document exists as an element existing in only one of the DTDs. However, the content corresponding to occurrence of a sequence of two elements B and D exists only in D3. Therefore the XML document ex2.xml is supposed to match to D3 (at least not to match to any of the other DTDs) at the stage when the occurrence of the sequence of elements B and D is confirmed.
  • To realize the above-described determination, the decision rule generation section 10 first extracts decision rules from the set of four DTDs shown in FIG. 5 and forms a decision rule base. Referring to the flowchart of FIG. 3, element sequences (rules) each consisting of one element are extracted on the basis of element type declarations contained in the DTDs D1, D2, D3, and D4 shown in FIG. 5, and an index shown in FIG. 8 is formed. Rules each occurring with only one DTD (indicated by one DTD name shown alone on the right-hand section of the index) are extracted and set as decision rules for the corresponding DTDs.
  • FIG. 9 shows decision rules obtained from the index shown in FIG. 8. In the decision rules shown in FIG. 9, DTDs (D1, D3) exit with which no rule has been set. The process then returns to step 302 in FIG. 3 and the same processing is repeated with respect to rules each formed of two elements. An index shown in FIG. 10 is thereby formed. Rules each occurring with only one DTD are extracted and set as decision rules for the corresponding DTDs. FIG. 11 is a diagram formed by reflecting in FIG. 9 the decision rules obtained from the index shown in FIG. 10. In the state shown in FIG. 11, rules are set with respect to all the DTDs. Then the rules are narrowed down. According to the decision rules shown in FIG. 11, the decision rules relating to D2, D3, and D4 are narrowed down. Narrowing down of the decision rule relating to D4 will be described in detail by way of example.
  • The decision rule relating to D4, shown in FIG. 11, is Rule—D4={(F), (H), (F, H), (H, G?)}.
  • Among these elements, element H is scanned before element F according to the definition of D4 shown in FIG. 5. Each of these elements is an indispensable element. Therefore, if a given XML document matches D4, element F exists necessarily. Consequently, the rule relating to element H can be removed according to the principle (1). Next, since the rule (F) in which the number of elements is fixed exists with D4, the rule including occurrence of a variable number of elements (H, G?) is removed according to the principle (2). The remaining two rules (F) and (F, H), (F) is part of (F, H). Therefore the rule (F, H) having a longer total length of elements is removed according to the principle (3).
  • The same processing is performed on the decision rules relating to D2 and D3. The decision rules shown in FIG. 11 are narrowed down as shown in FIG. 12. Thereafter, the decision rule generation section 10 forms a decision rule base from the decision rules shown in FIG. 12, and stores the decision rule base in the decision rule base storage section 20. FIG. 13 shows the decision rule base which is formed from the decision rules shown in FIG. 12, and which relates to the four DTDs D1 to D4. The DTD determination section 50 determines the DTD for the XML document by using generated decision rule base.
  • Initially, the XML parser 40 obtains event sequence by analyzing the XML document to be processed, and delivers the event sequence to the DTD determination section 50. The DTD determination section 50 collate the XML document event sequence received from the XML parser 40 with the decision rule base stored in the decision rule base storage section 20 to determine to which one of the DTDs the XML document matches. For example, the XML document shown in FIG. 7 is assumed to have been input as an object of processing. The XML parser 40 analyzes this XML document to extract events:
      • occurrence of <A>,
      • occurrence of <B>, and
      • occurrence of <D>
        and delivers these events to the DTD determination section 50 (events other than the occurrences of the elements are omitted). The DTD determination section 50 tests each event for determination as to whether there is any rule applicable to the event. In this case, by the occurrence of <B>, a rule:
      • If (element B occurs) then flag2=true
      • is triggered and action flag=true is executed.
      • Further, in response to the event: occurrence of element <D>,
      • If (element D occurs)
        • if (flag1==true) then D1
        • if (flag2==true) then D3
          is triggered and D3 is finally selected. In the above-described procedure, since the rules corresponding to element names are used, no rule competition occurs, in contrast with ordinary production systems.
    SECOND EMBODIMENT
  • In the second embodiment, an automaton corresponding to each element type declaration of a DTD to which an XML document to be handled is probable to match is generated. Determination processing using such automatons is performed on DTDs to some of which the XML document is probable to match to enable efficient identification of the DTD to which the XML document matches.
  • This embodiment of the present invention can be realized by using a computer having the same hardware configuration as that of the computer for the first embodiment.
  • FIG. 14 is a block diagram for explaining the configuration of an XML document determination system in accordance with the second embodiment. Referring to FIG. 14, the XML document determination system of this embodiment has a DTD storage section 1410 in which a set of DTDs to some of which an XML document to be handled should match is stored, a nondeterministic finite state automaton (NFA) generation section 1420 which generates an NFA from m number of element type declarations (regarded as regular representations) with respect to one element name on the basis of the set of DTDs, a deterministic finite state automaton (DFA) generation section 1430 which converts the generated NFA into a DFA, an XML parser 1440 for analyzing an XML document (input document) to be processed, and an XML verification section 1450 which determines to which one of the DTDs the XML document analyzed by the XML parser 1440 matches by using the DFA generated by the DFA generation section 1430. The XML document determination system also has an input section (not shown) to which XML documents (input documents) to be processed after being analyzed by the XML parser 1440 are input via a network or a predetermined input device, and through which the input documents are stored in a main memory 103 or the like.
  • In the system configuration shown in FIG. 14, the NFA generation section 1420, the DFA generation section 1430, the XML parser 1440 and the XML verification section 1450 are software blocks realized by the program-controlled CPU 101 shown in FIG. 1. A program for realizing these functions by controlling the CPU 101 is provided by being distributed in a state of being stored in a magnetic disk, an optical disk, a semiconductor memory or any other recording medium or distributed over a network, and is stored in the main memory 103. Also, the DTD storage section 1410 is realized in the main memory 103. Data stored in the main memory 103 can be saved to a storage, e.g., the hard disk 150 if necessary. Also in this embodiment, NFA generation processing performed by the NFA generation section 1420, DFA generation processing performed by the DFA generation section 1430, and DTD determination (verification) processing performed by the XML parser 1440 and the XML verification section 1450 are independent of each other. Therefore the components may be realized by using one computer or a plurality of computers. For example, in a case where the NFA generation section 1420 and the DFA generation section 1430 are realized by using one computer and the XML parser 1440 and the XML verification section 1450 are realized by using another computer, DFAs are delivered from the computer operating as the NFA generation section 1420 and the DFA generation section 1430 to the computer operating as the XML parser 1440 and the XML verification section 1450 via a network or a recording medium such as a magnetic disk. The DTD storage section 1410 is provided in combination with each computer.
  • The functions of the XML document determination system shown in FIG. 14 will be described in detail. An input to the XML document determination system of this embodiment is an XML document having no DTD information, and an output from the XML document determination system is a verification result as to whether the XML document matches the DTD determined in accordance with this embodiment.
  • Three DTDs D5, D6, and D7 shown in FIG. 15 are assumed to have been initially stored in the DTD storage section 1410. In each DTD, an element type declaration is defined with respect to element A, as shown in FIG. 15.
  • The NFA generation section 1420 first generates an NFA corresponding to each of the three DTDs shown in FIG. 15. A well-known method can be used for generation of NFAs in this embodiment. It will not be described in this specification. FIG. 16 is a diagram showing NFAs corresponding to D5, D6, and D7 shown in FIG. 15.
  • The NFA generation section 1420 imparts a bit vector having a length m (m is the number of DTDs), that is, formed by m bits (elements), to a transition rule δ (q, a), a≠ε in each of the generated NFAs, sets the ith (1≦i≦m) bit to a value 1 (turns on the bit) with respect to the ith DTD, and sets the other bits to a value 0 (turns off the bits). For example, in D5 (the first DTD in FIG. 15), a bit vector (1, 0, 0) is imparted to the transition rule δ (q1, B)=q2, which is a rule for transition to state 2 when symbol B is read in state 1.
  • The NFA generation section 1420 combines the generated m NFAs into a sum automaton (A1|A2| |An, Ai is NFA). If the regular representations of the DTDs are R1, R2, Rn, the generated sum automaton is equivalent to (R1|R2| |Rn). With respect to the above-mentioned three DTDs, an NFA ((B, C, D)|(B, C, E)|(G*, B, D)) is generated. That is, the sum automaton can be said to be an NFA corresponding to the set of DTDs stored in the DTD storage section 1410. The sum automaton is formed by generating a new initial state from which a ε transition to the beginning of each NFA is made and a new final state to which a ε transition from the final state of each NFA is made. FIG. 17 is a diagram showing the sum automaton obtained from the three NFAs shown in FIG. 16. Referring to FIG. 17, the bit vectors imparted to the NFAs shown in FIG. 16 are imparted at corresponding position in the sum automaton.
  • The sum automaton (NFA) generated as described above is stored in a predetermined area in the main memory 103. Thereafter, the DFA generation section 1430 reads out from the main memory 103 the sum automaton (NFA) generated by the NFA generation section 1420, and converts the sum automaton into a DFA. For conversion from NFA to DFA, a well-known method, e.g., a partial construction method can be used. However, at the time of conversion from NFA to DFA, a necessary bit vector is computed to be imparted to a transition rule newly generated.
  • FIG. 18 is a diagram showing an algorithm expanded in accordance with this embodiment in a case where a DFA is generated by using the partial construction method. The partial construction method is a method of constructing a DFA by regarding as one state a state set which can be reached from a predetermined state. The portion indicated by being underlined in FIG. 18 corresponds to the extended portion in accordance with this embodiment, i.e., the operation for imparting a bit vector to the state of a generated DFA. In FIG. 18, T is a state set (e.g., {1, 2, 3}); DTran[T, a] is a transition rule for transition from the state (set) T by an input symbol a; Dstates is a stack in which the state set is placed; ε-closure(q) is a set of states of NFA each of which can be reached only by ε-transition from the state of NFA; ε-closure(T) is a set of states of NFA each of which can be reached only by ε-transition from a predetermined state s of NFA contained in T; and move(T, a) is a set of states of NFA to one of which a transition is made by input symbol a from the predetermined state s of NFA contained in T.
  • The algorithm will be will be outlined with reference to the NFA shown in FIG. 17 and to FIG. 18. The NFA shown in FIG. 17 is defined as shown below.
  • State set S={0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} (qi abbreviated as i)
  • Symbol set Σ={B, C, D, E, F, G}
  • Transition rule set={u|u=δ(q, a),}
  • Initial state q0
  • final state {q9}
  • Referring to the algorithm in FIG. 18, states each of which can be reached only by ε-transition from the beginning state q0 are 0, 1, 4, 10, 11, and 13. That is, ε-closure(q0)={0, 1, 4, 10, 11, 13}
  • Therefore {0, 1, 4, 10, 11, 13} is placed in stack Dstatus. This is a new state T.
  • Next, unmarked state T in Dstatus (only {0, 1, 4, 10, 11, 13} exists and this is selected) is marked and processed with respect to each of the symbols which are the elements of Σ.
  • For example, with respect to the symbol B, move(T, B)={2, 5, 14}. This is because when the symbol B is input, a transition from 1 to 2, 4 to 5, or 14 to 15 is made. Further, since
      • ε-closure(move(T, B))=ε-closure({2, 5, 14})={2, 5, 14} (ε transition from each state is not made), U: ={2, 5, 14}
      • and
      • DTran[{1, 4, 10, 11, 13}, B]={2, 5, 14}
      • Then, if {1, 4, 10, 11, 13} is state Q0 and {2, 5, 14} is a state Q1, a new transition rule:
      • DTran[Q0, B]=Q1
        is generated.
  • In this embodiment, when this new transition rule is generated, bit vectors for the new transition rule are generated and imparted to the states of U to each of which a transition is made by input of symbol B. The bit vector of this new transition rule is the logical sum of the bit vectors imparted to the rules for transitions to the states of U. That is, since U={2, 5, 14}, the logical sum (OR) of the bit vectors imparted to the three transition rules:
      • δ (1, B)=2
      • δ (4, B)=5
      • δ (13, B)=14
        is taken. Since the respective bit vectors are (1, 0, 0), (0, 1, 0), and (0, 0, 1), the bit vector of the new transition rule DTran[Q0, B]=Q1 is (1, 1, 1).
  • Thus, the transition rule relating to the DFA with the bit vector is obtained by processing with respect to symbol B. That is,
      • DTran[Q0, B]=Q1, (1, 1, 1)
  • Next, processing with respect to symbol C is performed. However, move(T, B) cannot be defined in this case and this step is therefore skipped. Processing is performed in the same manner with respect to each of symbols D and E. With respect to symbol G,
      • move(T, G)={12}
        and
      • ε-closure({12})={11, 12, 13}
  • The corresponding bit vector is (0, 0, 1). If {11, 12, 13} is a new state Q2,
      • DTran[Q0, G]=Q2, (0, 0, 1)
  • The same processing is repeated to obtain a DFA with a bit vector. FIG. 19 is a diagram showing a DFA generated from the NFA shown in FIG. 17 on the basis of the algorithm shown in FIG. 18.
  • On the other hand, the XML parser 1440 reads out the XML document to be processed from the main memory 103 and analyzes the XML document. The XML parser 1440 scans the XML document from the beginning and extracts occurrences of elements and attributes as events. A sequence of events thereby extracted is delivered to the XML verification section 1450.
  • The XML verification section 1450 determines to which of the DTDs the XML document to be processed matches by using the DFA obtained as described above. Therefore the XML verification section 1450 corresponds to the DTD determination section 50 in the first embodiment. In this embodiment, however, since determination is made by using a DFA generated from DTDs, matching of the XML document to some of the DTDs can be ensured if the processing proceeds to the final state of DFA. That is, verification of the XML document with respect to the DTDs is simultaneously performed.
  • FIG. 20 is a flowchart for explaining DTD determination processing performed by the XML verification section 1450. Referring to FIG. 20, the XML verification section 1450 first sets a state s as initial state Q0 (step 2001) and performs a sequence of processing operations from initial state Q0 (step 2002).
  • If a transition rule (δ (s, E)=s′) when a predetermined element (assumed to be element E) is input exists, a transition from the state s to the state s is made (steps 2003 and 2004). If no such transition rule exists, it is determined that no match can occur to any one of the DTDs and the processing is terminated.
  • Next, if only one of the bits of the bit vector imparted to the transition rule is 1, the DTD corresponding to the bit position at which 1 is set is selected as a matching DTD (steps 2005 and 2006). The state s1 is then set as the state s and the process returns to step 2002 (step 2007). If the state s is the final state, the process is terminated (step 2002). For example, determination as to whether the state s is the final state is made by setting a flag for identifying each state as the final or non-final state.
  • For example, in a case where the input XML document is the XML document shown in FIG. 7, the occurrences of the elements are input in the order of elements A, B, and D and the processing is repeated in accordance with the above-described procedure. According to the DFA shown in FIG. 19, state transitions 0→1→7 are made to reach the final state.
  • DTD determination processing using a DFA may be stopped when a DTD to which an XML document should match is uniquely determined. For example, when a transition from state 0 to state 5 in the DFA shown in FIG. 19 occurs, the DTD to which the XML document should match is limited to D7 shown in FIG. 15. The processing may be stopped at this stage. In this case, the XML document determination system of this embodiment outputs the kind of DTD determined in the same manner as in the first embodiment and delivers the kind of DTD to the application for processing the XML document.
  • In this case, if an element other than elements G and B is input after state 5, or if an element other than element D is input after a transition to state 6 has been made by input of element B, a mismatch to D7 results. Therefore there is a need to verify matching of the XML document to D7, for example, through the application for processing the XML document. If the XML verification section 1450 performs DTD determination processing until the final state of the DFA is reached, it is ensured that the XML document to be processed is valid with respect to the matching DTD when the matching DTD is determined. In this case, there is no need for verification through the application or the like.
  • Modification of Second Embodiment
  • The above-described second embodiment of the present invention is implemented in a complicated manner since bit vectors are imparted to the state transitions in the NFA and DFA, so that the actual processing by a computer is liable to be lower in speed. Then a method of imparting bit vectors not to state transitions but to states is taken into consideration.
  • This method reduces the amount of hardware resources required for processing because the number of states is smaller than the number of state transitions in the NFA and DFA. A system in which bit vectors are imparted to states can be easily implemented since it has an affinity to an ordinary method for realizing an automaton in a computer.
  • In this example of modification, the NFA generation section 1420 of this embodiment generates NFAs respectively corresponding to DTDs stored in the DTD storage section 1410, imparts a bit vector having a length m (m: the number of DTDs) to each state, and also imparts to each state a termination-possible flag for discrimination between the final and non-final states. FIG. 21 is a diagram showing NFAs generated in this manner with respect to the three DTDs (D5, D6, D7) shown in FIG. 15. In the example shown in the figure, the final state corresponds to “1” of the termination-possible flag.
  • Subsequently, the NFA generation section 1420 generates a sum automaton of the generated NFAs. This sum automaton has a new initial state with a ε transition to the beginning of each of the NFAs generated in correspondence with the DTDs, as does the sum automaton shown in FIG. 17. In this sum automaton, however, the final states are not combined into one by using ε transition. FIG. 22 is a diagram showing the sum automaton of the three NFAs shown in FIG. 21. As shown in FIG. 22, the three final states corresponding to the NFAs shown in FIG. 21 exist.
  • Subsequently, the DFA generation section 1430 converts the sum automaton generated by the NFA generation section 1420 into a DFA.
  • First, two operations ε-closureWB(q) and ε-closureWB(T) are defined.
  • Expression ε-closureWB(q) (q represents a predetermined state in each NFA) represents information formed of three elements:
      • state set ε-closure(q)
      • the logical sum of the bit vectors imparted to the states of ε-closure(q)
      • the logical sum of the termination-possible flags imparted to the states of ε-closure(q).
  • Expression ε-closureWB(T) (T is a state set) represents the result of obtaining ε-closureWB(q) with respect to each state q in T and obtaining the sum of the elements obtained from ε-closureWB(q).
  • FIG. 23 is a diagram showing an extended algorithm in which the above-described operations are reflected in a case where a DFA is generated by using a partial construction method.
  • FIG. 24 is a diagram showing a DFA generated from the sum automaton shown in FIG. 22. The XML verification section 1450 determines to which one of the DTDs the XML document to be processed matches by using the DFA obtained as described above.
  • FIG. 25 is a flowchart for explaining DTD determination processing performed by the XML verification section 1450. Referring to FIG. 25, the XML verification section 1450 first sets a state s as initial state Q0 (step 2501) and performs a sequence of processing operations from initial state Q0 (step 2502). If only one of the bits of the bit vector imparted to the state s presently observed is 1, the DTD corresponding to the bit position at which 1 is set is selected as a matching DTD (steps 2503 and 2504).
  • Next, if a transition rule (δ (s, E)=s′) when a predetermined element (assumed to be element E) is input exists, a transition from the state s to the state s′ is made (steps 2505 and 2506). If no such transition rule exists, it is determined that no match can occur to any one of the DTDs and the processing is terminated.
  • After the transition from the state s to the state s′, the state s′ is then set as the state s and the process returns to step 2502 (step 2507). If the state s is the final state, the DTD corresponding to the bit position at which 1 is set in the bit vector imparted to the state s is selected as a matching DTD and the process is terminated (steps 2502, 2508).
  • If the number of DTDs is m, the time taken to form the index in the first embodiment is about O(m*k). O(m*k) means that the computation can be completed within a time period which is a constant multiple of m*k. Also, k represents the number of times the processing shown in the flowchart of FIG. 3 is repeated for extraction of rules formed of one element and extraction of rules formed of two elements, for example. If the number of specific elements existing in each DTD is larger, the amount of processing for forming the index is smaller and the time required for processing is shorter. The time required for making decision rules from the index is about O(n).
  • In the second embodiment, a larger amount of processing is required to form NFAs and a DFA. In general, to form an NFA, a time O(|r|) proportional to the length of regular representation r is required. For example, if the average length of the regular representations of DTDs is 1, the time required to generate NFAs is about O(n*1). It is thought that the value of 1 is larger than the value of k in ordinary cases. Therefore the first embodiment has a higher efficiency at a preparatory stage (when performing processing for generating decision rules or a DFA) before determination of a DTD to which an XML document should match.
  • In the second embodiment, at the stage when a DTD to which an XML document should match is actually determined, a state transition table (DFA) is stored in a memory. Therefore the cost for the memory space used in the second embodiment is higher than that in the first embodiment.
  • In the first embodiment, however, determination is only made as to the probability of an XML document to be processed matching to a predetermined DTD, and it is not certain whether the XML document truly matches the determined DTD before verification using a validating XML processor or the like is actually performed. In contrast, in the second embodiment, it can be ensured that the XML document to be processed matches the determined DTD when the final state of the DFA is reached. When implementating the present invention in an actual computer, the desired method may be selected by considering these advantages and disadvantages.
  • The above-described processing in each of the embodiments is performed before execution of processing on an XML document by an application. Therefore the invention can be realized by adding the components of one of the embodiments to any of the existing systems without requiring any change in the configuration of the system or the XML processor.
  • In each of the above-described embodiments, the occurrence and sequence of the elements are used for criteria for determination. However, the above-described determination method may also be applied to processing using attribute definitions. However, no meaning is attached to the order of attributes, and the occurrences of attributes and fixed attribute values may form decision rules.
  • While the embodiments of the invention have been described with respect to a case where matching between predetermined DTDs and a predetermined XML document is examined to identify some of the DTDs to which the XML document matches, the present invention can, of course, be applied to a process for determining whether a predetermined document in a structured language (e.g., HTML) other than XML matches a predetermined structure type definition.
  • Thus, according to the present invention, as described above, in a case where there is a need to identify a structure type definition to which a received XML document matches while a certain set of structure type definitions is given, processing for identifying the structure type definition can be performed at a high speed. Also, according to the present invention, a system for performing such processing can be realized without influencing the existing system configurations and implementation of XML processors.
  • Variations described for the present invention can be realized in any combination desirable for each particular application. Thus particular limitations, and/or embodiment enhancements described herein, which may have particular advantages to the particular application need not be used for all applications. Also, not all limitations need be implemented in methods, systems and/or apparatus including one or more concepts of the present invention.
  • The present invention can be realized in hardware, software, or a combination of hardware and software. A visualization tool according to the present invention can be realized in a centralized fashion in one computer system, or in a distributed fashion where different elements are spread across several interconnected computer systems. Any kind of computer system—or other apparatus adapted for carrying out the methods and/or functions described herein—is suitable. A typical combination of hardware and software could be a general purpose computer system with a computer program that, when being loaded and executed, controls the computer system such that it carries out the methods described herein. The present invention can also be embedded in a computer program product, which comprises all the features enabling the implementation of the methods described herein, and which—when loaded in a computer system—is able to carry out these methods.
  • Computer program means or computer program in the present context include any expression, in any language, code or notation, of a set of instructions intended to cause a system having an information processing capability to perform a particular function either directly or after conversion to another language, code or notation, and/or reproduction in a different material form.
  • Thus the invention includes an article of manufacture which comprises a computer usable medium having computer readable program code means embodied therein for causing a function described above. The computer readable program code means in the article of manufacture comprises computer readable program code means for causing a computer to effect the steps of a method of this invention. Similarly, the present invention may be implemented as a computer program product comprising a computer usable medium having computer readable program code means embodied therein for causing a function described above. The computer readable program code means in the computer program product comprising computer readable program code means for causing a computer to effect one or more functions of this invention. Furthermore, the present invention may be implemented as a program storage device readable by machine, tangibly embodying a program of instructions executable by the machine to perform method steps for causing one or more functions of this invention.
  • It is noted that the foregoing has outlined some of the more pertinent objects and embodiments of the present invention. This invention may be used for many applications. Thus, although the description is made for particular arrangements and methods, the intent and concept of the invention is suitable and applicable to other arrangements and applications. It will be clear to those skilled in the art that modifications to the disclosed embodiments can be effected without departing from the spirit and scope of the invention. The described embodiments ought to be construed to be merely illustrative of some of the more prominent features and applications of the invention. Other beneficial results can be realized by applying the disclosed invention in a different manner or modifying the invention in ways known to those familiar with the art.

Claims (20)

1-2. (canceled)
3. A document processing system comprising:
an input section for inputting an XML document to be processed;
an XML parser for analyzing the XML document input by said input section; and
a DTD (Document Type Definition) determination section for determining at least one of a group of DTDs to which the XML document matches by determination as to whether or not an element unique to said one of the DTDs is included in the XML document on the basis of the result of said analysis by said XML parser.
4. A document processing system comprising:
a nondeterministic finite state automaton generation section for generating a nondeterministic finite state automaton corresponding to a group of structure type definitions to at least one of which a document described in a structured language should match;
a deterministic finite state automaton generation section for converting the nondeterministic finite state automaton generated by said nondeterministic finite state automaton generation section to a deterministic finite state automaton; and
a determination section for determining on the basis of the deterministic finite state automaton generated by said determinative automaton generation section whether the document to be processed matches at least one of the group of structural type definitions.
5. The document processing system according to claim 4, wherein said nondeterministic finite state automaton generation section generates the nondeterministic finite state automaton corresponding to the group of structure type definitions by combining nondeterministic finite state automatons corresponding to the structure type definitions included in the group of structure type definitions, and imparts particular information designating the corresponding structure type definition to the portions corresponding to the structure type definitions in the nondeterministic finite state automaton corresponding to the group of structure type definitions;
wherein said deterministic finite state automaton generation section imparts to the generated deterministic finite state automaton the particular information imparted to the nondeterministic finite state automaton after updating the particular information; and
wherein said determination section traces the determinative finite state automaton on the basis of the document to be processed, and identifies the structure type definition the document matches on the basis of the particular information imparted to the traced portion.
6. The document processing system according to claim 5, wherein the particular information is imparted to state transitions in the nondeterministic finite state automaton and the deterministic finite state automaton.
7. The document processing system according to claim 5, wherein the particular information is imparted to states in the nondeterministic finite state automaton and the deterministic finite state automaton.
8-9. (canceled)
10. A document processing method for processing an XML document using a computer, said method comprising the steps of:
inputting and analyzing the XML document;
storing a result of said analysis in a memory;
reading out the result of analysis from the memory; and
examining whether or not an element unique to any one of a group of DTDs (Document Type Definition) to at least one of which the XML document should match is included in the XML document on the basis of the result of said analysis, and identifying the DTD to which the XML document matches.
11. A method for processing a document described in a structured language using a computer, said method comprising:
a first group of steps of reading out from a memory a group of structure type definitions to at least one of which the document should match, generating a first nondeterministic finite state automaton corresponding to each of structure type definitions included in the group of structural type definitions, and storing the first nondeterministic finite state automaton in the memory;
a second group of steps of reading out the first nondeterministic finite state automatons from the memory, combining the first nondeterministic finite state automatons into a second nondeterministic finite state automaton corresponding to the whole of the group of structural type definitions, and storing the second nondeterministic finite state automaton in the memory;
a third group of steps of reading out the second nondeterministic finite state automaton from the memory, converting the second nondeterministic finite state automaton into a deterministic finite state automaton, and storing the deterministic finite state automaton in the memory; and
a fourth group of steps of reading out the deterministic finite state automaton from the memory, and determining whether the document to be processed matches at least one of the group of structural type definitions on the basis of the deterministic finite state automaton.
12. The document processing method according to claim 11, wherein said first group of steps includes a step of imparting, to each of the first nondeterministic finite state automatons, particular information designating the corresponding structure type definition; said second group of steps includes a step of imparting the particular information to the portions corresponding to the structure type definition in the second nondeterministic finite state automatons; and said third group of steps includes a step of imparting to the generated deterministic finite state automaton the particular information imparted to the nondeterministic finite state automaton after updating the particular information; and said fourth group of steps includes a step of tracing the determinative finite state automaton on the basis of the document to be processed, and identifying the structure type definition to which the document matches on the basis of the particular information imparted to the traced portion.
13. (canceled)
14. A computer program product comprising a computer usable medium having computer readable program code means embodied therein for causing document processing, the computer readable program code means in said computer program product comprising computer readable program code means for causing a computer to effect the functions of claim 3.
15. A computer program product comprising a computer usable medium having computer readable program code means embodied therein for causing document processing, the computer readable program code means in said computer program product comprising computer readable program code means for causing a computer to effect the functions of claim 4.
16. (canceled)
17. An article of manufacture comprising a computer usable medium having computer readable program code means embodied therein for causing XML document processing, the computer readable program code means in said article of manufacture comprising computer readable program code means for causing a computer to effect the steps of claim 10.
18. An article of manufacture comprising a computer usable medium having computer readable program code means embodied therein for causing document processing, the computer readable program code means in said article of manufacture comprising computer readable program code means for causing a computer to effect the steps of claim 11.
19. (canceled)
20. A program storage device readable by machine, tangibly embodying a program of instructions executable by the machine to perform method steps for document processing, said method steps comprising the steps of claim 10.
21. A program storage device readable by machine, tangibly embodying a program of instructions executable by the machine to perform method steps for document processing, said method steps comprising the steps of claim 11.
22-25. (canceled)
US11/841,621 2002-02-21 2007-08-20 Document Processing System, Method And Program Abandoned US20080082570A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2002-045087 2002-02-21
JP2002045087A JP3888621B2 (en) 2002-02-21 2002-02-21 Document processing system, document processing method and program

Publications (1)

Publication Number Publication Date
US20080082570A1 true US20080082570A1 (en) 2008-04-03

Family

ID=28659203

Family Applications (2)

Application Number Title Priority Date Filing Date
US10/370,196 Expired - Lifetime US7275208B2 (en) 2002-02-21 2003-02-20 XML document processing for ascertaining match of a structure type definition
US11/841,621 Abandoned US20080082570A1 (en) 2002-02-21 2007-08-20 Document Processing System, Method And Program

Family Applications Before (1)

Application Number Title Priority Date Filing Date
US10/370,196 Expired - Lifetime US7275208B2 (en) 2002-02-21 2003-02-20 XML document processing for ascertaining match of a structure type definition

Country Status (2)

Country Link
US (2) US7275208B2 (en)
JP (1) JP3888621B2 (en)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3888621B2 (en) * 2002-02-21 2007-03-07 インターナショナル・ビジネス・マシーンズ・コーポレーション Document processing system, document processing method and program
US7305391B2 (en) * 2003-02-07 2007-12-04 Safenet, Inc. System and method for determining the start of a match of a regular expression
US7627817B2 (en) 2003-02-21 2009-12-01 Motionpoint Corporation Analyzing web site for translation
JP3982623B2 (en) * 2003-03-25 2007-09-26 インターナショナル・ビジネス・マシーンズ・コーポレーション Information processing apparatus, database search system, and program
US7380205B2 (en) * 2003-10-28 2008-05-27 Sap Ag Maintenance of XML documents
US20050223316A1 (en) * 2004-04-01 2005-10-06 Sun Microsystems, Inc. Compiled document type definition verifier
US20060174114A1 (en) * 2005-01-24 2006-08-03 Rosbury Steven L Method for exchanging contract information between negotiating parties
US20070005593A1 (en) * 2005-06-30 2007-01-04 Microsoft Corporation Attribute-based data retrieval and association
US7596745B2 (en) * 2005-11-14 2009-09-29 Sun Microsystems, Inc. Programmable hardware finite state machine for facilitating tokenization of an XML document
US8181220B2 (en) * 2005-12-19 2012-05-15 Adobe Systems Incorporated Method and apparatus for digital rights management policies
JP4236055B2 (en) * 2005-12-27 2009-03-11 インターナショナル・ビジネス・マシーンズ・コーポレーション Structured document processing apparatus, method, and program
US8516362B2 (en) * 2010-09-14 2013-08-20 Usablenet Inc. Methods for extending a document transformation server to process multiple documents from multiple sites and devices thereof
WO2014010068A1 (en) * 2012-07-12 2014-01-16 富士通株式会社 Program, document conversion device, and document coversion method
US9691034B2 (en) * 2013-05-14 2017-06-27 The Trustees Of Princeton University Machine-learning accelerator (MLA) integrated circuit for extracting features from signals and performing inference computations
US10229104B2 (en) * 2013-08-01 2019-03-12 Sonicwall Inc. Efficient DFA generation for non-matching characters and character classes in regular expressions
US11475212B2 (en) * 2017-04-06 2022-10-18 Otsuka Pharmaceutical Development & Commercialization, Inc. Systems and methods for generating and modifying documents describing scientific research
US11782983B1 (en) * 2020-11-27 2023-10-10 Amazon Technologies, Inc. Expanded character encoding to enhance regular expression filter capabilities

Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6006242A (en) * 1996-04-05 1999-12-21 Bankers Systems, Inc. Apparatus and method for dynamically creating a document
US6014680A (en) * 1995-08-31 2000-01-11 Hitachi, Ltd. Method and apparatus for generating structured document
US6021202A (en) * 1996-12-20 2000-02-01 Financial Services Technology Consortium Method and system for processing electronic documents
US6108676A (en) * 1996-10-28 2000-08-22 Fuji Xerox Co., Ltd. Document processing apparatus, document type determining method, and hierarchical regular expression determining method
US20010014899A1 (en) * 2000-02-04 2001-08-16 Yasuyuki Fujikawa Structural documentation system
US20010020238A1 (en) * 2000-02-04 2001-09-06 Hiroshi Tsuda Document searching apparatus, method thereof, and record medium thereof
US6330574B1 (en) * 1997-08-05 2001-12-11 Fujitsu Limited Compression/decompression of tags in markup documents by creating a tag code/decode table based on the encoding of tags in a DTD included in the documents
US20020143818A1 (en) * 2001-03-30 2002-10-03 Roberts Elizabeth A. System for generating a structured document
US20020147747A1 (en) * 1999-06-14 2002-10-10 Zaharkin Michael S. System for converting data to a markup language
US20030050931A1 (en) * 2001-08-28 2003-03-13 Gregory Harman System, method and computer program product for page rendering utilizing transcoding
US20030074636A1 (en) * 2001-10-15 2003-04-17 Ensoftek, Inc. Enabling easy generation of XML documents from XML specifications
US6569207B1 (en) * 1998-10-05 2003-05-27 International Business Machines Corporation Converting schemas to component models
US6606620B1 (en) * 2000-07-24 2003-08-12 International Business Machines Corporation Method and system for classifying semi-structured documents
US6718333B1 (en) * 1998-07-15 2004-04-06 Nec Corporation Structured document classification device, structured document search system, and computer-readable memory causing a computer to function as the same
US20040205656A1 (en) * 2002-01-30 2004-10-14 Benefitnation Document rules data structure and method of document publication therefrom
US6950984B2 (en) * 2000-02-23 2005-09-27 International Business Machines Corp Method, system for, and program product for generating a display rule for a structured document, and for changing a structured document and its document type definition
US6963920B1 (en) * 1993-11-19 2005-11-08 Rose Blush Software Llc Intellectual asset protocol for defining data exchange rules and formats for universal intellectual asset documents, and systems, methods, and computer program products related to same
US7028223B1 (en) * 2001-08-13 2006-04-11 Parasoft Corporation System and method for testing of web services
US20070101248A2 (en) * 1996-05-17 2007-05-03 Sbc Properties, L.P. Structured document browser
US7275208B2 (en) * 2002-02-21 2007-09-25 International Business Machines Corporation XML document processing for ascertaining match of a structure type definition

Patent Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6963920B1 (en) * 1993-11-19 2005-11-08 Rose Blush Software Llc Intellectual asset protocol for defining data exchange rules and formats for universal intellectual asset documents, and systems, methods, and computer program products related to same
US6014680A (en) * 1995-08-31 2000-01-11 Hitachi, Ltd. Method and apparatus for generating structured document
US6006242A (en) * 1996-04-05 1999-12-21 Bankers Systems, Inc. Apparatus and method for dynamically creating a document
US20070101248A2 (en) * 1996-05-17 2007-05-03 Sbc Properties, L.P. Structured document browser
US6108676A (en) * 1996-10-28 2000-08-22 Fuji Xerox Co., Ltd. Document processing apparatus, document type determining method, and hierarchical regular expression determining method
US6021202A (en) * 1996-12-20 2000-02-01 Financial Services Technology Consortium Method and system for processing electronic documents
US6330574B1 (en) * 1997-08-05 2001-12-11 Fujitsu Limited Compression/decompression of tags in markup documents by creating a tag code/decode table based on the encoding of tags in a DTD included in the documents
US6718333B1 (en) * 1998-07-15 2004-04-06 Nec Corporation Structured document classification device, structured document search system, and computer-readable memory causing a computer to function as the same
US6569207B1 (en) * 1998-10-05 2003-05-27 International Business Machines Corporation Converting schemas to component models
US20020147747A1 (en) * 1999-06-14 2002-10-10 Zaharkin Michael S. System for converting data to a markup language
US20010014899A1 (en) * 2000-02-04 2001-08-16 Yasuyuki Fujikawa Structural documentation system
US20010020238A1 (en) * 2000-02-04 2001-09-06 Hiroshi Tsuda Document searching apparatus, method thereof, and record medium thereof
US6950984B2 (en) * 2000-02-23 2005-09-27 International Business Machines Corp Method, system for, and program product for generating a display rule for a structured document, and for changing a structured document and its document type definition
US6606620B1 (en) * 2000-07-24 2003-08-12 International Business Machines Corporation Method and system for classifying semi-structured documents
US20020143818A1 (en) * 2001-03-30 2002-10-03 Roberts Elizabeth A. System for generating a structured document
US7028223B1 (en) * 2001-08-13 2006-04-11 Parasoft Corporation System and method for testing of web services
US20030050931A1 (en) * 2001-08-28 2003-03-13 Gregory Harman System, method and computer program product for page rendering utilizing transcoding
US20030074636A1 (en) * 2001-10-15 2003-04-17 Ensoftek, Inc. Enabling easy generation of XML documents from XML specifications
US20040205656A1 (en) * 2002-01-30 2004-10-14 Benefitnation Document rules data structure and method of document publication therefrom
US7275208B2 (en) * 2002-02-21 2007-09-25 International Business Machines Corporation XML document processing for ascertaining match of a structure type definition

Also Published As

Publication number Publication date
JP3888621B2 (en) 2007-03-07
US7275208B2 (en) 2007-09-25
US20030229852A1 (en) 2003-12-11
JP2003256264A (en) 2003-09-10

Similar Documents

Publication Publication Date Title
US20080082570A1 (en) Document Processing System, Method And Program
US8140577B2 (en) Processing XML node sets
US8010844B2 (en) File mutation method and system using file section information and mutation rules
US7508985B2 (en) Pattern-matching system
US7055093B2 (en) Generating automata for validating XML documents, and validating XML documents
JP4656868B2 (en) Structured document creation device
US7596748B2 (en) Method for validating a document conforming to a first schema with respect to a second schema
US8181105B2 (en) Apparatus, method, and program that performs syntax parsing on a structured document in the form of electronic data
US6859810B2 (en) Declarative specification and engine for non-isomorphic data mapping
US7457799B2 (en) Apparatus and method for searching data of structured document
JP2005025763A (en) Division program, division device and division method for structured document
US20070266378A1 (en) Source code generation method, apparatus, and program
JP2002108850A (en) Device for transforming structured document having hierarchical structure
US7822788B2 (en) Method, apparatus, and computer program product for searching structured document
US8849726B2 (en) Information processing apparatus and control method for the same
JP2012513046A (en) Modular forest automaton
CN116209997A (en) System and method for classifying software vulnerabilities
JP2006323821A (en) Method and system for sequentially accessing compiled schema
US20110238633A1 (en) Electronic file comparator
US8489537B2 (en) Segmenting sequential data with a finite state machine
US20040168064A1 (en) System of generating procedure for digital signature and encryption to XML
JPH04233065A (en) Method and apparatus for interpreting and organizing timing specification data
US20080092037A1 (en) Validation of XML content in a streaming fashion
CN112230895A (en) EL expression analysis method, device, equipment and storage medium
JP3239845B2 (en) Full-text search apparatus and method

Legal Events

Date Code Title Description
STCB Information on status: application discontinuation

Free format text: ABANDONED -- FAILURE TO RESPOND TO AN OFFICE ACTION