Embodiment
Below with reference to the accompanying drawings and in conjunction with the embodiments, describe the present invention in detail.Referring to Fig. 1, comprise the following steps:
S11: receive the output environment that the user determines;
S12: the format conversion of the structured content of examination question being carried out corresponding described output environment; Wherein, described structured content comprises one of following at least: exercise question, stem, answer, option, parsing;
S13: the examination question after output format conversion under described output environment.
By the step in embodiment, can after the user is determining output environment, after the format conversion of structured content according to output environment, export corresponding examination question.The examination question of multiple format can be exported simultaneously according to the output environment that the user determines, has effectively improved the efficient of output examination question.
Preferably, described structured content obtains by following steps:
Create the index masterplate according to described structured content; By the index masterplate, the content in examination question is added label, form described structured content.
Examination question is carried out structurized process, need to be pre-created the index masterplate of xml form.The index masterplate can be according to the structure setting of examination question.Such as: generally contain the various pieces such as exercise question, crosshead order, stem, answer, option, parsing in examination question, in options, comprise again option A, option B etc., following index masterplate can be set:
<xs:element name=" exercise question " type=" CT_Question "/〉
<xs:element name=" crosshead order " type=" CT_SubQuestion "/〉
<xs:element name=" option-A " type=" CT_Any "/〉
<xs:element name=" option-B " type=" CT_Any "/〉
<xs:element name=" option-C " type=" CT_Any "/〉
<xs:element name=" option-D " type=" CT_Any "/〉
<xs:element name=" option-E " type=" CT_Any "/〉
<xs:element name=" option-F " type=" CT_Any "/〉
<xs:element name=" answer " type=" CT_Any "/〉
<xs:element name=" parsing " type=" CT_Any "/〉
By above-mentioned setting, can form the index panel that contains above-mentioned setting as shown in Figure 2.
Based on index panel in Fig. 2, the content in examination question is carried out index.The process of index can be in the following ways, for example: click " exercise question " on the index panel, to the item content index in examination question.The result of the screenshot capture after formation index as shown in Figure 3.Between two labels " exercise question ", be the content of exercise question.Between two labels " answer ", be the content of answer.
According to the index panel to content index in examination question after, form structured content.It is one of following that structured content comprises at least: exercise question, stem, answer, option, parsing.Following code has shown the structured content of partial indexing:
In above-mentioned code, structured content " exercise question " and " answer " have been shown.
Preferably, structured content can be the xml form, and the format conversion with structured content is the form of output environment in the following manner.
Referring to Fig. 4, comprise the following steps:
S21: according to the node of the structured content of the xml form of nodename traversal tree structure; Wherein, described nodename is exercise question, stem, answer, option or parsing;
S22: in recording the xlt masterplate of described format conversion relation, search the node identical with the nodename of current traversal;
S23: with the described structured content of the node of described traversal, according to the format conversion of the described node of searching in the xlt masterplate.
By above-mentioned steps, can be with the content of the node of the structured content format conversion according to same node point title the inside record in the xlt masterplate.Such as: the structured content of xml form is converted to html form, word form or pdf form etc.
Preferably, the form of the structured content after described format conversion comprises one of following at least: PDF, epub, txt, png, PSD, jpg, word, flash.
Preferably, can be every kind of output environment and make respectively the xlt masterplate, also each masterplate can be gathered together, according to user's selection, the structured content after output format is changed respectively.
Preferably, when being the terminal of browse network for output environment, the structured content of xml form can be generated Txt, Png picture two parts form, the content of Txt form is mainly carried out the retrieval of content.For the topic of the line in examination question, due to more complicated, therefore form two kinds of formatted outputs by the content in the index node in output, portion is the picture of Png, portion is the text of Txt, so that show and retrieval.
Preferably, the form of the described structured content after format conversion with preview graph shown; The clicking operation of reception to content on described preview graph shows corresponding structured content; The editor of reception to the structured content of described demonstration, the form with preview graph shows again.For example: Fig. 5 is presented at the screenshot capture for the examination question after display format conversion on the terminal of network browsing.
To the content after preview, if need editor, the content of structurized xml form can be edited, after editing and preserving, the form with preview graph shows again.
Preferably, structurized content can store in database, can provide input window to the user, inputted all or part of structured content that to select by the user, with set and the output of the examination question that forms various ways, for example: the examination question of answer and parsing is arranged, there is no the examination question of answer etc.These examination questions can show on relevant device according to the form of output environment, such as: be used for typesetting terminal, be used for the terminal of network browsing or be used for the mobile terminal etc. of network browsing.
Referring to Fig. 6, the present invention also provides a kind of device of exporting examination question, comprising:
Receiver module 31 is used for receiving the output environment that the user determines;
Modular converter 32 is used for the structured content of examination question is carried out the corresponding format conversion of determining described output environments according to receiver module 31; Wherein, described structured content comprises one of following at least: exercise question, stem, answer, option, parsing;
Output module 33 is used for the examination question after under described output environment, output modular converter 32 carries out format conversion.
Preferably, the described structured content in described device is the xml form;
Described modular converter 32 comprises:
Spider module 321 is used for the node according to the structured content of the xml form of nodename traversal tree structure; Wherein, described nodename is exercise question, stem, answer, option or parsing;
Search module 322, be used for recording the xlt masterplate of described format conversion relation, search the node identical with the nodename of spider module 321 current traversals;
Conversion submodule 323 is used for the described structured content with the node of described spider module 321 traversals, according to the format conversion of searching the described node searched of module 322 in the xlt masterplate.Wherein, the xlt masterplate has recorded the format conversion relation of the form that contains output environment that receiver module 31 determines.
Preferably, described device also comprises:
Index creation module 34 is used for creating the index masterplate according to described structured content;
Index module 35 is used for the index masterplate that creates by index creation module 34 content of examination question is added label, forms the described structured content that spider module 321 is used for traversal.
Preferably, described device also comprises:
Preview graph display module 36 is used for the described structured content that modular converter 32 carries out after format conversion is shown with the form of preview graph;
Link module 37 is used for receiving the clicking operation to content on the preview graph of described preview graph display module 36 demonstrations, shows corresponding structured content;
Repeat display module 38, be used for receiving the editor of the structured content that described link module 37 is shown, the form with preview graph shows again.
Preferably, the output environment in described device comprises the running environment of one of following equipment at least: be used for typesetting terminal, be used for network browsing terminal, be used for the mobile terminal of network browsing.
Preferably, the form of the structured content after the described format conversion in described device comprises one of following at least: PDF, epub, txt, png, PSD, jpg, word, flash.
obviously, those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with general calculation element, they can concentrate on single calculation element, perhaps be distributed on the network that a plurality of calculation elements form, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in memory storage and be carried out by calculation element, perhaps they are made into respectively each integrated circuit modules, perhaps a plurality of modules in them or step being made into the single integrated circuit module realizes.Like this, the present invention is not restricted to any specific hardware and software combination.
The above is only the preferred embodiments of the present invention, is not limited to the present invention, and for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.