CN117131843A - Method, device, equipment and storage medium for editing XML file obtained by seeing - Google Patents

Method, device, equipment and storage medium for editing XML file obtained by seeing Download PDF

Info

Publication number
CN117131843A
CN117131843A CN202310971449.1A CN202310971449A CN117131843A CN 117131843 A CN117131843 A CN 117131843A CN 202310971449 A CN202310971449 A CN 202310971449A CN 117131843 A CN117131843 A CN 117131843A
Authority
CN
China
Prior art keywords
file
xml file
editing
xsd
xml
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.)
Pending
Application number
CN202310971449.1A
Other languages
Chinese (zh)
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.)
China Electronics Technology Changjiang Data Co ltd
Original Assignee
China Electronics Technology Changjiang Data 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 China Electronics Technology Changjiang Data Co ltd filed Critical China Electronics Technology Changjiang Data Co ltd
Priority to CN202310971449.1A priority Critical patent/CN117131843A/en
Publication of CN117131843A publication Critical patent/CN117131843A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/14Tree-structured documents

Abstract

The invention provides a method, a device, equipment and a storage medium for editing a visible and instant XML file, wherein the method comprises the following steps: dynamically loading an XSL style file corresponding to the XML file, and compiling the XSL style file according to a target PDF sample and an XSD rule corresponding to the XML file; and rendering the real-time style of the XML file according to the XSL style file to obtain a visual page consistent with the style of the target PDF sample, and displaying the visual page in a content editing window, wherein the content editing window is used for a user to edit tag content in the XML file based on the visual page. According to the invention, the user is mainly focused on content modification, the professional technical requirement on the user is reduced, and the problem that the final PDF style does not meet the expected requirement and needs to be modified again is avoided, so that the editing workload is reduced, and the editing efficiency is improved.

Description

Method, device, equipment and storage medium for editing XML file obtained by seeing
Technical Field
The invention relates to the technical field of electronic manual editing, in particular to a method, a device, equipment and a storage medium for editing an XML file obtained immediately after being seen.
Background
Electronic interactive handbooks are used in the industry fields of airplanes, automobiles, large-scale electronic equipment and the like, standard rules of the handbooks are followed, such as S1000D, airbus FlightOps XML Exchange, boeing FTID, ATA iSpec 2300 and the like, XML files are edited, and PDF is finally generated and released. However, the current XML file editing method has higher professional technical requirements on users, cannot intuitively display the final style in the editing process, and easily generates the problem that the final PDF style does not meet the expected requirements and needs to be modified again, so that the editing workload is large and the editing efficiency is low.
Disclosure of Invention
The invention mainly aims to provide a method, a device, equipment and a storage medium for editing an XML file obtained immediately after being seen, and aims to solve the technical problems of large editing workload and low editing efficiency of an XML file editing method in the prior art.
In a first aspect, the present invention provides an XML file view-ready editing method, the XML file view-ready editing method including:
dynamically loading an XSL style file corresponding to an XML file, wherein the XSL style file is compiled according to a target PDF sample and an XSD rule corresponding to the XML file;
and performing real-time style rendering on the XML file according to the XSL style file to obtain a visual page consistent with the target PDF sample style, and displaying the visual page in a content editing window, wherein the content editing window is used for a user to edit tag content in the XML file based on the visual page.
Further, in an embodiment, before the step of dynamically loading the XSL style file corresponding to the XML file, the method further includes:
determining XSD rules of the XML file;
and respectively setting CSS styles for each label under the XSD rule according to the target PDF sample, so as to obtain an XSL style file.
Further, in an embodiment, the step of performing real-time style rendering on the XML file according to the XSL style file includes:
traversing the tags in the XML file;
and performing real-time style rendering on the XML file according to the CSS styles set for each tag in the XSL style file.
Further, in an embodiment, the method for editing the XML file what you see is what you get further includes:
dynamically loading an XSD rule file corresponding to the XML file;
and carrying out real-time rule verification on the tag content of the XML file according to the XSD rule file, obtaining error information and displaying the error information.
Further, in an embodiment, after the step of dynamically loading the XSD rule file corresponding to the XML file, the method further includes:
and obtaining a tag hierarchical structure of the XML file according to the XSD rule file, and displaying the tag hierarchical structure in a tag editing window, wherein the tag editing window is used for a user to edit tags in the XML file based on the tag hierarchical structure.
Further, in an embodiment, the name of the XSL style file is set in association with the name of the corresponding XSD rule;
before the step of dynamically loading the XSL style file corresponding to the XML file, the method further comprises:
acquiring names of XSD rules referenced by XML files;
and determining an XSD rule file and an XSL style file to be loaded according to the names of the XSD rules.
Further, in an embodiment, the XSL style file and the XSD rule file corresponding thereto are disposed in the same storage path.
In a second aspect, the present invention also provides an XML file view-ready editing apparatus, the XML file view-ready editing apparatus comprising:
the dynamic loading module is used for dynamically loading an XSL style file corresponding to the XML file, and the XSL style file is compiled according to a target PDF sample and an XSD rule corresponding to the XML file;
the first editing module is used for conducting real-time style rendering on the XML file according to the XSL style file, obtaining a visual page consistent with the target PDF sample style, and displaying the visual page in a content editing window, wherein the content editing window is used for a user to edit tag content in the XML file based on the visual page.
In a third aspect, the present invention also provides an XML file view-finding editing apparatus, the XML file view-finding editing apparatus including a processor, a memory, and an XML file view-finding editing program stored on the memory and executable by the processor, wherein the XML file view-finding editing program, when executed by the processor, implements the steps of the above-described XML file view-finding editing method.
In a fourth aspect, the present invention further provides a storage medium, where an XML file what you get editing program is stored on the storage medium, where when the XML file what you get editing program is executed by a processor, the steps of the above described XML file what you get editing method are implemented.
In the invention, an XSL style file corresponding to an XML file is dynamically loaded, and the XSL style file is compiled according to a target PDF sample and an XSD rule corresponding to the XML file; and rendering the real-time style of the XML file according to the XSL style file to obtain a visual page consistent with the style of the target PDF sample, and displaying the visual page in a content editing window, wherein the content editing window is used for a user to edit tag content in the XML file based on the visual page. The target PDF sample is a style of a PDF manual which is expected by a user and is used as a reference target when an XSL style file is written. According to the invention, the user is mainly focused on content modification, the professional technical requirement on the user is reduced, and the problem that the final PDF style does not meet the expected requirement and needs to be modified again is avoided, so that the editing workload is reduced, and the editing efficiency is improved.
Drawings
FIG. 1 is a flow chart of a method for editing XML files in accordance with an embodiment of the present invention;
FIG. 2 is a schematic diagram of an XML editor in accordance with one embodiment of the invention;
FIG. 3 is a schematic diagram of a tag hierarchy of an XML file according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating the operation of editing a tag based on the tag hierarchy of FIG. 3;
fig. 5 is a schematic hardware structure of an XML file view-ready editing apparatus according to an embodiment of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In a first aspect, an embodiment of the present invention provides a method for editing what you see is what you get of an XML file.
FIG. 1 is a flow chart of a method for editing a XML file.
Referring to FIG. 1, in one embodiment, the method of editing a XML file what you see is what you get includes the steps of:
s11, dynamically loading an XSL style file corresponding to the XML file, and compiling the XSL style file according to the target PDF sample and an XSD rule corresponding to the XML file;
XML is an extensible markup language (EXtensible Markup Language), which is a simple data storage language. XSL is an extensible style sheet language (EXtensible Stylesheet Language), a language used to render XML data in a readable format. XSD is an XML structure definition (XML Schemas Definition), and XSD rules describe the structure of an XML file. The whole structure of XML is built on top of tags, where tag content refers to the part between the start tag and the end tag, e.g., < title > first part </title >, "first part" is the content of the title tag.
In this embodiment, the target PDF sample is a style of a PDF manual desired by the user, and is used as a reference target when writing an XSL style file. For example, if the object PDF sample specifies that the content of the title tag in the XML file needs to be coarsened, a corresponding template needs to be defined when the XSL style file is composed, and the template functions to add a bold attribute to the content of the title tag. The XSD rules function during the XSL style document authoring process to specify which tags appear in the XML document, thereby determining which tags are to be defined in the XSL style document. After the XSL style file corresponding to the XML file is determined, the editor dynamically loads the XSL style file, and automatically calls the XSL style file when needed without manual call of a user.
And S12, performing real-time style rendering on the XML file according to the XSL style file to obtain a visual page consistent with the target PDF sample style, and displaying the visual page in a content editing window, wherein the content editing window is used for a user to edit tag content in the XML file based on the visual page.
FIG. 2 shows a schematic diagram of an XML editor in an embodiment of the invention.
Referring to fig. 2, in this embodiment, the content editing window displays a visualized page of the XML file after style rendering, instead of the source code of the XML file, and does not include information such as a tag. The visual page is consistent with the style of the target PDF sample, and meets the style requirement of a user on a PDF manual. For example, < title > first portion </title > is displayed as a bolded "first portion" in the visual page. The user modifies a certain text in the visual page, and the modified text is used as new content under the corresponding label and fed back to the source code of the XML file. For example, the user modifies the "first part" of the coarsening process in the visual page to "notice" which will be the new content of the title tag, the source code of the XML file being updated to < title > notice >. Therefore, the user does not need to determine the label corresponding to the content to be modified first, and then modify the content under the label in the source code of the XML file.
Therefore, through the embodiment, the user mainly focuses on content modification, the professional technical requirement on the user is reduced, and the problem that the final PDF style does not meet the expected requirement and needs to be modified again is avoided, so that the editing workload is reduced, and the editing efficiency is improved.
Further, in an embodiment, before the step of dynamically loading the XSL style file corresponding to the XML file, the method further includes:
determining XSD rules of the XML file;
and respectively setting CSS styles for each label under the XSD rule according to the target PDF sample, so as to obtain an XSL style file.
CSS is a cascading style sheet (Cascading Style Sheets), a style sheet language that describes the presentation of HTML or XML documents.
In this embodiment, the XSD rule of the XML file is determined first, so that the tags that need to be defined in the XSL style file can be determined. Specifically, for a tag, < xsl: template= "tag name" >, for a tag attribute, < xsl: wsen test= "@ attribute name=' attribute value" >, is defined. And setting a CSS style designated by a user on the tag by combining the target PDF sample provided by the user to obtain an XSL style file. The CSS style is used to make tag contents in an XML file laid out in a specified style.
It should be noted that, the XSL style file may not only enable the edited content to be displayed in PDF format, but also include PDF specific information, such as hyperlinks or bookmarks. Content and other pre-embedded forms may be automatically generated. Specifically, page size, header attribute, footer attribute, edit content, page type, font type, color, label, form border type, form merge, etc.
The writing of XSL style files is described below in some examples:
example 1 for directly reading the content of an XML tag, no style-processed templates are required:
in this example, by defining a template, the match defines the label para, and the content of the para label is displayed directly using < xsl: apply-templates/>.
Example 2, for reading the content of the XML tag, a template for style processing is also required:
in this example, by defining a template, the match defines a title of the tag, and when the title tag is encountered in the XML file, the template is automatically applied, the fo is used to add a bold attribute to the content of the title tag, and the thickening process is performed on the content.
Example 3, templates for selecting colors of tag content according to tag attributes:
in this example, by defining a template, when a displaypositiontitle tag is encountered in the match definition tag dispatchConditionTitle, XML file, the template is automatically applied. The displaypositionTitle tag has a priority level attribute, and the values of the priority level attribute include 'CAUTION', 'WARNING', 'STATUS'. When the value of the priority level attribute is 'route', the font color of the corresponding content is set to "#ff8c00". When the value of the priority level attribute is 'WARNING', setting the font color of the corresponding content to "# FFFFFF"; when the value of the priority level attribute is 'STATUS', the font color of the corresponding content is set to "#00FEF5".
Example 4, form template settings:
in this example, by defining a template, the match definition tag "dispatchCondition", the template is automatically applied when a dispatchCondition tag is encountered in the XML file. Creating a table setting table style, and setting the text position as centering through fo: table-row setting table content, < fo: table-row text-align= "center". The content of each column of the first row is directly written into the fo table-cell label as fixed content 'repair deadline category', and the content of each column of the second row is set to be filled by xsl value-of reading the value of the repairainterval attribute under the dispatchCondition label.
Example 5, picture template settings:
in this example, by defining a template, the match defines the tag "symbol", which is automatically applied when the symbol tag is encountered in the XML file. A local variable url is declared by xsl: variable and the path is obtained by xsl: value-of. Finally, introducing the picture through fo, and setting the width and height of the picture through content-width, content-height.
Example 6 hyperlink template settings:
in this example, by defining a template, the match definition tag "dmRefIdent" will automatically apply when the dmRefIdent tag is encountered in the XML file. And obtaining the hyperlink attribute content through xsl: value-of, and finally setting an underline for the hyperlink attribute content through fo: inline, wherein the color is blue.
Further, in an embodiment, the step of performing real-time style rendering on the XML file according to the XSL style file includes:
traversing tags in the XML file;
and performing real-time style rendering on the XML file according to the CSS style set for each tag in the XSL style file.
Specifically, the XML file is tag-located using the Xpath and the XML data is formatted via fo. For example, by defining a template, when a title label is encountered in an XML file, the template is automatically applied, a bold attribute is added to the content of the title label by fo, and the content is coarsened.
Further, in an embodiment, the method for editing the XML file what you see is what you get further includes:
dynamically loading an XSD rule file corresponding to the XML file;
and carrying out real-time rule verification on the tag content of the XML file according to the XSD rule file, obtaining error information and displaying the error information.
The user may verify an XML document with a specified XSD rule file to check whether the XML document complies with manual standard rules, such as S1000D, airbus FlightOps XML Exchange, boeing FTID, ATAiSpec 2300, etc. The XSD rule file will define the elements that appear in the XML file, the attributes that appear in the document, the sub-elements, the number of sub-elements, the order of the sub-elements, whether the elements are null, the data type of the elements and attributes, the default and fixed values of the elements or attributes. Where an element refers to a portion from (and including) a start tag to (and including) an end tag.
In this embodiment, after determining the XSD rule file corresponding to the XML file, the editor dynamically loads the XSD rule file, and automatically calls the XSD rule file when needed, without requiring manual call by the user. After the user edits the tag content in the content editing page, the new content does not necessarily conform to the XSD rules. For example, the content of the tag under XSD rules can only be numbers, while the user enters chinese. And obtaining and displaying error information through real-time rule verification of label content, thereby ensuring the correctness of the XML file.
FIG. 3 is a schematic diagram showing a tag hierarchy of an XML file in an embodiment of the present invention; fig. 4 shows a schematic diagram of an operation of editing a tag based on the tag hierarchy in fig. 3.
Further, in an embodiment, after the step of dynamically loading the XSD rule file corresponding to the XML file, the method further includes:
and obtaining a tag hierarchical structure of the XML file according to the XSD rule file, and displaying the tag hierarchical structure in a tag editing window, wherein the tag editing window is used for a user to edit tags in the XML file based on the tag hierarchical structure.
Referring to fig. 2, in this embodiment, the XML editor further includes a tag editing window, where the tag editing window displays a tag hierarchy of the XML file under the XSD rule. The content editing window mentioned above is for editing the content of the existing label, and for editing the label, for example, adding or deleting the label, modifying the label attribute, etc., the user is provided with the operation through the label editing window. Under the constraint of the XSD rule, the label operation options provided for the user by the label editing window are all correct options conforming to the XSD rule, so that the correctness of the XML file is ensured.
For example, one XSD rule defines a systemDescription tag under which a title tag and a subLevel tag are allowed, under which a title tag and a description tag are allowed, under which a para tag and a figure tag are allowed, under which a title tag and a graphic tag are allowed. The tag hierarchy of some XML file that references the XSD rule refers to FIG. 3. Referring to fig. 4, if there is a new addition of an element, the parent tag right key is selected, the "insert element" is selected, and if the child tag is allowed to be inserted under the parent tag under the XSD rule, all the allowed child tags are listed for the user to select for insertion.
Further, in an embodiment, the name of the XSL style file is associated with the name of its corresponding XSD rule.
Before the step of dynamically loading the XSL style file corresponding to the XML file, the method further comprises:
acquiring names of XSD rules referenced by XML files;
and determining the XSD rule file and the XSL style file to be loaded according to the names of the XSD rules.
In this embodiment, for the same user, only one target PDF sample is provided for one XSD rule, so as to obtain one XSL style file, i.e., there is a one-to-one correspondence between the XSD rule and the XSL style file. Therefore, by setting the name of the XSL style file and the name of the XSD rule in a correlated manner, the editor can acquire the name of the XSD rule referenced by the XML file when opening the XML file, so that the XSD rule file and the XSL style file to be loaded can be rapidly determined, manual specification of a user is not needed, and convenience of operation is ensured.
Further, in an embodiment, the XSL style file and the XSD rule file corresponding thereto are disposed in the same storage path.
In this embodiment, the user sets a storage path of each XSD rule file in the editor in advance, and sets the XSL style file and the XSD rule file corresponding to the XSD rule file in the same storage path, so that the editor can conveniently and quickly search the XSD rule file and the XSL style file corresponding to the XSD rule file through the set storage path of the XSD rule file, and the searching speed is improved.
In a second aspect, the embodiment of the invention also provides a device for editing the XML file.
In one embodiment, the XML file WYSIWYG editing apparatus comprises:
the dynamic loading module is used for dynamically loading the XSL style file corresponding to the XML file, and the XSL style file is compiled according to the target PDF sample and the XSD rule corresponding to the XML file;
the first editing module is used for conducting real-time style rendering on the XML file according to the XSL style file, obtaining a visual page consistent with the target PDF sample style, and displaying the visual page in a content editing window, wherein the content editing window is used for a user to edit tag content in the XML file based on the visual page.
Further, in an embodiment, the device for editing the XML file what you see is what you get further includes a writing module configured to:
determining XSD rules of the XML file;
and respectively setting CSS styles for each label under the XSD rule according to the target PDF sample, so as to obtain an XSL style file.
Further, in an embodiment, the first editing module is configured to:
traversing tags in the XML file;
and performing real-time style rendering on the XML file according to the CSS style set for each tag in the XSL style file.
Further, in an embodiment, the dynamic loading module is further configured to dynamically load an XSD rule file corresponding to the XML file;
the XML file what you see is what you get editing device also includes the rule check module, is used for:
and carrying out real-time rule verification on the tag content of the XML file according to the XSD rule file, obtaining error information and displaying the error information.
Further, in an embodiment, the device for editing the XML file what you see is what you get further includes a second editing module configured to:
and obtaining a tag hierarchical structure of the XML file according to the XSD rule file, and displaying the tag hierarchical structure in a tag editing window, wherein the tag editing window is used for a user to edit tags in the XML file based on the tag hierarchical structure.
Further, in an embodiment, the name of the XSL style file is set in association with the name of the corresponding XSD rule;
the XML file what you see is what you get editing apparatus further includes a determination module for:
acquiring names of XSD rules referenced by XML files;
and determining the XSD rule file and the XSL style file to be loaded according to the names of the XSD rules.
Further, in an embodiment, the XSL style file and the XSD rule file corresponding thereto are disposed in the same storage path.
The function implementation of each module in the obtained editing device seen by the XML file corresponds to each step in the obtained editing method embodiment seen by the XML file, and the function and implementation process thereof are not described in detail herein.
In a third aspect, an embodiment of the present invention provides an XML file view-ready editing apparatus, which may be an apparatus having a data processing function, such as a personal computer (personal computer, PC), a notebook computer, a server, or the like.
Fig. 5 is a schematic diagram showing a hardware structure of the device for editing the XML file what is seen and obtained in an embodiment of the present invention.
Referring to fig. 5, in an embodiment of the present invention, the XML file view-ready editing apparatus may include a processor 1001 (e.g., central processor Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein the communication bus 1002 is used to enable connected communications between these components; the user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard); the network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., WIreless-FIdelity, WI-FI interface); the memory 1005 may be a high-speed random access memory (random access memory, RAM) or a stable memory (non-volatile memory), such as a disk memory, and the memory 1005 may alternatively be a storage device independent of the processor 1001. Those skilled in the art will appreciate that the hardware configuration shown in fig. 5 is not limiting of the invention and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
With continued reference to fig. 5, an operating system, a network communication module, a user interface module, and an XML file may be included in the memory 1005, which is one type of computer storage medium in fig. 5. The processor 1001 may call the obtained editing program of the XML file stored in the memory 1005, and execute the obtained editing method of the XML file provided by the embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a storage medium.
The storage medium of the invention stores the XML file obtained-from-see editing program, wherein the XML file obtained-from-see editing program realizes the steps of the XML file obtained-from-see editing method when being executed by a processor.
The method implemented when the XML file what you see is what you get editing program is executed may refer to various embodiments of the XML file what you get editing method of the present invention, which are not described herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising several instructions for causing a terminal device to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. The method for editing the XML file obtained by looking at the instant, is characterized by comprising the following steps of:
dynamically loading an XSL style file corresponding to an XML file, wherein the XSL style file is compiled according to a target PDF sample and an XSD rule corresponding to the XML file;
and performing real-time style rendering on the XML file according to the XSL style file to obtain a visual page consistent with the target PDF sample style, and displaying the visual page in a content editing window, wherein the content editing window is used for a user to edit tag content in the XML file based on the visual page.
2. The method for editing what you see is what you get of an XML file according to claim 1, wherein before the step of dynamically loading the XSL style file corresponding to the XML file, further comprises:
determining XSD rules of the XML file;
and respectively setting CSS styles for each label under the XSD rule according to the target PDF sample, so as to obtain an XSL style file.
3. The method for editing what-you-see-is-what-you-get of an XML file according to claim 2, wherein said step of rendering real-time styles of the XML file according to the XSL style file comprises:
traversing the tags in the XML file;
and performing real-time style rendering on the XML file according to the CSS styles set for each tag in the XSL style file.
4. A method of editing a view of an XML file according to any one of claims 1 to 3, wherein the method of editing a view of an XML file further comprises:
dynamically loading an XSD rule file corresponding to the XML file;
and carrying out real-time rule verification on the tag content of the XML file according to the XSD rule file, obtaining error information and displaying the error information.
5. The method for editing what you see is what you get of an XML file according to claim 4, wherein after the step of dynamically loading the XSD rule file corresponding to the XML file, further comprising:
and obtaining a tag hierarchical structure of the XML file according to the XSD rule file, and displaying the tag hierarchical structure in a tag editing window, wherein the tag editing window is used for a user to edit tags in the XML file based on the tag hierarchical structure.
6. The method for editing what you see is what you get of an XML file according to claim 4, wherein the name of the XSL style file is set in association with the name of its corresponding XSD rule;
before the step of dynamically loading the XSL style file corresponding to the XML file, the method further comprises:
acquiring names of XSD rules referenced by XML files;
and determining an XSD rule file and an XSL style file to be loaded according to the names of the XSD rules.
7. The method of claim 4, wherein the XSL style file and the corresponding XSD rule file are located in the same storage path.
8. A device for editing an XML document by what you see is, comprising:
the dynamic loading module is used for dynamically loading an XSL style file corresponding to the XML file, and the XSL style file is compiled according to a target PDF sample and an XSD rule corresponding to the XML file;
the first editing module is used for conducting real-time style rendering on the XML file according to the XSL style file, obtaining a visual page consistent with the target PDF sample style, and displaying the visual page in a content editing window, wherein the content editing window is used for a user to edit tag content in the XML file based on the visual page.
9. A device for editing an XML file on demand, characterized in that the device for editing an XML file on demand comprises a processor, a memory, and an XML file on demand editing program stored on the memory and executable by the processor, wherein the method for editing an XML file on demand is realized when the XML file on demand editing program is executed by the processor.
10. A storage medium having stored thereon an XML file view-finding editing program, wherein the XML file view-finding editing program, when executed by a processor, implements the steps of the XML file view-finding editing method of any one of claims 1 to 7.
CN202310971449.1A 2023-08-03 2023-08-03 Method, device, equipment and storage medium for editing XML file obtained by seeing Pending CN117131843A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310971449.1A CN117131843A (en) 2023-08-03 2023-08-03 Method, device, equipment and storage medium for editing XML file obtained by seeing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310971449.1A CN117131843A (en) 2023-08-03 2023-08-03 Method, device, equipment and storage medium for editing XML file obtained by seeing

Publications (1)

Publication Number Publication Date
CN117131843A true CN117131843A (en) 2023-11-28

Family

ID=88853689

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310971449.1A Pending CN117131843A (en) 2023-08-03 2023-08-03 Method, device, equipment and storage medium for editing XML file obtained by seeing

Country Status (1)

Country Link
CN (1) CN117131843A (en)

Similar Documents

Publication Publication Date Title
US8484553B2 (en) System and method for defining specifications for outputting content in multiple formats
US6799299B1 (en) Method and apparatus for creating stylesheets in a data processing system
US7617450B2 (en) Method, system, and computer-readable medium for creating, inserting, and reusing document parts in an electronic document
EP1166214B1 (en) Method and apparatus for generating structured documents for various presentations
US7080083B2 (en) Extensible stylesheet designs in visual graphic environments
JP4344693B2 (en) System and method for browser document editing
CN1794231B (en) Context-free document portions with alternate formats
US9110877B2 (en) Method and apparatus for utilizing an extensible markup language schema for managing specific types of content in an electronic document
EP1376387A2 (en) Word-processing document stored in a single XML file
US20050160359A1 (en) Method and system for automating creation of multiple stylesheet formats using an integrated visual design environment
US20090089696A1 (en) Graphical creation of a document conversion template
US20130185632A1 (en) Generating variable document templates
US20070240032A1 (en) Method and system for vertical acquisition of data from HTML tables
EP1393205A2 (en) Improvements relating to developing documents
US7475337B1 (en) Generating structured documents by associating document elements in a first display with displayed document type definitions in a second display
WO2007030695A1 (en) Methods and systems for providing direct style sheet editing
US20090083300A1 (en) Document processing device and document processing method
US9298675B2 (en) Smart document import
EP1830274A1 (en) Server device and name space issuing method
US20080141112A1 (en) Document Processing Device and Document Processing Method
EP1837776A1 (en) Document processing device and document processing method
US20090287994A1 (en) Document processing device and document processing method
CN115309476A (en) Browser-based ofd file display and editing method
CN117131843A (en) Method, device, equipment and storage medium for editing XML file obtained by seeing
EP1744271A1 (en) Document processing device

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