CN104572744B - structured document generation method and device - Google Patents

structured document generation method and device Download PDF

Info

Publication number
CN104572744B
CN104572744B CN201310505440.8A CN201310505440A CN104572744B CN 104572744 B CN104572744 B CN 104572744B CN 201310505440 A CN201310505440 A CN 201310505440A CN 104572744 B CN104572744 B CN 104572744B
Authority
CN
China
Prior art keywords
document
add
style
button
style tags
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.)
Expired - Fee Related
Application number
CN201310505440.8A
Other languages
Chinese (zh)
Other versions
CN104572744A (en
Inventor
杨勇
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.)
New Founder Holdings Development Co ltd
Beijing Founder Electronics Co Ltd
Original Assignee
Peking University Founder Group Co Ltd
Beijing Founder Electronics Co Ltd
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 Peking University Founder Group Co Ltd, Beijing Founder Electronics Co Ltd filed Critical Peking University Founder Group Co Ltd
Priority to CN201310505440.8A priority Critical patent/CN104572744B/en
Publication of CN104572744A publication Critical patent/CN104572744A/en
Application granted granted Critical
Publication of CN104572744B publication Critical patent/CN104572744B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention provides a kind of structured document generation method and device, and wherein method includes: creation Schema file, includes file structure and basic element type in Schema file;Create document template;Add-in button corresponding with style tags is generated in document template according to file structure and basic element type;Document is created according to document template;Style tags are added in a document according to add-in button;Content is added in a document according to style tags, generates structured document, without manually arranging to the format of document, is improved the efficiency for generating structured document, is reduced the error rate of the structured document of generation.

Description

