CN107479910B - Document repairing method, system, readable storage medium and computer equipment - Google Patents
Document repairing method, system, readable storage medium and computer equipment Download PDFInfo
- Publication number
- CN107479910B CN107479910B CN201710549395.4A CN201710549395A CN107479910B CN 107479910 B CN107479910 B CN 107479910B CN 201710549395 A CN201710549395 A CN 201710549395A CN 107479910 B CN107479910 B CN 107479910B
- Authority
- CN
- China
- Prior art keywords
- document
- name
- xsd
- information
- reference information
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 230000008676 import Effects 0.000 claims abstract description 90
- 230000008439 repair process Effects 0.000 claims abstract description 9
- 238000013507 mapping Methods 0.000 claims description 17
- 230000008569 process Effects 0.000 claims description 9
- 238000004590 computer program Methods 0.000 claims description 6
- 230000004048 modification Effects 0.000 claims description 5
- 238000012986 modification Methods 0.000 claims description 5
- 238000012545 processing Methods 0.000 claims description 4
- 230000006870 function Effects 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/80—Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
- G06F16/81—Indexing, e.g. XML tags; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Document Processing Apparatus (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a method, a system, a readable storage medium and computer equipment for repairing a document, wherein the method comprises the following steps: judging whether all XSD documents in the currently selected file directory contain wrong reference information or not; if yes, searching a corresponding introduced XSD document according to the related citation information related to the wrong citation information; and modifying the reference information of the error to be consistent with the corresponding information introduced into the XSD document. The document repairing method can repair the error import information in the XSD file.
Description
Technical Field
The present invention relates to the field of data exchange technologies, and in particular, to a method and a system for repairing a document, a readable storage medium, and a computer device.
Background
Data sharing is continuously advocated in the current society, and business systems used in various industries are not uniform, so that the forms of data are different, the development of data sharing is limited, and data exchange is initiated. An Extensible Markup Language (XML) structure is a common document structure in the field of data exchange, and currently, general data exchange is basically based on XML structure documents, and an Extensible Markup Language (XSD) is used as a description document for describing an XML structure and is used as a specification of exchange, so that data of software developers can meet the specification of the industry, and a purpose of data sharing is achieved.
The use of import in the XSD file allows data (such as type name) in other XSD files to be imported for reference, however, during the import process, the imported data information may be wrongly written (the imported data information itself needs to be present and correct), for example, the name of the imported file is wrongly written during the import process, which causes an error in the subsequent loading process (such as automatically generating code or verifying XML validity according to XSD) of the XSD file after the information is imported.
In the prior art, when the above situations are met, no good solution exists, and usually, data error processing can be performed or each piece of import information can be imported again, which causes great inconvenience.
Disclosure of Invention
Based on the above, the invention aims to provide a document repairing method, a document repairing system, a readable storage medium and a computer device, so as to repair wrong import information in an XSD file.
The document repairing method according to the embodiment of the invention comprises the following steps:
judging whether all XSD documents in the currently selected file directory contain wrong reference information or not;
if yes, searching a corresponding introduced XSD document according to the related citation information related to the wrong citation information;
and modifying the reference information of the error to be consistent with the corresponding information introduced into the XSD document.
In addition, the document repairing method according to the above embodiment of the present invention may further have the following additional technical features:
further, the reference information of the error includes an incoming document name of the error, and the step of judging whether all the XSD documents in the currently selected file directory contain the reference information of the error includes:
traversing all the XSD documents to extract an introduced document name of each XSD document;
and judging whether the wrong imported document name exists or not, wherein the wrong imported document name is the imported document name without the corresponding document.
Further, in the step of traversing all the XSD documents, definition information of each XSD document is further extracted, and the associated reference information associated with each introduced document name is also extracted, where the definition information includes a name, a default name space, and a definition type name, the associated reference information includes an introduced name space and an introduced type name, and the step of searching for the corresponding introduced XSD document according to the associated reference information related to the incorrect reference information includes:
matching the import namespace associated with each wrong import document name with all the default namespaces in sequence to obtain a target default namespace consistent with the currently matched target import namespace;
judging whether the target definition type name corresponding to the target default name space comprises a target import type name corresponding to the target import name space;
and if so, taking the target XSD document corresponding to the target definition type name comprising the target introduction type name as the introduced XSD document corresponding to the target introduction type name.
Further, the step of modifying the reference information of the error to be consistent with the corresponding information introduced into the XSD document comprises:
modifying the incoming document name of the error and the named name of the corresponding incoming XSD document to be consistent.
Further, after the step of traversing all the XSD documents, the method further comprises:
establishing a definition information mapping table for the named name, the definition type name and the default name space of each XSD document;
and establishing an import information mapping table by using the import document name of each XSD document, the corresponding associated import name space and the corresponding import type name.
A document restoration system according to an embodiment of the present invention includes:
the reference information judging module is used for judging whether all XSD documents in the currently selected file directory contain wrong reference information or not;
the related information searching module is used for searching a corresponding introduced XSD document according to related reference information related to the wrong reference information when the XSD document is judged to contain the wrong reference information;
and the information modification module is used for modifying the reference information of the error to be consistent with the corresponding information introduced into the XSD document.
In addition, the document repairing system according to the above embodiment of the present invention may further have the following additional technical features:
further, the reference information of the error includes an incoming document name of the error, and the reference information judgment module includes:
the traversal unit is used for traversing all the XSD documents to extract the introduced document name of each XSD document;
a first judgment unit operable to judge whether there is the wrong incoming document name, which is the incoming document name for which the corresponding document does not exist.
Further, in the process of traversing all the XSD documents, definition information of each XSD document is also extracted, and the associated reference information associated with each imported document name is also extracted, where the definition information includes a name, a default name space, and a definition type name, the associated reference information includes an imported name space and an imported type name, and the associated information lookup module includes:
a matching unit, configured to match the imported namespace associated with each incorrect imported document name with all the default namespaces in sequence, so as to obtain a target default namespace consistent with a currently matched target imported namespace;
a second determining unit, configured to determine whether a target definition type name corresponding to the target default namespace includes a target import type name corresponding to the target import namespace;
and the processing unit is used for taking a target XSD document corresponding to the target definition type name comprising the target import type name as the imported XSD document corresponding to the target import type name when the target definition type name corresponding to the target default name space is judged to be the target import type name comprising the target import name.
The present invention also proposes a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the document repairing method described above.
The invention also provides a computer device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the document repairing method.
According to the document repairing method, the document repairing system, the readable storage medium and the computer equipment, due to the relevance of the introduced information, when the XSD document is judged to contain the wrong reference information, the corresponding introduced XSD document can be automatically found according to the relevant reference information relevant to the wrong reference information, the introduced XSD document contains correct information corresponding to the wrong reference information, then the wrong reference information and the corresponding information in the introduced XSD document are modified to be consistent, namely the wrong reference information can be modified, and after repairing is completed, the XSD document containing the wrong reference information can be normally loaded.
Drawings
FIG. 1 is a flowchart of a document repairing method in a first embodiment of the present invention.
FIG. 2 is a flowchart of a document repairing method according to a second embodiment of the present invention.
FIG. 3 is a schematic structural diagram of a document repairing system according to a third embodiment of the present invention.
Description of the main element symbols:
the following detailed description will further illustrate the invention in conjunction with the above-described figures.
Detailed Description
To facilitate an understanding of the invention, the invention will now be described more fully with reference to the accompanying drawings. Several embodiments of the invention are presented in the drawings. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
It will be understood that when an element is referred to as being "secured to" another element, it can be directly on the other element or intervening elements may also be present. When an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present. The terms "vertical," "horizontal," "left," "right," and the like as used herein are for illustrative purposes only.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
Referring to fig. 1, a document repairing method according to a first embodiment of the present invention is shown, which includes steps S01 through S03.
In step S01, it is determined whether all XSD documents in the currently selected file directory contain incorrect reference information.
It is noted that one XSD document (a document) may reference data of another XSD document (B document), typically the referenced data being the type name defined in the B document, and when the a document references the type name defined in the B document, the document name and default namespace of the B document are also introduced and associated with the introduced type name. Therefore, the reference information of the XSD document comprises an introduction namespace, an introduction document name and an introduction type name, so that the wrong reference information can be a wrong introduction namespace, a wrong introduction document name or a wrong introduction type name.
It can be understood that the step of determining whether the XSD document contains wrong reference information may be implemented in two ways: loading the XSD document (such as automatically generating codes or verifying XML validity according to XSD), and then judging whether the XSD document has a prompt of incapability of quoting or quoting errors in the loading process; or
Extracting the reference information in the XSD document, then searching the imported document comprising the reference information, and then judging whether the corresponding information in the imported document is consistent with the reference information.
When the step S01 determines that the XSD document contains the incorrect reference information, which represents that the XSD document needing to be repaired exists in the currently selected file directory, then steps S02 to S03 are performed.
Step S02, finding the corresponding imported XSD document according to the associated reference information associated with the incorrect reference information.
It can be understood that, when the XSD document is used for data reference, the introduced information is associated correspondingly, so that when any wrong reference information is detected, the associated reference information associated with the wrong reference information can be queried.
Therefore, the step of searching for the corresponding imported XSD document according to the associated reference information associated with the incorrect reference information may be embodied as follows: extracting relevant reference information related to the wrong reference information according to the wrong reference information, and then matching the relevant reference information with other documents to obtain an introduced document containing the relevant reference information. For example, after the data of the B document is imported into the a document, if an error is caused in the process of the reference, that is, the imported document name of the a document is not consistent with the document name of the B document, and the imported document name in the a document is wrong reference information, at this time, the related reference information (the imported namespace and the imported type name) related to the imported document name in the a document can be extracted according to the imported document name in the a document, and then the imported document containing the related reference information can be obtained by matching with other documents according to the related reference information, that is, the B document.
Step S03, modifying the reference information of the error to be consistent with the corresponding information introduced into the XSD document.
It can be understood that the information introduced by the document a and the information introduced by the document B inevitably have a corresponding relationship, and when the information introduced by the document a is wrong, the corresponding introduced correct information in the document B can be found according to the corresponding relationship, and then the introduced information can be repaired by correspondingly modifying the information.
It is understood that the step of modifying the reference information of the error to be consistent with the corresponding information introduced into the XSD document can be implemented in two ways: modifying the reference information of the error to be consistent with corresponding information in the corresponding imported XSD document, for example, modifying the imported document name of the A document to be consistent with the document name of the B document; or
And modifying the corresponding information introduced into the XSD document into the reference information corresponding to the error, for example, modifying the document name of the B document to be consistent with the introduced document name of the A document.
In summary, in the document repairing method in the above embodiment of the present invention, due to the relevance of the import information, when it is determined that the XSD document includes the incorrect reference information, the corresponding imported XSD document can be automatically found according to the relevant reference information related to the incorrect reference information, and the imported XSD document includes the correct information corresponding to the incorrect reference information, and then the incorrect reference information and the corresponding information in the imported XSD document are modified to be consistent, that is, the incorrect reference information can be modified, and after the repairing is completed, the XSD document including the incorrect reference information can be normally loaded.
Referring to FIG. 2, a document repairing method according to a second embodiment of the present invention is shown, which includes steps S11 through S18.
Step S11, traverse all XSD documents in the currently selected file directory to extract the name, default name space, defined type name, imported document name, and imported name space and imported type name associated with the imported document name of each XSD document.
It is noted that the named name of the XSD document is the document name of the XSD document.
Step S12, creating a definition information mapping table from the name, the definition type name and the default namespace of each XSD document.
It should be noted that, the manner of establishing the definition information mapping table may be: establishing the definition information mapping table according to the name, the definition type name and the default name space of each XSD document in a preset table establishing mode; or writing the name, the definition type name and the default name space of each XSD document into a pre-stored table according to a preset table writing mode, wherein the pre-stored table can be preset.
Step S13, creating a mapping table of import information for the import document name of each XSD document and the corresponding associated import namespace and import type name.
Wherein the import document name and the import type name are associated reference information of the corresponding import namespace.
It can be understood that the advantage of establishing the definition information mapping table and the introduction information mapping table is to facilitate subsequent extraction and query of the associated information and the corresponding information.
In step S14, it is determined whether there is an erroneous lead-in document name that is the lead-in document name for which the corresponding document does not exist.
Wherein the incorrect imported document name is incorrect reference information, and the step of determining whether the incorrect imported document name exists may be implemented as follows: firstly, judging whether a document corresponding to each introduced document name exists or not, if not, the current introduced document name is the wrong introduced document name.
When it is judged at the step S14 that the erroneous lead-in document name exists, the steps S15 to S16 are performed, and when it is judged at the step S14 that the erroneous lead-in document name does not exist, no action is performed.
Step S15, matching the import namespace associated with each of the erroneous import document names with all of the default namespaces in sequence to obtain a target default namespace consistent with the currently matched target import namespace.
Wherein the import namespace associated with the incorrect import document name may be extracted from the corresponding import information mapping table.
Step S16, determine whether the target definition type name corresponding to the target default namespace includes the target import type name corresponding to the target import namespace.
Wherein the target definition type name corresponding to the target default namespace may be extracted from the corresponding definition information mapping table, and the target import type name corresponding to the target import namespace may be extracted from the corresponding import information mapping table.
Furthermore, it is understood that the steps S15 and S16 are processes for finding the corresponding imported XSD document, and the finding is performed by: first, a consistent default namespace is searched according to a target import namespace associated with an incorrect import document name, if the default namespaces in the C document and the D document are consistent with the target import namespace, the imported document corresponding to the incorrect import document name is one of the C document and the D document, at this time, the step S16 judges whether the defined type names in the C document and the D document contain the target import type name associated with the incorrect import document name, and if the C document contains the target import type name, the C document is the corresponding imported document.
When the step S16 determines that the target definition type name includes the target import type name, steps S17 to S18 are performed.
Step S17, using the target XSD document corresponding to the target definition type name including the target import type name as the imported XSD document corresponding to the target import type name.
Step S18, modifying the incoming document name of the error and the named name of the corresponding incoming XSD document to be consistent.
It will be appreciated that after the entire repair process is completed, the corresponding repaired XSD document also needs to be saved.
In summary, in the document repairing method in the above embodiment of the present invention, when the XSD document in the currently selected file directory has an incorrect import document name, the repairing of the XSD document can be completed by finding the corresponding import document name and modifying the incorrect import document name and the corresponding named name of the import XSD document to be consistent, so as to ensure that all the XSD documents in the currently selected file directory can be loaded correctly.
Another aspect of the present invention further provides a document repairing system, referring to fig. 3, which shows a document repairing system according to a third embodiment of the present invention, including:
the reference information judging module 11 is used for judging whether all XSD documents in the currently selected file directory contain wrong reference information or not;
the related information searching module 12 is configured to search, when it is determined that the XSD document includes the incorrect reference information, a corresponding imported XSD document according to the related reference information related to the incorrect reference information;
and the information modification module 13 is used for modifying the reference information of the error to be consistent with the corresponding information introduced into the XSD document.
Further, the reference information of the error includes an incoming document name of the error, and the reference information judging module 11 includes:
a traversal unit 111, configured to traverse all the XSD documents to extract an incoming document name of each XSD document;
a first judgment unit 112 for judging whether there is the wrong incoming document name, which is the incoming document name for which the corresponding document does not exist.
Further, in the process of traversing all the XSD documents, definition information of each XSD document is further extracted, and the associated reference information associated with each import document name is also extracted, where the definition information includes a name, a default name space, and a definition type name, the associated reference information includes an import name space and an import type name, and the associated information lookup module 12 includes:
a matching unit 121, configured to match the import namespace associated with each incorrect import document name with all the default namespaces in sequence, so as to obtain a target default namespace consistent with a currently matched target import namespace;
a second determining unit 122, configured to determine whether the target definition type name corresponding to the target default namespace includes a target import type name corresponding to the target import namespace;
and the processing unit 123 is configured to, when it is determined that the target definition type name corresponding to the target default namespace is the target import type name corresponding to the target import namespace, take the target XSD document corresponding to the target definition type name including the target import type name as the imported XSD document corresponding to the target import type name.
Further, the information modification module 13 includes:
an information modifying unit 131, configured to modify the incoming document name of the error and the named name of the corresponding incoming XSD document to be consistent.
Further, the document repair system further includes:
a first mapping table establishing module 14, configured to establish a definition information mapping table for the name, the definition type name, and the default namespace of each XSD document;
a second mapping table creating module 15, configured to create a mapping table of import information for the import document name of each XSD document and the corresponding associated import namespace and import type name.
The invention also proposes a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, implements a document repair method as described above.
The invention also proposes a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the document repairing method as described above when executing the program.
Those of skill in the art will understand that the logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be viewed as implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (10)
1. A method of document repair, comprising:
judging whether all XSD documents in the currently selected file directory contain wrong reference information or not;
if yes, searching a corresponding introduced XSD document according to the related citation information related to the wrong citation information;
modifying the reference information of the error to be consistent with the corresponding information introduced into the XSD document;
wherein the step of finding a corresponding imported XSD document according to the associated reference information associated with the incorrect reference information comprises:
extracting related citation information related to the error citation information according to the error citation information;
and matching the associated reference information with other documents to obtain an imported XSD document containing the associated reference information, wherein the associated reference information comprises an import namespace and an import type name.
2. The document repairing method according to claim 1, wherein the reference information of the error includes an incoming document name of the error, and the step of judging whether the reference information of the error is contained in all XSD documents under the currently selected file directory comprises:
traversing all the XSD documents to extract an introduced document name of each XSD document;
and judging whether the wrong imported document name exists or not, wherein the wrong imported document name is the imported document name without the corresponding document.
3. The document repairing method according to claim 2, wherein definition information of each XSD document is further extracted in said step of traversing all the XSD documents, and said associated reference information associated with each said imported document name is further extracted, wherein said definition information includes a name, a default name space and a definition type name, and said step of searching for a corresponding imported XSD document according to the associated reference information associated with said incorrect reference information comprises:
matching the import namespace associated with each wrong import document name with all the default namespaces in sequence to obtain a target default namespace consistent with the currently matched target import namespace;
judging whether the target definition type name corresponding to the target default name space comprises a target import type name corresponding to the target import name space;
and if so, taking the target XSD document corresponding to the target definition type name comprising the target introduction type name as the introduced XSD document corresponding to the target introduction type name.
4. The document repairing method according to claim 3, wherein said step of modifying said incorrect reference information to be consistent with corresponding information in said imported XSD document comprises:
modifying the incoming document name of the error and the named name of the corresponding incoming XSD document to be consistent.
5. The document repairing method according to claim 3, further comprising, after said step of traversing all of said XSD documents:
establishing a definition information mapping table for the named name, the definition type name and the default name space of each XSD document;
and establishing an import information mapping table by using the import document name of each XSD document, the corresponding associated import name space and the corresponding import type name.
6. A document repair system, comprising:
the reference information judging module is used for judging whether all XSD documents in the currently selected file directory contain wrong reference information or not;
the related information searching module is used for searching a corresponding introduced XSD document according to related reference information related to the wrong reference information when the XSD document is judged to contain the wrong reference information;
the information modification module is used for modifying the reference information of the error to be consistent with the corresponding information introduced into the XSD document;
the process of searching for a corresponding imported XSD document according to the associated reference information related to the incorrect reference information specifically includes:
extracting related citation information related to the error citation information according to the error citation information;
and matching the associated reference information with other documents to obtain an imported XSD document containing the associated reference information, wherein the associated reference information comprises an import namespace and an import type name.
7. The document repair system according to claim 6, wherein the reference information of the error includes an imported document name of the error, and the reference information judgment module includes:
the traversal unit is used for traversing all the XSD documents to extract the introduced document name of each XSD document;
a first judgment unit operable to judge whether there is the wrong incoming document name, which is the incoming document name for which the corresponding document does not exist.
8. The document repair system of claim 7, wherein definition information of each XSD document is further extracted during the traversal of all the XSD documents, and the associated reference information associated with each import document name is further extracted, wherein the definition information includes a name, a default name space and a definition type name, and wherein the associated information lookup module comprises:
a matching unit, configured to match the imported namespace associated with each incorrect imported document name with all the default namespaces in sequence, so as to obtain a target default namespace consistent with a currently matched target imported namespace;
a second determining unit, configured to determine whether a target definition type name corresponding to the target default namespace includes a target import type name corresponding to the target import namespace;
and the processing unit is used for taking a target XSD document corresponding to the target definition type name comprising the target import type name as the imported XSD document corresponding to the target import type name when the target definition type name corresponding to the target default name space is judged to be the target import type name comprising the target import name.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 5.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1-5 when executing the program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710549395.4A CN107479910B (en) | 2017-07-07 | 2017-07-07 | Document repairing method, system, readable storage medium and computer equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710549395.4A CN107479910B (en) | 2017-07-07 | 2017-07-07 | Document repairing method, system, readable storage medium and computer equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107479910A CN107479910A (en) | 2017-12-15 |
CN107479910B true CN107479910B (en) | 2020-11-20 |
Family
ID=60596072
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710549395.4A Active CN107479910B (en) | 2017-07-07 | 2017-07-07 | Document repairing method, system, readable storage medium and computer equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107479910B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110990593B (en) * | 2019-12-17 | 2023-09-19 | 新方正控股发展有限责任公司 | Citation falling empty detection method and device |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1755689A (en) * | 2004-09-30 | 2006-04-05 | 微软公司 | Method, system, and computer-readable medium for merging data from multiple data sources for use in an electronic document |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020169825A1 (en) * | 2001-05-11 | 2002-11-14 | Benson Hougland | XML-enabled control and monitoring method and apparatus |
-
2017
- 2017-07-07 CN CN201710549395.4A patent/CN107479910B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1755689A (en) * | 2004-09-30 | 2006-04-05 | 微软公司 | Method, system, and computer-readable medium for merging data from multiple data sources for use in an electronic document |
Non-Patent Citations (2)
Title |
---|
Dubbo cvc-complex-type.2.4.c错误,dubbo.xsd;清风半夜鸣蝉;《https://blog.csdn.net/ys5773477/article/details/53427374/》;20161201;1 * |
矿山遥感监测属性数据复杂约束类型的描述方法;刁明光等;《国土资源遥感》;20161231;第28卷(第4期);197-201 * |
Also Published As
Publication number | Publication date |
---|---|
CN107479910A (en) | 2017-12-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11176317B2 (en) | Automated file merging through content classification | |
US10705748B2 (en) | Method and device for file name identification and file cleaning | |
CN108241720B (en) | Data processing method, device and computer readable storage medium | |
CA2610208A1 (en) | Learning facts from semi-structured text | |
CN110688823B (en) | XML file verification method and device | |
CN106775937A (en) | A kind of order line method of calibration and device | |
CN108733674B (en) | A kind of A2L file merging method and device | |
EP3543858B1 (en) | Method for checking and compiling system start-up files | |
CN112256635A (en) | Method and device for identifying file type | |
CN111158968A (en) | BIOS configuration information self-checking method, device and storage medium | |
CN106406918B (en) | Automatic source code merging method and automatic source code merging device | |
CN104346035A (en) | Indicating automatically corrected words | |
CN116431520A (en) | Test scene determination method, device, electronic equipment and storage medium | |
CN107479910B (en) | Document repairing method, system, readable storage medium and computer equipment | |
US20080313472A1 (en) | Method and apparatus for changing and adding activation keys for functions of digital content without having to change and recompile the digital content | |
CN105700917A (en) | Method and apparatus for synchronizing DLL and database | |
CN108241705B (en) | Data insertion method and device | |
CN110990593B (en) | Citation falling empty detection method and device | |
CN111984595B (en) | File processing method and device and storage medium | |
CN110298018B (en) | Text data processing method, device, computer equipment and storage medium | |
CN118467334A (en) | Conversion accuracy verification method, system and terminal for multilingual vocabulary strips | |
CN108664250B (en) | Code processing method and device | |
US20170103057A1 (en) | Context sensitive user dictionary utilization in text input field spell checking | |
CN113220587A (en) | Web interface compatibility testing method and device | |
JP2008020972A (en) | Software analysis system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |