CN117236282B - Intelligent typesetting method, device, terminal and medium based on XML data - Google Patents
Intelligent typesetting method, device, terminal and medium based on XML data Download PDFInfo
- Publication number
- CN117236282B CN117236282B CN202311384093.8A CN202311384093A CN117236282B CN 117236282 B CN117236282 B CN 117236282B CN 202311384093 A CN202311384093 A CN 202311384093A CN 117236282 B CN117236282 B CN 117236282B
- Authority
- CN
- China
- Prior art keywords
- typesetting
- label
- xml
- tag
- content
- 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
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Document Processing Apparatus (AREA)
Abstract
The invention discloses an intelligent typesetting method, device, terminal and medium based on XML data, wherein the method comprises the following steps: acquiring label content which is predetermined to be processed and converted; acquiring a typesetting template which is pre-established and contains a label structure and typesetting orders of all labels; reading data of an original XML file, processing converted label content according to the need to traverse labels, renaming the labels and reorganizing the label structures according to typesetting bit numbers, converting the labels and the reorganizing label structures to a label system corresponding to a typesetting template, and then converting a processing result and saving the processing result as a new XML file; and importing the data of the new XML file into a typesetting template to automatically arrange the XML data into a layout, thereby outputting a typesetting result document. According to the method, the labels in the original XML file are sequentially converted into the label structures corresponding to the typesetting templates, the new XML file is obtained after the typesetting templates are recombined and imported, and the printable file is output, so that an automatic typesetting mode is realized, a traditional manual editing mode is replaced, and typesetting efficiency is improved.
Description
[ Field of technology ]
The invention relates to the technical field of publishing design, in particular to an intelligent typesetting method, device, terminal and medium based on XML data.
[ Background Art ]
At present, a large number of printing and publishing demands exist on a network compiling platform and a content system, the traditional method is that related data is exported through the platform, manually tidied by editing and then typeset by a typesetter to output printed files, and the middle links of the whole process are more, so that time and labor are wasted, mistakes are easy to occur, and the typesetting efficiency is low. In view of the foregoing, it is necessary to provide an intelligent typesetting method, device, terminal and medium based on XML data to overcome the above-mentioned drawbacks.
[ Invention ]
The invention aims to provide an intelligent typesetting method, device, terminal and medium based on XML data, which aim to solve the problem that the typesetting effect of the existing typesetting mode is not high.
In order to achieve the above object, a first aspect of the present invention provides an intelligent typesetting method based on XML data, including:
Step S10: acquiring label content which is predetermined to be processed and converted; the tag content comprises an item name, a qualitative description, a text, a recommended reading and an item author;
Step S20: acquiring a typesetting template which is pre-established and contains a label structure and typesetting orders of all labels; the label structure comprises a paragraph style, a character style, an object style and a table style corresponding to the label;
Step S30: reading data of an original XML file, processing converted label content according to the need to traverse labels, renaming the labels and reorganizing the label structures according to typesetting bit numbers, converting to a label system corresponding to the typesetting template, and then converting the processing result and saving the processing result as a new XML file;
Step S40: and importing the data of the new XML file into the typesetting template to automatically arrange the XML data into a layout, thereby outputting a typesetting result document.
In a preferred embodiment, after said step S40, further comprises:
step S51: setting dynamic header content and creating a reference index;
step S52: automatically extracting the content of the index tag and the page where the content is positioned from the page of the typesetting result document, and storing the content and the page into a text file;
step S53: acquiring a pre-created index content layout, carrying out index sorting merging on the extracted index tag content, and then importing the sorting result into the index content layout;
step S54: and storing the typeset document and exporting a printable PDF file.
In a preferred embodiment, in said step S40, it comprises:
and according to the application rules and the formula processing received by the typesetting plug-in panel, automatically applying corresponding styles to the labels so as to present the final typesetting effect.
In a preferred embodiment, in the step S20, it includes:
Newly creating a document in InDesign, setting a page center and a column, and manufacturing contents of a header, a footer and a main board;
Creating paragraph style, character style, object style and table style corresponding to each label, and storing the paragraph style, character style, object style and table style as typesetting templates.
In a preferred embodiment, in the step S30, it includes:
Step S31: creating a typesetting XML template file; the template file comprises a complete label structure and preset label attributes, and the label content is initially empty;
step S32: creating a configuration table, and establishing a mapping relation between an original XML tag and a typeset XML tag, wherein parameters comprise tag names, belonging layers, attribute constraint conditions and attribute arrays to be reserved;
Step S33: reading a typesetting XML template file and reading a typesetting XML structure tree;
step S34: reading an original XML file and reading an original XML structure tree;
Step S35: traversing the label of the original XML structure tree, and converting the processing to the typesetting XML structure tree;
step S36: and storing the typesetting XML structure tree to a new XML file to finish conversion and recombination.
In a preferred embodiment, in the step S35, it includes:
step S351: reading a tag from a root node of the original XML structure tree;
step S352: searching a configuration table, checking whether a label exists or not, and judging whether the belonging layer is correct or not and whether attribute constraint conditions are met or not;
Step S353: if the labels exist and the judging results are all met, reading the label content, copying the corresponding label content written into the typesetting XML structure tree, and writing the copied attribute of the attribute array to be reserved according to the configuration table into the corresponding label of the typesetting XML structure tree; if at least one unsatisfied condition exists in the judging result, ignoring the label;
step S354: the next tag is read and then passes to step 352 where processing continues until all tags have been traversed.
The second aspect of the present invention provides an intelligent typesetting device based on XML data, including:
The tag determining module is used for acquiring tag contents which are predetermined to be processed and converted; the tag content comprises an item name, a qualitative description, a text, a recommended reading and an item author;
The template acquisition module is used for acquiring a typesetting template which is created in advance and comprises a label structure and typesetting orders of all labels; the label structure comprises a paragraph style, a character style, an object style and a table style corresponding to the label;
The tag conversion module is used for reading the data of the original XML file, processing the converted tag content according to the requirement, traversing the tag, renaming the tag and reorganizing the tag structure according to typesetting bit times, converting the tag to a tag system corresponding to the typesetting template, and then converting the processing result and saving the processing result as a new XML file;
And the typesetting output module is used for importing the data of the new XML file into the typesetting template so as to automatically arrange the XML data into a layout, thereby outputting a typesetting result document.
A third aspect of the present invention provides a terminal comprising a memory, a processor and a computer program stored in the memory, which when executed by the processor implements the steps of the intelligent typesetting method based on XML data as in any of the above embodiments.
A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the XML data-based intelligent composition method according to any one of the above-described embodiments.
A fifth aspect of the invention provides a computer program product comprising a computer program or instructions which, when processed for execution, implement the steps of an intelligent typesetting method based on XML data as described in any of the above embodiments.
According to the intelligent typesetting method, device, terminal and medium based on XML data, the typesetting template comprising the label structure and typesetting order is created in advance, then the labels in the original XML file are sequentially converted into the label structure corresponding to the typesetting template, after being recombined and imported into the typesetting template, a new XML file is obtained, and the printable file is output, so that an automatic typesetting mode is realized, a traditional manual editing mode is replaced, and typesetting efficiency is improved.
[ Description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an intelligent typesetting method based on XML data provided by the invention;
FIG. 2 is a sub-flowchart of step S30 in the intelligent typesetting method based on XML data shown in FIG. 1;
FIG. 3 is a sub-flowchart of step S35 in the intelligent typesetting method based on XML data shown in FIG. 1;
FIG. 4 is a flowchart of another embodiment of an intelligent typesetting method based on XML data provided by the invention;
FIG. 5 is an exemplary raw XML data;
FIG. 6 is XML data after parsing;
FIG. 7 is a preview of the import InDesign layout plugin, tag structure;
FIG. 8 is a final layout result;
Fig. 9 is a frame diagram of the intelligent typesetting device based on XML data provided by the invention.
[ Detailed description ] of the invention
In order to make the objects, technical solutions and advantageous technical effects of the present invention more apparent, the present invention will be further described in detail with reference to the accompanying drawings and detailed description. It should be understood that the detailed description is intended to illustrate the invention, and not to limit the invention.
It is also to be understood that 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 in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
Example 1
In the embodiment of the invention, an intelligent typesetting method based on XML data is provided, a processing program and typesetting plug-in are developed, data (XML (eXtensible Markup Language, extensible markup language) format) exported by a network platform system is analyzed and processed, and then the data is imported into a typesetting system for automatic typesetting, so that typesetting efficiency is improved, and printable files are output.
As shown in fig. 1, the intelligent composition method based on XML data includes steps S10 to S40.
Step S10: acquiring label content which is predetermined to be processed and converted; the tag content comprises an item name, a qualitative description, a text, a recommended reading and an item author.
It is first necessary to determine the tag system structure, which tag data needs to be presented, which is the index/see tag, and to determine the tag content that needs to process the conversion. Examples are as follows:
a) Item name:
< subclauses name = "entry name chinese" zhName = "entry name chinese spell" >
< Field@pname= "latinname" > entry name Latin </field >
< Field@pname= "firstname" > entry name original language ]
< Field@pname= "enname" > entry name English </field >
B) Qualitative description:
< subcDescription > qualitative statement (subcDescription)
C) Text:
< titile > content title >
The text content contains the following tags, if any: < p > paragraph
< I > italics
< H1> first level title
< H2> second order title
< H3> three-level title
< H4> four-level title
< Img > picture
< Caption > drawing
<hotlink>
<knowledge>
<EVENT_INDEX>
<ORGANISE_INDEX>-
<OTHER_INDEX>
<PERSON_INDEX>
<PLACE_INDEX>
<PUBLICATION_INDEX>
<TERM_INDEX>
D) Recommendation reading:
<bibliography>
< mainPerson > author (mainPerson)
< BookName > works name of bookName >
< OtherPerson > Zhao San </otherPerson >
< PublishAddress > publication site (publishAddress)
< Publishauthor > publication institution (publishauthor)
< PublishYear > publication year publishYear ]
</bibliography>
E) Item authors:
< authorName > author (authorName)
Step S20: acquiring a typesetting template which is pre-established and contains a label structure and typesetting orders of all labels; the label structure comprises paragraph style, character style, object style and table style corresponding to the label.
Specifically, in step S20, it includes: newly creating a document in InDesign, setting a page center and a column, and manufacturing contents of a header, a footer and a main board; creating paragraph style, character style, object style and table style corresponding to each label, and storing the paragraph style, character style, object style and table style as typesetting templates. In this step, a preset layout function module (Baike Typesetting) is adopted, and the module is a main service module for encyclopedic typesetting, adopts an InDesign plug-in (function expansion) design, provides functions of generating and operating a board surface, is used for importing XML and expanding typesetting, solves formats such as characters, pictures and layout, and needs to solve importing and exporting of a data tag structure.
Step S30: reading data of an original XML file, processing converted label content according to the need, traversing labels, renaming the labels and reorganizing the label structure according to typesetting bit numbers, converting to a label system corresponding to a typesetting template, and then converting the processing result and saving the processing result as a new XML file.
In order to typeset, renaming the labels according to the layout requirements, adding auxiliary labels, reorganizing the label structure, and endowing the labels with style attributes defined in the corresponding typesetting templates.
Specifically, as shown in FIG. 2, in step S30, sub-steps S31-S36 are included.
Step S31: creating a typesetting XML template file; the template file comprises a complete label structure and preset label attributes, and the label content is initially empty.
Step S32: and creating a configuration table, and establishing a mapping relation between the original XML tag and the typeset XML tag, wherein parameters comprise tag names, belonging layers, attribute constraint conditions and attribute arrays to be reserved.
Step S33: reading the typesetting XML template file and reading the typesetting XML structure tree.
Step S34: and reading the original XML file and reading the original XML structure tree.
Step S35: traversing the labels of the original XML structure tree, and converting the processing to typesetting the XML structure tree.
Step S36: and storing and typesetting the XML structure tree to a new XML file to finish conversion and recombination.
Further, as shown in fig. 3, in step S35, it includes:
step S351: reading the tag from the root node of the original XML structure tree;
step S352: searching a configuration table, checking whether a label exists or not, and judging whether the belonging layer is correct or not and whether attribute constraint conditions are met or not;
step S353: if the labels exist and the judging results are all satisfied, namely, the conditions in the step S352 are all satisfied, reading the label content, copying the corresponding label content written into the typesetting XML structure tree, and writing the copied attribute of the attribute array to be reserved according to the configuration table into the corresponding label of the typesetting XML structure tree; if at least one unsatisfied condition exists in the judging result, ignoring the label;
step S354: the next tag is read and then proceeds to step 352 to continue processing until all tags have been traversed.
Step S40: and importing the data of the new XML file into a typesetting template to automatically arrange the XML data into a layout, thereby outputting a typesetting result document. Thus, automated typesetting is achieved.
Further, according to the application rule and the formula processing received by the typesetting plug-in panel, the label automatically applies the corresponding style to present the final typesetting effect.
Further, as shown in fig. 4, layout fine adjustment may be performed by using auxiliary functions provided by the layout plug-in, that is, steps S51 to S54 may be further included after step S40.
Step S51: dynamic header content is set and a reference index is created.
Step S52: and automatically extracting the content of the index tag and the page where the index tag is positioned from the page of the typesetting result document, and storing the content and the page in a text file.
Step S53: and acquiring a pre-created index content layout, carrying out index sorting merging on the extracted index tag content, and then importing the sorting result into the index content layout. The index sorting mode can be stroke index (for example, sorting according to the order of strokes from less to more), foreign language index (sorting according to word-by-word arrangement method) or internal text A-Z index (sorting according to the order of Chinese phonetic alphabets and aided with Chinese character strokes and starting stroke shape).
Step S54: and storing the typeset document, and exporting a printable PDF (Portable Document Format, portable file format) file.
The following provides an example data processing procedure to assist in understanding the technical solution of the present invention. FIG. 5 is an exemplary raw XML data; FIG. 6 is XML data after parsing; FIG. 7 is a preview of the import InDesign layout plugin, tag structure; fig. 8 is the final layout result.
The second aspect of the present invention provides an intelligent typesetting device 100 based on XML data, which is used for parsing data (XML format) exported by a network platform system, then importing the data into a typesetting system for automatic typesetting, improving typesetting efficiency, and outputting printable files. It should be noted that, the implementation principle and the specific implementation manner of the intelligent typesetting device 100 based on XML data may refer to the above-mentioned intelligent typesetting method based on XML data, which is not described herein again.
As shown in fig. 9, the intelligent composition apparatus 100 based on XML data includes:
A tag determination module 10, configured to obtain tag content predetermined to be converted; the tag content comprises an item name, a qualitative description, a text, a recommended reading and an item author;
The template obtaining module 20 is configured to obtain a typesetting template that is created in advance and includes a label structure and typesetting orders of labels; the label structure comprises paragraph patterns, character patterns, object patterns and table patterns corresponding to the labels;
The tag conversion module 30 is used for reading the data of the original XML file, processing the converted tag content according to the requirement, traversing the tag, renaming the tag and reorganizing the tag structure according to typesetting bit times, converting to a tag system corresponding to the typesetting template, and then converting the processing result and saving the processing result as a new XML file;
And the typesetting output module 40 is used for importing the data of the new XML file into the typesetting template so as to automatically arrange the XML data into the layout, thereby outputting the typesetting result document.
A third aspect of the present invention provides a terminal comprising a memory, a processor and a computer program stored in the memory, which when executed by the processor implements the steps of the intelligent typesetting method based on XML data as in any of the above embodiments.
A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the XML data-based intelligent composition method according to any one of the above-described embodiments.
A fifth aspect of the invention provides a computer program product comprising a computer program or instructions which, when processed for execution, implement the steps of an intelligent typesetting method based on XML data as described in any of the above embodiments.
In summary, according to the intelligent typesetting method, device, terminal and medium based on XML data provided by the invention, the typesetting template comprising the label structure and typesetting order is created in advance, then the labels in the original XML file are sequentially converted into the label structure corresponding to the typesetting template, the new XML file is obtained after being recombined and imported into the typesetting template, and the printable file is output, so that an automatic typesetting mode is realized, a traditional manual editing mode is replaced, and typesetting efficiency is improved.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the system is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the elements and method steps of the examples described in connection with the embodiments disclosed herein can be implemented as electronic hardware, or as a combination of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed system or apparatus/terminal device and method may be implemented in other manners. For example, the system or apparatus/terminal device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, systems or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The present invention is not limited to the details and embodiments described herein, and thus additional advantages and modifications may readily be made by those skilled in the art, without departing from the spirit and scope of the general concepts defined in the claims and the equivalents thereof, and the invention is not limited to the specific details, representative apparatus and illustrative examples shown and described herein.
Claims (7)
1. An intelligent typesetting method based on XML data is characterized by comprising the following steps:
Step S10: acquiring label content which is predetermined to be processed and converted; the tag content comprises an item name, a qualitative description, a text, a recommended reading and an item author;
Step S20: acquiring a typesetting template which is pre-established and contains a label structure and typesetting orders of all labels; the label structure comprises a paragraph style, a character style, an object style and a table style corresponding to the label;
Step S30: reading data of an original XML file, processing converted label content according to the need to traverse labels, renaming the labels and reorganizing the label structures according to typesetting bit numbers, converting to a label system corresponding to the typesetting template, and then converting the processing result and saving the processing result as a new XML file;
Step S40: importing the data of the new XML file into the typesetting template to automatically arrange the XML data into a layout, thereby outputting a typesetting result document;
wherein, in the step S30, it includes:
Step S31: creating a typesetting XML template file; the template file comprises a complete label structure and preset label attributes, and the label content is initially empty;
step S32: creating a configuration table, and establishing a mapping relation between an original XML tag and a typeset XML tag, wherein parameters comprise tag names, belonging layers, attribute constraint conditions and attribute arrays to be reserved;
Step S33: reading a typesetting XML template file and reading a typesetting XML structure tree;
step S34: reading an original XML file and reading an original XML structure tree;
Step S35: traversing the label of the original XML structure tree, and converting the processing to the typesetting XML structure tree;
Step S36: storing the typesetting XML structure tree to a new XML file to finish conversion and recombination;
wherein, in the step S35, it includes:
step S351: reading a tag from a root node of the original XML structure tree;
step S352: searching a configuration table, checking whether a label exists or not, and judging whether the belonging layer is correct or not and whether attribute constraint conditions are met or not;
Step S353: if the labels exist and the judging results are all met, reading the label content, copying the corresponding label content written into the typesetting XML structure tree, and writing the copied attribute of the attribute array to be reserved according to the configuration table into the corresponding label of the typesetting XML structure tree; if at least one unsatisfied condition exists in the judging result, ignoring the label;
Step S354: the next tag is read in and then goes to the step S352 to continue processing until all tags are traversed.
2. The intelligent typesetting method based on XML data according to claim 1, further comprising, after said step S40:
step S51: setting dynamic header content and creating a reference index;
step S52: automatically extracting the content of the index tag and the page where the content is positioned from the page of the typesetting result document, and storing the content and the page into a text file;
Step S53: acquiring a pre-created index content layout, carrying out index sorting merging on the extracted index tag content, and then importing the sorting result into the index content layout;
Step S54: saving the typeset document and exporting the printable PDF file.
3. The intelligent composition method based on XML data according to claim 1, wherein said step S40 includes:
and according to the application rules and the formula processing received by the typesetting plug-in panel, automatically applying corresponding styles to the labels so as to present the final typesetting effect.
4. The intelligent composition method based on XML data according to claim 1, wherein in said step S20, it comprises:
Newly creating a document in InDesign, setting a page center and a column, and manufacturing contents of a header, a footer and a main board;
Creating paragraph style, character style, object style and table style corresponding to each label, and storing the paragraph style, character style, object style and table style as typesetting templates.
5. An intelligent typesetting device based on XML data is characterized by comprising:
The tag determining module is used for acquiring tag contents which are predetermined to be processed and converted; the tag content comprises an item name, a qualitative description, a text, a recommended reading and an item author;
The template acquisition module is used for acquiring a typesetting template which is created in advance and comprises a label structure and typesetting orders of all labels; the label structure comprises a paragraph style, a character style, an object style and a table style corresponding to the label;
The tag conversion module is used for reading the data of the original XML file, processing the converted tag content according to the requirement, traversing the tag, renaming the tag and reorganizing the tag structure according to typesetting bit times, converting the tag to a tag system corresponding to the typesetting template, and then converting the processing result and saving the processing result as a new XML file;
the typesetting output module is used for importing the data of the new XML file into the typesetting template so as to automatically arrange the XML data into a layout, thereby outputting a typesetting result document;
The specific implementation steps of the label conversion module comprise:
Step S31: creating a typesetting XML template file; the template file comprises a complete label structure and preset label attributes, and the label content is initially empty;
step S32: creating a configuration table, and establishing a mapping relation between an original XML tag and a typeset XML tag, wherein parameters comprise tag names, belonging layers, attribute constraint conditions and attribute arrays to be reserved;
Step S33: reading a typesetting XML template file and reading a typesetting XML structure tree;
step S34: reading an original XML file and reading an original XML structure tree;
Step S35: traversing the label of the original XML structure tree, and converting the processing to the typesetting XML structure tree;
Step S36: storing the typesetting XML structure tree to a new XML file to finish conversion and recombination;
wherein, in the step S35, it includes:
step S351: reading a tag from a root node of the original XML structure tree;
step S352: searching a configuration table, checking whether a label exists or not, and judging whether the belonging layer is correct or not and whether attribute constraint conditions are met or not;
Step S353: if the labels exist and the judging results are all met, reading the label content, copying the corresponding label content written into the typesetting XML structure tree, and writing the copied attribute of the attribute array to be reserved according to the configuration table into the corresponding label of the typesetting XML structure tree; if at least one unsatisfied condition exists in the judging result, ignoring the label;
Step S354: the next tag is read in and then goes to the step S352 to continue processing until all tags are traversed.
6. A terminal comprising a memory, a processor and a computer program stored in the memory, which when executed by the processor, performs the steps of the intelligent typesetting method based on XML data according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the respective steps of the XML data-based intelligent composition method according to any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311384093.8A CN117236282B (en) | 2023-10-24 | 2023-10-24 | Intelligent typesetting method, device, terminal and medium based on XML data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311384093.8A CN117236282B (en) | 2023-10-24 | 2023-10-24 | Intelligent typesetting method, device, terminal and medium based on XML data |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117236282A CN117236282A (en) | 2023-12-15 |
CN117236282B true CN117236282B (en) | 2024-06-21 |
Family
ID=89094876
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311384093.8A Active CN117236282B (en) | 2023-10-24 | 2023-10-24 | Intelligent typesetting method, device, terminal and medium based on XML data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117236282B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118709646A (en) * | 2024-06-18 | 2024-09-27 | 雅昌文化(集团)有限公司 | Automatic typesetting method and system for artwork auction catalog |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101470698A (en) * | 2007-12-26 | 2009-07-01 | 北京大学 | Layout method and corresponding system for symbol of sending organizations |
CN116702702A (en) * | 2023-04-14 | 2023-09-05 | 北京雅昌艺术印刷有限公司 | Automatic typesetting method and system based on XML |
Family Cites Families (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007004583A (en) * | 2005-06-24 | 2007-01-11 | Rococo:Kk | Automatic composition system |
CN102646125B (en) * | 2012-02-28 | 2014-08-27 | 中国标准化研究院 | Structured digital content extraction and reorganization method |
JP2015005184A (en) * | 2013-06-21 | 2015-01-08 | 大日本印刷株式会社 | System, method and program for electronic typesetting |
CN104424172B (en) * | 2013-09-04 | 2018-05-18 | 北大方正集团有限公司 | A kind of composition method, apparatus and system |
CN104679726A (en) * | 2013-12-03 | 2015-06-03 | 北大方正集团有限公司 | Type setting method and device of word files |
CN104090920A (en) * | 2014-06-17 | 2014-10-08 | 安徽教育网络出版有限公司 | System for realizing digital content cross-terminal publishing |
CN107688557A (en) * | 2016-08-03 | 2018-02-13 | 北大方正集团有限公司 | Composition method, composing system and terminal |
KR20180035048A (en) * | 2016-09-28 | 2018-04-05 | 주식회사 뉴스토마토 | Automatic computerized typesetting system for having a fixed type form |
CN108614808B (en) * | 2016-12-12 | 2020-09-04 | 北大方正集团有限公司 | Typesetting method and typesetting device for XML document |
CN108984498B (en) * | 2017-06-05 | 2021-04-30 | 北大方正集团有限公司 | Document typesetting processing method and device |
CN109670160B (en) * | 2017-10-13 | 2021-04-09 | 北大方正集团有限公司 | Document typesetting processing method and device |
CN108052488A (en) * | 2017-12-06 | 2018-05-18 | 广东技术师范学院天河学院 | Paper automatic generation method based on template |
CN110929487B (en) * | 2018-09-04 | 2021-06-15 | 北大方正集团有限公司 | Form typesetting method and apparatus, computer equipment and readable storage medium |
CN111414741B (en) * | 2018-12-19 | 2022-06-14 | 北大方正集团有限公司 | Method, device, equipment and medium for making layout templates for publications |
CN113221506B (en) * | 2021-05-14 | 2025-01-10 | 北京有竹居网络技术有限公司 | A method, device, electronic device and storage medium for typesetting handouts |
CN113505567B (en) * | 2021-05-25 | 2024-06-07 | 北京北大方正电子有限公司 | Electronic publication file generation method and device |
CN113191132A (en) * | 2021-05-25 | 2021-07-30 | 北京北大方正电子有限公司 | Book typesetting method, device, equipment, storage medium and product |
CN113642295B (en) * | 2021-08-24 | 2023-10-20 | 北京百度网讯科技有限公司 | Page typesetting method, device and computer program product |
-
2023
- 2023-10-24 CN CN202311384093.8A patent/CN117236282B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101470698A (en) * | 2007-12-26 | 2009-07-01 | 北京大学 | Layout method and corresponding system for symbol of sending organizations |
CN116702702A (en) * | 2023-04-14 | 2023-09-05 | 北京雅昌艺术印刷有限公司 | Automatic typesetting method and system based on XML |
Also Published As
Publication number | Publication date |
---|---|
CN117236282A (en) | 2023-12-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7434160B2 (en) | PDF document to PPML template translation | |
US8166037B2 (en) | Semantic reconstruction | |
US20030210428A1 (en) | Non-OCR method for capture of computer filled-in forms | |
US20120311426A1 (en) | Analysis of documents using rules | |
CN105159877B (en) | A kind of across media automatic typesetting systems and its method | |
US20050235202A1 (en) | Automatic graphical layout printing system utilizing parsing and merging of data | |
CN1612136A (en) | Document conversion system, document conversion method | |
CN101206639A (en) | An Indexing Method for Complicated Layout Based on PDF | |
US20120304051A1 (en) | Automation Tool for XML Based Pagination Process | |
CN103777989A (en) | Method and system for generating HTML mark for vision draft source file | |
US20070150494A1 (en) | Method for transformation of an extensible markup language vocabulary to a generic document structure format | |
CN117236282B (en) | Intelligent typesetting method, device, terminal and medium based on XML data | |
Peels et al. | Document architecture and text formatting | |
US9286272B2 (en) | Method for transformation of an extensible markup language vocabulary to a generic document structure format | |
CN106874240A (en) | Digital publishing method and system | |
CN102467496B (en) | Method and device for converting stream mode typeset content into block mode typeset document | |
CN111126007B (en) | HTM L-based medical record document paging algorithm | |
CN117349472B (en) | Index word extraction method, device, terminal and medium based on XML document | |
CN119129529A (en) | PDF document conversion method, device, equipment, storage medium and product | |
CN111222310A (en) | Method and system for inputting and displaying irregular form | |
CN116484833A (en) | Document analysis method and device | |
CN111079385A (en) | Method and device for converting scientific formula format | |
CN116257656A (en) | A Python-based telemetry page format conversion system | |
CN110457659B (en) | Clause document generation method and terminal equipment | |
US20110126091A1 (en) | Information processing apparatus, control method, and program |
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 |