Structured document generation method and device
Technical field
The present invention relates to field of computer technology more particularly to a kind of structured document generation method and devices.
Background technique
In the prior art, in print publishing industry, when publishing house receives a large amount of contributions, since the format of contribution is not united One, publishing house needs first to arrange the format of contribution, obtains structured document, then makes figure according to structured document Book or periodical.
However in the prior art, publishing house causes to arrange by putting into a large amount of manpower come the format of manual sorting contribution The low efficiency of contribution format, error rate are high.
Summary of the invention
The present invention provides a kind of structured document generation method and device, for solving manual sorting contribution in the prior art Low efficiency existing for format, the high problem of error rate.
The first aspect of the invention is to provide a kind of structured document generation method, comprising:
Schema file is created, includes file structure and basic element type in the Schema file;
Create document template;
It is generated in the document template according to the file structure and the basic element type corresponding with style tags Add-in button;
Document is created according to the document template;
Style tags are added within said document according to the add-in button;
Content is added within said document according to the style tags, generates structured document.
Another aspect of the present invention provides a kind of structured document generating means, comprising:
Creation module includes file structure and basic element class in the Schema file for creating Schema file Type;
The creation module is also used to create document template;
Generation module, for being generated in the document template according to the file structure and the basic element type and The corresponding add-in button of style tags;
The creation module is also used to create document according to the document template;
Adding module, for adding style tags within said document according to the add-in button;
The generation module is also used to add content within said document according to the style tags, generates structuring text Shelves.
In the present invention, by according to the file structure and basic element type for including in Schema file in document template Corresponding with style tags add-in button is generated, document is created according to the document template including add-in button, according to adding It carries item button and adds style tags in a document, and add content in a document according to style tags, generate structured document, and It does not need manually to arrange the format of document, improves the efficiency for generating structured document, reduce the structuring of generation The error rate of document.
Detailed description of the invention
Fig. 1 is the flow chart of structured document generation method one embodiment provided by the invention;
Fig. 2 is showing for the add-in button generated in structured document generation method provided by the invention according to style type It is intended to;
Fig. 3 is to add pattern mark in a document according to add-in button in structured document generation method provided by the invention The schematic diagram of label;
Fig. 4 is the structural schematic diagram of structured document generating means one embodiment provided by the invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Fig. 1 is the flow chart of structured document generation method one embodiment provided by the invention, as shown in Figure 1, comprising:
101, Schema file is created, includes file structure and basic element type in Schema file.
Wherein, the executing subject of structured document generation method provided by the invention is structured document generating means.Knot Structure document structure tree device, which is specifically as follows, to be stored in computer for generating the software or system of structured document.
Regular (Schema) is one group of set of rule defined to describe certain a kind of XML document, for one kind XML document carries out constraining and determining its structure, and the file structure for including in Schema file and basic element type are structuring Specification required by books or periodical that document structure tree device is published as needed is created.Schema file uses W3c standard, the entitled XSD of suffix.XSD refers to that XML structure defines (XML Schemas Definition).File structure refers to Positional relationship or ordinal relation between title, a piece, chapter, section in document etc. and title, a piece, chapter, section etc., basic element Type may include: frame-generic element, pattern frame elements, title frame elements, in Reuse element and complex element It is one or more.May include in above-mentioned various elements font, font, font size, whether overstriking, word space, paragraph alignment side The parameters such as formula, line space.
Frame-generic element (ST_NormalFrameElement) refers to the ordinary node in document frame, that is, does not have The node of any attribute.The program that frame-generic element is arranged is as follows:
Pattern frame elements (CT_StyleFrameElement) refer to thering is attribute in document frame, but are not titles The node of element.The program that pattern frame elements are arranged is as follows:
Title frame elements (CT_TitleFrameElement) refer to showing that the element is title in document frame Node, be arranged title frame elements program it is as follows:
Reuse element (CT_DuplicateFrameElement) refers in document frame, must according to title element The element that must repeat is Reuse element, such as " piece " " chapter " " section " etc. in document.The journey of Reuse element is set Sequence is as follows:
Complex element (CT_MixElement) refers to text element, from anywhere in can appearing in document.Mixing All daughter elements under element are content element.The program that complex element is arranged is as follows:
102, document template is created.
103, add-in corresponding with style tags is generated in document template according to file structure and basic element type Button.
Wherein, step 103 can specifically include: determine style type according to file structure and basic element type;According to Style type generates add-in button corresponding with style tags in document template.
For example, can be to have according to the style type of level-one title and the determination of title frame elements in file structure The level-one title of title frame elements, that is, have font, font, font size, whether overstriking, word space, paragraph alignment, in the ranks Level-one title away from equal attributes.It can be as shown in Figure 2 according to the add-in button that style type generates.Style tags are pattern class The specific manifestation form of type in a document, as shown in Figure 3.
It further, can also include: that Schema file is loaded into document template before step 103.
Wherein, program Schema file being loaded into document template are as follows:
104, document is created according to document template.
105, style tags are added according to add-in button in a document.
When structured document generating means generate load corresponding with style tags according to style type in document template After item button, structured document generating means can add style tags in a document according to add-in button, as shown in Figure 3.
106, content is added in a document according to style tags, generate structured document.
Specifically, structured document generating means can write document in editable region according to style tags, Generate structured document.
Content is added in a document according to style tags, after generating structured document, further includes:
Delete the style tags in structured document.
In addition, after structured document generating means delete the style tags in structured document, it can also be according to Schema File verifies structured document.
In the present embodiment, by according to the file structure and basic element type for including in Schema file in document template It is middle to generate add-in button corresponding with style tags, document is created according to including the document template of add-in button, according to Add-in button adds style tags in a document, and adds content in a document according to style tags, generates structured document, Without manually being arranged to the format of document, the efficiency for generating structured document is improved, the structure of generation is reduced Change the error rate of document.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above-mentioned each method embodiment can lead to The relevant hardware of program instruction is crossed to complete.Program above-mentioned can be stored in a computer readable storage medium.The journey When being executed, execution includes the steps that above-mentioned each method embodiment to sequence;And storage medium above-mentioned include: ROM, RAM, magnetic disk or The various media that can store program code such as person's CD.
Fig. 4 is the structural schematic diagram of structured document generating means one embodiment provided by the invention, as shown in figure 4, Include:
Creation module 41 includes file structure and basic element type in Schema file for creating Schema file;
Creation module 41 is also used to create document template;
Generation module 42, for being generated in document template and style tags pair according to file structure and basic element type The add-in button answered;
Creation module 41 is also used to create document according to document template;
Adding module 43, for adding style tags in a document according to add-in button;
Generation module 42 is also used to add content in a document according to style tags, generates structured document.
Wherein, basic element type includes: frame-generic element, pattern frame elements, title frame elements, Reuse One of element and complex element are a variety of.
Further, generation module 42 generates and pattern mark according to file structure and basic element type in document template It signs in corresponding add-in button, generation module 42 is specifically used for,
Style type is determined according to file structure and basic element type;
Add-in button corresponding with style tags is generated in document template according to style type.
Further, structured document generating means can also include: loading module;
Loading module is used for, generation module 42 according to file structure and basic element type generated in document template with Before the corresponding add-in button of style tags, Schema file is loaded into document template.
Still further, structured document generating means can also include: removing module;
Removing module is used for, and generation module 42 adds content according to style tags in a document, generate structured document it Afterwards, the style tags in structured document are deleted.
Wherein, after removing module deletes the style tags in structured document, structured document generating means can be with root Structured document is verified according to Schema file.
In the present embodiment, by according to the file structure and basic element type for including in Schema file in document template It is middle to generate add-in button corresponding with style tags, document is created according to including the document template of add-in button, according to Add-in button adds style tags in a document, and adds content in a document according to style tags, generates structured document, Without manually being arranged to the format of document, the efficiency for generating structured document is improved, the structure of generation is reduced Change the error rate of document.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent Pipe present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: its according to So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into Row equivalent replacement;And these are modified or replaceed, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution The range of scheme.

Claims (6)

1. a kind of structured document generation method characterized by comprising
Schema file is created, includes file structure and basic element type in the Schema file;
Create document template;
Add corresponding with style tags is generated in the document template according to the file structure and the basic element type Carry item button;
Document is created according to the document template;
Style tags are added within said document according to the add-in button;
Content is added within said document according to the style tags, generates structured document;
Wherein, described to be generated in the document template according to the file structure and the basic element type and style tags Corresponding add-in button, comprising:
Style type is determined according to the file structure and the basic element type;
Add-in button corresponding with style tags is generated in the document template according to the style type;
It is described to add content within said document according to the style tags, after generating structured document, further includes:
Delete the style tags in the structured document.
2. the method according to claim 1, wherein described according to the file structure and the basic element class Type is generated in the document template before add-in button corresponding with style tags, further includes:
The Schema file is loaded into the document template.
3. method according to claim 1 or 2, which is characterized in that the basic element type includes: frame-generic member Element, pattern frame elements, title frame elements, one of Reuse element and complex element or a variety of.
4. a kind of structured document generating means characterized by comprising
Creation module includes file structure and basic element type in the Schema file for creating Schema file;
The creation module is also used to create document template;
Generation module, for being generated in the document template according to the file structure and the basic element type and pattern The corresponding add-in button of label;
The creation module is also used to create document according to the document template;
Adding module, for adding style tags within said document according to the add-in button;
The generation module is also used to add content within said document according to the style tags, generates structured document;
Wherein, the generation module according to the file structure and the basic element type generated in the document template with In the corresponding add-in button of style tags, the generation module is specifically used for,
Style type is determined according to the file structure and the basic element type;
Add-in button corresponding with style tags is generated in the document template according to the style type;
Described device further include: removing module;
The removing module is used for, and the generation module adds content according to the style tags within said document, generates knot After structure document, the style tags in the structured document are deleted.
5. device according to claim 4, which is characterized in that further include: loading module;
The loading module is used for, in the generation module according to the file structure and the basic element type in the text Before generating add-in button corresponding with style tags in shelves template, the Schema file is loaded into the document template In.
6. device according to claim 4 or 5, which is characterized in that the basic element type includes: frame-generic member Element, pattern frame elements, title frame elements, one of Reuse element and complex element or a variety of.
CN201310505440.8A 2013-10-23 2013-10-23 structured document generation method and device Expired - Fee Related CN104572744B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310505440.8A CN104572744B (en) 2013-10-23 2013-10-23 structured document generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310505440.8A CN104572744B (en) 2013-10-23 2013-10-23 structured document generation method and device

Publications (2)

Publication Number Publication Date
CN104572744A CN104572744A (en) 2015-04-29
CN104572744B true CN104572744B (en) 2018-12-25

Family

