<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright University of Victoria.
$Date: 2021-06-03 12:02:21 -0700 (Thu, 03 Jun 2021) $
$Id: oxygen.xml 18945 2021-06-03 19:02:21Z klebere $
-->
<?xml-model href="../schemas/london_all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="../schemas/london_all.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<?xml-model href="../schemas/london_all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?><TEI xmlns="http://www.tei-c.org/ns/1.0" xml:id="oxygen" version="5.0">
  <teiHeader>
      <fileDesc>
         <titleStmt>
           <title>Get the Most out of Oxygen</title>

            <respStmt>
               <name ref="mol:HOLM3">Martin Holmes</name>
              <resp ref="molresp:aut">Author<date when="2013"/></resp>
            </respStmt>
            <respStmt>
               <name ref="mol:BUTT1">Cameron Butt</name>
              <resp ref="molresp:aut">Author<date when="2013"/></resp>
            </respStmt>
            <respStmt>
               <name ref="mol:LAND2">Tye Landels</name>
              <resp ref="molresp:aut">Author<date when="2014"/></resp>
            </respStmt>
            <respStmt>
               <name ref="mol:MILL2">Sarah Milligan</name>
               <resp ref="molresp:cpy">Copy Editor<date notBefore="2013"/></resp>
            </respStmt>
            <respStmt>
               <name ref="mol:BUTT1">Cameron Butt</name>
               <resp ref="molresp:mrk">Encoder<date when="2012"/></resp>
            </respStmt>
            <respStmt>
               <name ref="mol:LAND2">Tye Landels</name>
               <resp ref="molresp:mrk">Encoder<date when="2013"/></resp>
            </respStmt>
            <respStmt>
<resp ref="molresp:dtm">Data Manager<date notBefore="2015"/></resp>
<name ref="mol:LAND2">Tye Landels</name>
</respStmt>
<respStmt>
               <resp ref="molresp:prg">Junior Programmer<date notBefore="2015"/></resp>
               <name ref="mol:TAKE1">Joey Takeda</name>
            </respStmt>
            <respStmt>
               <resp ref="molresp:prg">Programmer<date notBefore="2011"/></resp>
               <name ref="mol:HOLM3">Martin Holmes</name>
            </respStmt>
            <respStmt>
               <resp ref="molresp:rth">Associate Project Director<date notBefore="2015"/></resp>
               <name ref="mol:MCFI1">Kim McLean-Fiander</name>
            </respStmt>
            <respStmt>
               <resp ref="molresp:pdr">Project Director<date notBefore="1999"/></resp>
               <name ref="mol:JENS1">Janelle Jenstad</name>
            </respStmt>
         </titleStmt>
      
         <publicationStmt>
      <publisher><title level="m">The Map of Early Modern London</title></publisher><idno type="URL">http://mapoflondon.uvic.ca/includes.xml</idno><pubPlace>Victoria, BC, Canada</pubPlace><address>
        <addrLine>Department of English</addrLine>
        <addrLine>P.O.Box 3070 STNC CSC</addrLine>
        <addrLine>University of Victoria</addrLine>
        <addrLine>Victoria, BC</addrLine>
        <addrLine>Canada</addrLine>
        <addrLine>V8W 3W1</addrLine>
    </address><date when="2016">2016</date><distributor>University of Victoria</distributor><idno type="ISBN">978-1-55058-519-3</idno><authority>
          <name ref="mol:JENS1">Janelle Jenstad</name>
          <email>london@uvic.ca</email>
        </authority><availability>
            <p>Copyright held by <title level="m">The Map of Early Modern London</title> on behalf of the contributors.</p>
            <licence target="http://creativecommons.org/licenses/by-sa/4.0/">
              <p>This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. </p>
            </licence>
            <p>Further details of licences are available from our
              <ref target="mol:licence">Licences</ref> page. For more
              information, contact the project director, <name ref="mol:JENS1">Janelle Jenstad</name>, for
              specific information on the availability and licensing of content
              found in files on this site.</p>
        </availability>
    </publicationStmt>
    
         <sourceDesc><p>Born digital.</p></sourceDesc>
      </fileDesc>
      <profileDesc>
      <textClass>
        <catRef scheme="mdt:molDocumentTypes" target="mdt:mdtBornDigital"/>
        <catRef scheme="mdt:molDocumentTypes" target="mdt:mdtDocumentationEncoding"/>
        <!--NOTE: MORE CATEGORIES NEED TO BE ADDED HERE.-->
      </textClass>
    </profileDesc>

      <encodingDesc>
    <listPrefixDef>
        <prefixDef ident="mol" matchPattern="(.+)(#.+)?" replacementPattern="../../$1.htm$2">
          <p>Most MoEML documents, or significant fragments with <att>xml:id</att> attributes, can
            be addressed using the <code>mol:</code> prefix and accessed through the web application
            with their id + <code>.xml</code>.</p>
        </prefixDef>
        <prefixDef ident="molagas" matchPattern="(.+)" replacementPattern="https://mapoflondon.uvic.ca/agas.htm?locIds=$1">
          <p>The molagas prefix points to the shape representation of a location on 
            MoEML’s OpenLayers3-based
          rendering of the Agas Map.</p>
        </prefixDef>
        <prefixDef ident="moleebo" matchPattern="([0-9]+)\|([0-9]+)" replacementPattern="http://eebo.chadwyck.com/fetchimage?vid=$1&amp;page=$2&amp;width=1200">
          <p>Links to page-images in the Chadwyck-Healey <title level="m">Early English Books Online</title> (EEBO)
            repository. Note that this is a subscription service, and may not be accessible to those
            accessing it from locations outside member institutions.</p>
        </prefixDef>
        <prefixDef ident="molebba" matchPattern="(.+)" replacementPattern="http://ebba.english.ucsb.edu/ballad/$1">
          <p>Links to page-images in the <title level="m">English Broadside Ballad Archive</title> (EBBA).</p>
        </prefixDef>
        <prefixDef ident="mdt" matchPattern="(.+)" replacementPattern="includes.xml#$1">
          <p>The mdt (MoEML Document Type) prefix used on <gi>catRef</gi>/<att>target</att> points
            to a central taxonomy in the includes file.</p>
        </prefixDef>
        <prefixDef ident="mdtlist" matchPattern="(.+)" replacementPattern="$1.xml">
          <p>The mdtlist (MoEML Document Type listing) prefix used in linking attributes points to a listings page constructed from a category in the central MDT taxonomy in the includes file. There are two variants, one with the plain <att>xml:id</att> of the category, meaning all documents in the specified category, and one with the suffix <q>_subcategories</q>, meaning all subcategories of the category.</p>
        </prefixDef>
        <prefixDef ident="molgls" matchPattern="(.+)" replacementPattern="GLOSS1.xml#$1">
          <p>The molgls (MoEML gloss) prefix used on <gi>term</gi>/<att>corresp</att> points
            to a a glossary entry in the GLOSS1.xml file.</p>
        </prefixDef>
        <prefixDef ident="molvariant" matchPattern="(.*)\|(.+)" replacementPattern="spelling_variants.xml#$2">
          <p>This molvariant prefix is used on <gi>ref</gi>/<att>target</att> attributes during automated 
          generation of gazetteer index files. It points to an element in the generated variant spellings
          listing file which lists all documents which contain a particular spelling variant for a 
          location.</p>
        </prefixDef>
        <prefixDef ident="molajax" matchPattern="(.+)" replacementPattern="../../ajax/$1.xml">
          <p>This molajax prefix is used on <gi>ref</gi>/<att>target</att> attributes during the static build 
          process, to specify links which point to MoEML resources which should not be loaded into the source 
          page during standalone processing; instead, these should be turned into links to the XML source 
          documents, and at HTML page load time, these should be turned into AJAX calls. This is to handle 
          the scenario in which a page such as an A-Z index of the whole site would end up containing 
          virtually the whole site inside itself.</p>
        </prefixDef>
        <prefixDef ident="molstow" matchPattern="(.+)|(.+)" replacementPattern="https://hcmc.uvic.ca/stow/$1/SL$1_$2.jpg">
          <p>The molstow prefix is used on <att>facs</att> attributes to link to the HCMC verison of the Stow facsimiles.
          Usually the first group is the year (1633) and then last is the image number (0001).</p>
        </prefixDef>
        
        <prefixDef ident="molshows" matchPattern="([^\|]+)\|([^\|]+)\|([^\|]+)" replacementPattern="https://hcmc.uvic.ca/~london/images/shows/$1/$2/$3.jpg">
          <p>The molshows prefix is used on <att>facs</att> attributes to link to the copies of page-images
            from mayoral shows stored in the london account on the HCMC server.
            The first group is the year (1633), the second is the source repository, and then last is the image
            file name.</p>
        </prefixDef>
        
        <prefixDef ident="sb" matchPattern="(.+)" replacementPattern="https://johnstowsbooks.library.utoronto.ca/admin/items/show/$1">
          <p>The sb prefix is used on <gi>ref</gi>/<att>target</att> attributes to link to 
          Stow’s Books URLs at UToronto.</p>
        </prefixDef>
      </listPrefixDef>

      <p>Our editorial and encoding practices are documented in detail in the <ref target="mol:praxis">Praxis</ref> section of our website.</p>

    </encodingDesc>
  

      <!--
        Changes recorded here are only major changes or those resulting from 
        automated processing. Later changes should be placed first. A complete
        record of the history of any of our files is available through the Subversion
        log.
      -->
      <revisionDesc status="published">
        <change who="mol:TAKE1" when="2018-05-27">Added table of shortcut keys.</change>
      <change who="mol:TAKE1" when="2016-02-27">Added <gi>sourceDesc</gi> information for born-digital documents.</change>
         <change who="mol:TAKE1" when="2015-06-23">Standardized <gi>respStmt</gi>s for JENS1, MCFI1, and HOLM3 and added TAKE1 as Junior Programmer.</change>
         <change who="mol:HOLM3" when="2014-09-29">Added XInclude for <gi>listPrefixDef</gi> in the header.</change>
         <change who="mol:LAND2" when="2014-05-28">Revised index tags.</change>
        <change who="mol:LAND2" when="2014-05-20">Added section on wrapping code in Oxygen.</change>
         <change who="mol:HOLM3" when="2013-12-19">Added global publicationStmt through XInclude.</change>
         <change who="mol:HOLM3" when="2013-08-13">Put <gi>change</gi> elements inside
          <gi>revisionDesc</gi> into the correct (latest first) order.</change>
         <change who="mol:HOLM3" when="2013-08-12">Added <gi>profileDesc</gi> containing document type
        information expressed in <gi>catRef</gi> elements.</change>
         <change who="mol:BUTT1" when="2013-05-27">Created file and added content from
        encoding_practices.xml file.</change>
      </revisionDesc>
  </teiHeader>
  <text>
    <front>
      <docTitle>
        <titlePart type="main">Get the Most Out of Oxygen</titlePart>
      </docTitle>
    </front>

    <body>
      <div xml:id="oxygen_intro">
        <head>Introduction</head>
        <index indexName="documentation_manual">
<term>setup your workstation</term>
          <term>Oxygen</term>
          <term>basics</term>
        </index>
        <p>This page contains useful information for advanced encoders using Oxygen. These
          instructions are not comprehensive, but outline a few key features. For an introduction to
          Oxygen, see <ref target="http://hcmc.uvic.ca/workshops/tei_intro/handouts/oxygen_01.pdf">this document</ref> prepared by MoEML programmer <name ref="mol:HOLM3">Martin Holmes</name>.</p>
      </div>
      
      <div xml:id="oxygen_using_moeml_xpr">
        <index indexName="documentation_manual">
          <term>setup your workstation</term>
          <term>Oxygen</term>
          <term>MoEML project file</term>
        </index>
        <head>Using the MoEML project file</head>
        
        <p>If you check out the MoEML codebase from Subversion
          as described in <ref target="mol:subversion">Access Files from the Subversion Repository</ref>,
          you will find that there is a file in the root of the checked-out folder (alongside <code>PERS1.xml</code>)
          called <code>moeml.xpr</code>. This file is an Oxygen project file. Load this file into Oxygen
          <mentioned>Project / Open Project</mentioned>, and you should see the list of all the files and 
          folders in the project available to you automatically.</p>
        <p>Using the <code>moeml.xpr</code> project file brings some other advantages. For instance,
          you will find that the keystroke shortcut for entering a curly apostrophe described 
          <ref target="#oxygen_codeTemplates">below</ref> is automatically configured, and you can 
          also run the <code>diagnostics.xsl</code> file in <code>utilities</code> to perform consistency
          checks on the entire collection (although this is now done automatically by our Jenkins 
          build server whenever anyone commits to svn).</p>
      </div>

      <div xml:id="oxygen_codeTemplates">
        <index indexName="documentation_manual">
