-
Notifications
You must be signed in to change notification settings - Fork 3
XMLParsingDialog
For each witness in a Comparison Set, you can fine tune how Juxta parses the XML representation of the witness to prepare it for collation. These choices are represented in what we call a “parsing template.” Parsing templates can be reused for an entire set of files, streamlining the process of intaking new witnesses into a Comparison Set. Parsing templates can also be archived and reused in future Comparison Sets.
Parsing templates allow you to configure a number of different things about how Juxta represents a given witness. You can choose to “EXCLUDE” (ignore) a particular element type, “INCLUDE” (opposite of “EXCLUDE”), or “MAKE NOTABLE.” “MAKE NOTABLE” notes the type of tag that contains the text and marks the text as changed when the element type changes. This could be used to note changes from “b” to “i” tags, for example. You can also specify whether or not a newline (aka a line break) should be added after the element. For example, if parsing an XHTML document, one might wish to make “br” and “p” tags have line breaks after them. You can also specify a “Target XPath”. This is an XPath to the XML element which encompasses the text that is to be collated.
When you add a file to a comparison set that is in XML format, Juxta will either match it with an existing parsing template or prompt you to create a new parsing template. If one or more parsing templates match the schema of the newly added file, the Select Parse Template Dialog is displayed. You may then select the appropriate template. If there are no parsing templates that match this schema, the “XML Template Editor” is displayed. This will allow you to create a new template for this XML file.
You can modify the existing parsing templates in a comparison set by selecting Edit -> Edit XML Parsing Templates or by clicking on the “Edit Templates...” button in the Select Parse Template Dialog.
This dialog allows you to create new templates, edit existing ones, and delete templates. Clicking on “New” or “Edit” brings up the XML Template Editor Dialog. There are two groups of parsing templates: “Current Templates” and “Archived Templates”. You can toggle between these groups using the drop-down field at the top of the dialog. The Current Templates are available in the currently active comparison set. These templates can be selected in the Select Parse Template Dialog to parse a given witness. The Archive Templates do not affect the current comparison set. The archived templates are your own personal library of templates that can be reused from project to project. An archived template may be restored to be used in the current Comparison Set. Likewise, the current templates can be archived for future use. To archive a template from the Current Templates, select it and then click the “Archive” button. To restore a template from the archive, select it and then click on the “Restore” button.
This dialog allows you to select an existing template with which to process the current witness. See Juxta XML Parsing Templates for more information.