ID=53088826

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310505440.8A Expired - Fee Related CN104572744B (en) 2013-10-23 2013-10-23 structured document generation method and device

Country Status (1)

Country Link
CN (1) CN104572744B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109284492B (en) * 2017-07-19 2023-08-25 北京国双科技有限公司 Method and device for generating notification document
CN107622087B (en) * 2017-08-17 2024-03-22 珠海云游道科技有限责任公司 Document management apparatus and method convenient for user operation
CN108170656B (en) * 2017-12-28 2021-09-07 创新先进技术有限公司 Template creating method, document creating method, rendering method and rendering device
CN111259202B (en) * 2020-01-10 2023-08-04 西宁宁光工程咨询有限公司 Document structured data embedding method and system
CN112733515B (en) * 2020-12-31 2022-11-11 贝壳技术有限公司 Text generation method and device, electronic equipment and readable storage medium
CN113435167A (en) * 2021-07-21 2021-09-24 北京国基科技股份有限公司 Document generation method and device for assisting technical state file

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100627587B1 (en) * 2004-05-14 2006-09-25 김영근 Method for generating an xml document on a web-browser
US7818662B2 (en) * 2005-11-04 2010-10-19 Microsoft Corporation Integrating line-of-business application data with documents
US7991799B2 (en) * 2006-06-05 2011-08-02 International Business Machines Corporation Schema specific parser generation
CN102103573B (en) * 2009-12-17 2012-10-03 北大方正集团有限公司 Method and system for quickly generating files in open formats
CN102103591B (en) * 2009-12-18 2014-04-16 北大方正集团有限公司 Method and system for realizing automatic update of document contents by using structural data
CN102270224B (en) * 2011-06-28 2013-04-24 用友软件股份有限公司 Information system data output device and method
CN102982010B (en) * 2011-09-02 2016-06-22 北大方正集团有限公司 The method and apparatus extracting file structure

Also Published As

Publication number Publication date
CN104572744A (en) 2015-04-29

Similar Documents

Publication Publication Date Title
CN104572744B (en) structured document generation method and device
CN101025738B (en) Template-free dynamic website generating method
CN102982010B (en) The method and apparatus extracting file structure
US20100241948A1 (en) Overriding XSLT Generation
CN103123631B (en) The generation of official documents and correspondence, the methods of exhibiting of webpage official documents and correspondence, device and Website server
US8112447B2 (en) System and method for parsing a text file
CN105760290B (en) The problem of being tested based on webpage front-end localization method and relevant apparatus, system
US20150185994A1 (en) Local Rendering of an Object as an Image
US7962919B2 (en) Apparatus and method for modifying an initial event queue for extending an XML processor's feature set
CN102201009A (en) Form generating method and device
CN105095160A (en) Document conversion reading method and system
CN101504662A (en) Data conversion method and apparatus
JP2005518027A5 (en)
CN103559184A (en) Form page display method and device
CN101685447A (en) Method and system for processing CSS in segment cut and mesh-up of Web page
CN103440198A (en) Method for calibrating form
CN102207975A (en) Method for manufacturing and displaying extensive makeup language (xml) data module based on ietm standard
CN104346407B (en) Form and the method and its device of XML file data interaction in data reporting system
CN105190596A (en) Automated composition evaluator
US9189464B2 (en) Method and system for XML multi-transform
CN106557454A (en) Conversion method and converting system of the document to form
US7730388B2 (en) Converting an enhanced metafile into a chronologically independent object property list for conversion into a PDF document
CN102306163A (en) Dynamic integration technology based on B2B (business to business) platform
CN109710224A (en) Page processing method, device, equipment and storage medium
US8082496B1 (en) Producing a set of operations from an output description

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220621

Address after: 3007, Hengqin international financial center building, No. 58, Huajin street, Hengqin new area, Zhuhai, Guangdong 519031

Patentee after: New founder holdings development Co.,Ltd.

Patentee after: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

Address before: 100871, Beijing, Haidian District, Cheng Fu Road, No. 298, Zhongguancun Fangzheng building, 9 floor

Patentee before: PEKING UNIVERSITY FOUNDER GROUP Co.,Ltd.

Patentee before: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20181225