<term>setup your workstation</term>
          <term>Oxygen</term>
          <term>code templates</term>
          <term>special characters</term>
          <term>unicode</term>
        </index>
        <head>Add Code Templates for Special Characters (Apostrophes, etc.)</head>

        <p>Oxygen can remember code templates, or shortcut keys for special characters. This can be
          useful for typing characters that re-occur frequently but are difficult to type. For
          example, the website uses curly apostrophes (’), Unicode character U+2019, which must be
          hard-coded (manually typed in the string of text, rather than rendered dynamically).
          Documents with <soCalled>straight</soCalled> apostrophes will not validate against our
          schema. Other useful characters to have in a code template may be the en dash (–) or the
          em dash (—). Typing such characters is made easier by setting up a code template in Oxygen
          as follows.</p>

        <p>First, find the character in your character map (or in a pre-existing document) and copy
          it to the clipboard so you can paste it when you need it. The curly apostrophe, en dash,
          and em dash can be copy-pasted from the text above, for example.</p>

        <p>In Oxygen, click on <mentioned>Options/Preferences</mentioned>, then type <quote>Code Templates</quote>
          into the filter box at the top. You will see a list of the existing code templates (if
          any). Click on <mentioned>New</mentioned>, then fill in the following details:</p>

        <list rend="simple">
          <item>Name: Apostrophe</item>
          <item>Description: Curly apostrophe (U+2019)</item>
          <item> Associate with: XML Editor</item>
          <item>Content: [Paste the apostrophe in here]</item>
        </list>

        <p>Then press <mentioned>OK</mentioned>.</p>

        <p>Now, you can insert a curly apostrophe into documents as follows:</p>

        <p>Press <mentioned>Control</mentioned> + <mentioned>Shift</mentioned> +
            <mentioned>Space</mentioned>. You should see the code template selector appear. Use the
          arrow keys to select the desired code, and press <mentioned>OK</mentioned> to use it.</p>
      </div>

      <div xml:id="oxygen_schematron">
        <index indexName="documentation_manual">
