Manual oXygen

From XML
Revision as of 16:56, 19 January 2017 by ASC (Talk | contribs)

Jump to: navigation, search

oXygen XML Editor is the tool that the Huygens ING uses to produce its XML files and to convert them to a HTML format [? en meer?]. oXygen is suited for XML editors on a beginner level, but can appear a little overwhelming at first. This manual contains a couple of tips on how to work with the programme.

Search all

By searching for a phrase and selecting ‘Search all’, the results of the search are highlighted in yellow in the document. At the bottom of the screen, a panel with search results appears that you can use to walk through the hits in the document.


Pic 1.png

XML search using XPATH

XPATH is a language for formulating search queries against XML documents. It sees a document not as a series of characters or words, but as a collection of elements with attributes and content. Using the search box in the top-left corner of the screen you can search based on the XML structure of the document, using the XPATH language. The results are again displayed at the bottom of the document, and highlighted in the source (blue).

Things you can do:

  • select all unclear elements: //unclear
  • select all values of the rs type-attribute: //rs/@type
  • select all unique values of the rs type-attribute: distinct-values(//rs/@type)
  • select all xml:id values: //*/@xml:id

See the following illustrations:

Pic 2.png Pic 3.png Pic 4.png


Using Xpath to search a collection of documents

It is possible to search using Xpath over any collection of documents. The Xpath search box has a dropdown where you indicate which file(s) to search. See below.

Pic 5.png

There are some predefined options, but you can also define your own working set of documents. I defined a working set consisting of all letters using the Configure Xpath working sets option. This options lets you create a New working set (pressing the corresponding button), which you can then give a name and add resources to (in this case, the folder with letters in my working copy).

Pic 6.png Pic 7.png Pic 8.png


Having done this, it is possible to run any XPath query over the entire collection of letters. For example, search for distinct-values (//rs[@type="person"]) to find all persons encoded in the letters.

The result is displayed at the bottom of the screen:

Pic 9.png

This can be sorted, selected and copied for further processing.

Execution of the query might encounter problems if some of the files are not valid XML. These errors will be reported in an Xpath problems tab.


Search in directory

Menu Find, option Find/Replace in Files


Indent text selection

Select text block, right mouse click, option Source, option Indent Selection. You can also indent an element (e.g. a <div>) by placing the cursor in the element (not in a subordinate element) and doing right mouse click, option Source, option Indent Element.