<term>setup your workstation</term>
          <term>Oxygen</term>
          <term>schematron</term>
          <term>relax ng</term>
          <term>unicode</term>
          <term>validation</term>
        </index>
        <head>Set Up Schematron Validation</head>
        <p>All of our TEI files must of course validate against our TEI schema, which is a <ref target="http://relaxng.org/">RELAX NG</ref> schema. This controls the structure and
          content of our files, by setting out the rules for which elements and attributes can
          appear in which places, and making sure that (for example) dates are encoded in the proper
          format. However, the RELAX NG schema has some limitations on the kinds of constraints it
          can impose. In order to apply some extra, more project-specific rules and strictures<!-- TL or KMF: Should this be structures or strictures? --> to
          our files, we also use a second schema which is written in a different language called
            <ref target="http://www.schematron.com/">Schematron</ref><!-- TL: link not working. -SM -->. So at the top of every XML
          file, you’ll see two processing instructions pointing at schemas, one pointing at the
          RELAX NG schema (<code>london_all.rng</code>) and one pointing at the Schematron schema
            (<code>london_all.sch</code>). The RELAX NG schema is handled automatically by Oxygen,
          but in order to make the Schematron schema work properly, you will need to make a couple
          of changes to the Oxygen preferences. If this is not done, validation of XML files will
          fail. </p>
        <list rend="simple">
          <item>Click on <mentioned>Options/Preferences</mentioned>.</item>
          <item>In the filter box at the top left, type <code>XML Parser</code> and press return.
              <mentioned>XML Parser [P]</mentioned> should be selected.</item>
          <item>Under <mentioned>Schematron/Schematron XPath Version</mentioned>, select
              <mentioned>2.0</mentioned>. </item>
          <item> Under <mentioned>ISO Schematron</mentioned>, check <mentioned>Allow foreign
              elements</mentioned>. </item>
        </list>
      </div>
      <div xml:id="oxygen_xincludeParsing">
        <index indexName="documentation_manual">
<term>setup your workstation</term>
          <term>Oxygen</term>
          <term>validation</term>
          <term>XInclude</term>
          <term>XML parser</term>
        </index>
        <head>Adjust Validation Settings for Files with XInclude</head>
        
        <p>Almost all of our XML files contain XInclude elements. XInclude is used to <soCalled>pull in</soCalled> content from another document; it enables us to keep a single copy of some important pieces of XML in one location and pull it into many other documents automatically. You can see some examples and a brief explanation of XInclude in <ref target="mol:website_structure#website_structure_simple_docs">Website structure: Simple Documents</ref>. By default, when Oxygen validates a file containing an XInclude element, it tries to follow the XInclude tag and pull in the extra content before doing the validation. This would be desirable, except that Oxygen is not able to follow some of the XInclude paths we use, because they include XPointers. Therefore we have to turn off this behaviour for the validation to succeed:</p>
        
        <list rend="simple">
          <item>Click on <mentioned>Options/Preferences</mentioned>.</item>
          <item>In the filter box at the top left, type <code>XML Parser</code> and press return.
            <mentioned>XML Parser [P]</mentioned> should be selected.</item>
          <item>Under <mentioned>XInclude Options</mentioned>, uncheck
            <mentioned>Enable XInclude processing</mentioned>. </item>
        </list>
        
      </div>

      <div xml:id="oxygen_findReplace">
        <index indexName="documentation_manual">
<term>setup your workstation</term>
          <term>Oxygen</term>
          <term>find and replace</term>
        </index>
        <head>Find and Replace Encoded Text</head>
        <p>Oxygen has a powerful search and replace function, but it should be used with caution to
          avoid errors.</p>
        <p>To search in a certain file, right-click on that file in the project view and select
            <mentioned>Find/Replace in Files</mentioned>. To search and replace in all files, select
          the highest file in the tree, <mentioned>london</mentioned>. This action opens a search
          and replace window. To search for a string of text, simply type that string into the
          search bar and click <mentioned>Search</mentioned>. Oxygen will open a list of the
          occurrences it finds at the bottom of the screen. It also lists the number of occurences
          and the files in which they appear. Double-click on an occurrence to open that file.</p>
      </div>
      <div xml:id="oxygen_wrap">
        <index indexName="documentation_manual">
<term>setup your workstation</term>
          <term>Oxygen</term>
          <term>line wrap</term>
          <term>preferences in Oxygen</term>
        </index>
        <head>Wrap XML Code</head>
        <p>Use the <quote>Line wrap</quote> function in Oxygen to wrap your XML code neatly, so that it does not disappear off the right of your screen with a horizontal scrollbar. To activate the <quote>Line wrap</quote> function, click on <quote>Preferences</quote> in the <quote>Options</quote> toolbar. A new window will open with a table of contents on the left-hand side. Find the <quote>Text</quote> subsection, nested inside Editor &gt; Edit modes &gt; Text, and check the <quote>Line wrap</quote> checkbox.</p>
        <p>It is absolutely essential that encoders do not use <soCalled>pretty-print</soCalled>, also known as the <quote>Format and Indent</quote> function in Oxygen. Although this function promises to wrap your TEI code neatly and indent it for you, in practice, it will add extra spaces in the middle of mixed-content elements, resulting in the introduction of spaces where they should not appear. (See related documentation on <ref target="mol:encoding_practices#encoding_practices_spaces">encoding spaces truthfully</ref>.)</p>
      </div>
      <div xml:id="oxygen_shortcuts">
        <index indexName="documentation_manual">
          <term>Oxygen shortcuts</term>
          <term>Oxygen</term>
          <term>code templates</term>
          <term>special characters</term>
          <term>keyboard shortcuts</term>
          <term>copy and paste</term>
        </index>
        <head>Keyboard Shortcuts</head>
        <p>There are a number of keyboard shortcuts in the MoEML Oxygen project file that quickly perform a number of common encoding tasks.<note type="editorial" resp="mol:HOLM3">These shortcuts are for a Linux OS; depending on your operating system and keyboard, the commands might be slightly different. For a full list of Oxygen keyboard shortcuts, see Oxygen &gt; Options &gt; Menu Shortcut Keys</note></p>
        <table>
          <row role="label">
            <cell role="label">Action</cell>
            <cell role="label">How to do it</cell>
          </row>
          <row>
            <cell>Add element around selected text</cell>
            <cell>Ctrl+e</cell>
          </row>
          <row>
            <cell>Save</cell>
            <cell>Ctrl+s</cell>
          </row>
          <row>
            <cell>Validate</cell>
            <cell>Ctrl+shift+v</cell>
          </row>
          <row>
            <cell>Comment/uncomment selected text</cell>
            <cell>Ctrl+shift+,</cell>
          </row>
          <row>
            <cell>Pulls up a menu of special characters and common entity tags that MoEML uses (including curly apostrophe, long s,  personography entry, and more)</cell>
            <cell>Ctrl+shift+space</cell>
          </row>
          <row>
            <cell>Undo</cell>
            <cell>Ctrl+z</cell>
          </row>
          <row>
            <cell>Redo</cell>
            <cell>Ctrl+shift+z</cell>
          </row>
          <row>
            <cell>Cut</cell>
            <cell>Ctrl+x</cell>
          </row>
          <row>
            <cell>Copy</cell>
            <cell>Ctrl+c</cell>
          </row>
          <row><cell>Ctrl+v</cell>
            <cell>Paste</cell></row>
          <row>
            <cell>Find/Replace (use with caution!)</cell>
            <cell>Ctrl+f</cell>
          </row>
          <row>
            <cell>Toggle line-wrap</cell>
            <cell>Ctrl+shift+y</cell>
          </row> 
          <row>
            <cell>See suggested elements</cell>
            <cell>Left bracket (&lt;) and wait for one second</cell>
          </row>
          <row>
            <cell>See suggested attributes</cell>
            <cell>When in the element, press space after typing the element name and wait for one second</cell>
          </row>
          <row>
            <cell>See suggested attribute values</cell>
            <cell>Place cursor between the quotation marks and wait for one second</cell>
          </row>
        </table>
      </div>
           
    </body>
  </text>
</TEI>