<?xml version="1.0" encoding="UTF-8"?><div xmlns="http://www.tei-c.org/ns/1.0" xml:id="learn_generalDiagnostics" resp="or:odd_HOUL3_wtm or:odd_JENS1_wtm" ana="audRepoUser audEncoder audRemediator">
   
   <head>LEMDO Diagnostics</head>
   
   
   <div xml:id="learn_generalDiagnostics_prior">
      <head>Prior Reading</head>
      
      <list rend="bulleted">
         <item><ptr target="doc:learn_schematronErrors"/></item>
      </list>
   </div>
   
   
   <div xml:id="learn_generalDiagnostics_rationale">
      <head>Rationale</head>
      
      <p>Although many errors can be caught by Schematron in Oxygen, some errors are not. In some cases, this is because Oxygen’s validator is incapable of checking for a specific issue, as in the case of duplicate xml:ids occurring in different files. In other cases, it is because we do not want the build to break over an error, typically because there are too many instances of the error to easily fix, as in the case of <soCalled>old TLN links</soCalled>. No matter the reason that they are not picked up as errors by Schematron, we can catch these issues using our general LEMDO diagnostics.</p>
   </div>
   
   
   <div xml:id="learn_generalDiagnostics_practice">
      <head>Practice: Check LEMDO Diagnostics</head>
      
      <p>Navigate to LEMDO diagnostics from the LEMDO-dev site by clicking on the <quote>Resources</quote> tab in the top navigation bar and selecting <quote>Diagnostics</quote>. This will bring you the the LEMDO Diagnostics page.</p>
      
      <p>Diagnostics are under the automatically-open <quote>Consistency Checks</quote> tab of the LEMDO Diagnostics Web page. Each diagnostic has its own collapsable tab. Those that do not currently find any errors across the LEMDO repository are coloured green and have the number zero in brackets beside the diagnostic name. Those that do find errors are coloured red and have the number of errors found by diagnostics in brackets beside the diagnostic name.</p>
      
      <p>You can filter the diagnostics to only show errors from your edition by typing <quote>emd</quote> followed by your edition abbreviation in the filter text box and clicking <quote>Filter</quote>. For example, if you were working on the <title level="m">H5</title> edition, you would type <quote>emdH5</quote> into the filter text box. You can also search for diagnostics in a specific file by typing the full file name into the filter text box.</p>
      
      <p>For instructions for fixing diagnostic errors, see the relevant section below on the type of error that you wish to fix.</p>
      
      <p>In addition to the consistency checks, there is a statistics section of the diagnostics Web page. The statistics include counts of files in the LEMDO repository, of total xml:ids across the repo, and of the number of facsimile files that we have stored on our facsimile server.</p>
   </div>
   
   
   <!-- HOUL3 to JENS1: I'm not sure what to write about the first three. Presumably nobody really sees them at anything other than 0 because those errors would break the build, right? -->
   
   
   <div xml:id="learn_generalDiagnostics_broken">
      <head>Files Containing Bad Facsimile Links Diagnostic</head>
      
      <p>LEMDO stores facsimile images on an HCMC server. We create XML files in the <ident>facs</ident> folder the the LEMDO repo in order to encode the metadata for the images and to give each image an xml:id. LEMDO editors and encoders can then point to facsimile images from their semi-diplomatic transcription files. Because this linking process is relatively complex, there are sometimes errors in linking from the LEMDO repo to the server containing the facsimile images. This diagnostic catches these errors by finding links to images that do not exist.</p>
      
      <p>If you are working on facsimile files in the <ident>facs</ident> folder, you should regularly check this diagnostic to ensure you do not introduce any errors.</p>
      
      <p>If there is an error in this diagnostic (i.e., a non-existant facsimile file has been linked to), you must correct the values for the <att>url</att> attributes on the <gi>graphic</gi> elements of your facsimile file. Follow the instructions in <ptr target="doc:learn_facsEncode"/>.</p>
      
      <p>If you cannot find the error, check the value of the <att>url</att> attribute against the URI of the facsimile images on the facsimile server. To navigate to the facsimile server, click the <quote>Resources</quote> tab on the top navigation bar of the LEMDO-dev website and select <quote>Facsimiles</quote>. Click on the link for the copy that you are working with to be brought to a list of the relevant URIs.</p>
   </div>
   
   
   <div xml:id="learn_generalDiagnostics_badInternalLinks">
      <head>Bad Internal Links Diagnostics</head>
      
      <p>LEMDO has two diagnostics for bad internal links: an urgent diagnostic and a non-urgent diagnostic. Both find broken internal links (i.e., links from a LEMDO file to an entity within the LEMDO repo). The urgent diagnostic highlights errors in files with statuses indicating they are close to publication. The non-urgent diagnostic finds internal link errors in all other LEMDO files.</p>
      
      <p>Under the bad internal link diagnostic, each file with one or more bad link is listed along with the link that is broken. To fix the bad link, go to the file that contains it and search for the bad link. Fix the link following the instructions for encoding links as given in <ref target="doc:learn_makingLinks">Chapter 5. Making Links</ref>.</p>
   </div>
   
   
   <div xml:id="learn_generalDiagnostics_externalAnchors">
      <head>Pointers to External Anchors Diagnostic</head>
      
      <p>While using a pointer to link to an anchor in another edition is not forbidden, it is not as stable as linking to structural entities. In most cases when linking from one edition to another, you should link to structural elements with xml:ids (such as acts, scenes, speeches, or paragraphs) rather than <gi>anchor</gi> elements which may be removed.</p>
      
      <p>To resolve this diagnostic, search in your file for the anchor ID that is linked to and replace it with a link to a structural entity following the directions in <ptr target="doc:learn_linkRef"/>.</p>
   </div>
   
   
   <div xml:id="learn_generalDiagnostics_missingSpeaker">
      <head>Missing Speaker Elements Diagnostic</head>
      
      <p>All speeches in modernized texts should have a speech prefix encoded using the <gi>speaker</gi> element. This diagnostic finds speeches in modernized texts that do not have speech prefixes. (Note that some speeches in semi-diplomatic transcriptions do not have speech prefixes.)</p>
      
      <p>To resolve this diagnostic, add speech prefixes to your modernized text where they are missing. See <ptr target="doc:learn_encodeSpeaker"/>.</p>
   </div>
   
   
   <div xml:id="learn_generalDiagnostics_missingAuthor">
      <head>Texts Lacking Authors Diagnostic</head>
      
      <p>All semi-diplomatic and modernized texts should have an author identified in their metadata. This diagnostic identifies plays, shows, and poems that do not have a <gi>respStmt</gi> for an author in their <gi>titleStmt</gi> elements.</p>
      
      <p>To add an author to the metadata for your file, follow the instructions in <ptr target="doc:learn_metadataRespStmt"/>. In cases where the work’s author is unknown, add a <gi>respStmt</gi> for the author and link to the <soCalled>Anonymous</soCalled> entry in PROS1 as follows:
         <egXML xmlns="http://www.tei-c.org/ns/Examples" valid="true">
            <respStmt>
               <resp ref="resp:aut">Author</resp>
               <persName ref="pros:ANON1">Anonymous</persName>
            </respStmt>
         </egXML>
      </p>
   </div>
   
   
   <div xml:id="learn_generalDiagnostics_sillyDivs">
      <head>Silly Div Types Diagnostic</head>
      <!-- HOUL3 to JENS1: Is the wording appropriate on this diagnostic (and therefore also this documentation head)? -->
      <p>The <gi>div</gi> element has some <att>type</att> values that are expected by our processor. All other values are caught by this diagnostic. In cases where the <att>type</att> value is not used by our processor or useful to their texts, remove the <att>type</att> value.</p>
   </div>
   
   
   <div xml:id="learn_generalDiagnostics_oldTLNs">
      <head>Old TLN Links Diagnostic</head>
      
      <p>Files that began as IML files that have not been completely remediated have links to targets beginning with <val>tln:</val>. These correspond to the old <soCalled>through line numbers</soCalled> used by the <title level="m">Internet Shakespeare Editions</title>. Old TLN links will be removed during the remediation process. Remediators should delete links to TLNs once they have replaced them with functioning links to the LEMDO edition.</p>
   </div>
   
   
   <div xml:id="learn_generalDiagnostics_badDocumentationResps">
      <head>Bad Documentation Resp Pointers Diagnostic</head>
      
      <p>We give credit to the people who have worked on documentation using the <att>resp</att> attribute on the root <gi>div</gi> element of documentation files. All <att>resp</att> values in documentation must link to a <gi>respStmt</gi> element in the ODD file (<ident>lemdo.odd</ident>) and must prefixed by <val>or:</val> (e.g., <val>or:odd_JENS1_wtm</val>).</p>
      
      <p>To fix this error, check that all <att>resp</att> values match a <gi>respStmt</gi> in the ODD file. If there is not a <gi>respStmt</gi> for the person that you are giving credit to, ask a member of the LEMDO team with read/write permissions over the ODD file to add the <gi>respStmt</gi>. For more information, see <ptr target="doc:learn_docEncode_credit"/>.</p>
   </div>
   
   
   <div xml:id="learn_generalDiagnostics_unlinkedDocumentation">
      <head>Unlinked Documentation Files Diagnostic</head>
      
      <p>LEMDO has a large collection of documentation that is only included in our <title level="a">Encoding Guidelines</title> if they are linked to from the ODD file (<ident>lemdo.odd</ident>). We do not want to have lots of documentation files in the repo that are not linked to from the ODD file. If there is a documentation file in the repo that is not linked to from the ODD file, this diagnostic will flag it.</p>
      
      <p>To clear this diagnostic, either link to documentation files from the ODD file or move deprecated documentation files to the <ident>data/obsolete/oldDocumentation</ident> folder. To avoid this diagnostic error, we recommend writing content for new documentation files as soon as you create them so that they are ready to add to the ODD file as soon as they are added to the repo.</p>
   </div>
   
   
   <div xml:id="learn_generalDiagnostics_role">
      <head>Links Using the Role: Prefix to Empty Roles Diagnostic</head>
      
      <p>LEMDO allows links from apparatus texts and critical paratexts to characters in character lists. To make these links, encoders use a <gi>ref</gi> element with a <att>target</att> attribute. The value of the <att>target</att> attribute must be prefaced by <val>role:</val> and must link to a <gi>person</gi> element in a character list.</p>
      
      <p>The intention of these links to characters in character lists is to provide additional information or context about the character by linking to the place where their character note is. There is no point in linking to a <gi>person</gi> element that does not have a child <gi>note</gi> element with information about the character. In those cases, this diagnostic flags the redundant link.</p>
      
      <p>To clear this diagnostic, simply remove the link to the cast list.</p>
   </div>
   
   
   <div xml:id="learn_generalDiagnostics_linkChain">
      <head>Broken Link Chains Diagnostic</head>
      
      <p>When we have split elements (e.g., a quote that spans multiple verse lines, so must be split into multiple <gi>quote</gi> elements), we use the <att>next</att> and <att>prev</att> attributes to link to the other parts of the element. If the links do not correctly go to an xml:id either before or after the element, this diagnostic will flag it. For more information, see <ptr target="doc:learn_encodeSplitElements"/>.</p>
      
      <p>To resolve this diagnostic, check that the numbering is correct for each part of the split element. Then, check that the value of each <att>prev</att> and <att>next</att> attribute links to an existing xml:id.</p>
   </div>
   
   
   <div xml:id="learn_generalDiagnostics_badXmlLang">
      <head>Tags with Bad <att>xml:lang</att> Values</head>
      
      <p>LEMDO tags foreign languages using the <att>xml:lang</att> attribute. There are a set of allowed values for the <att>xml:lang</att> attribute which the LEMDO team curates in our ODD file. Each value corresponds with an <ref target="https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry">IANA value</ref> for a specific language. For more information on encoding foreign languages, see <ptr target="doc:learn_encodeForeignLanguages"/>.</p>
      
      <p>To resolve this diagnostic, ensure that the value you give the <att>xml:lang</att> attribute is one of the ones listed in the dropdown when you add the <att>xml:lang</att> attribute in Oxygen. You can also this list in a table in <ptr target="doc:learn_encodeForeignLanguages#learn_encodeForeignLanguages_IANA"/>. If you are encoding text in a language that is not included in our allowed languages list, contact the <ref target="mailto:lemdo@uvic.ca">LEMDO team</ref> to have the language added.</p>
   </div>
   
   
   <div xml:id="learn_generalDiagnostics_duplicate">
      <head>Duplicate Bibls Diagnostic</head>
      
      <p>The LEMDO bibliography serves all the anthologies and editions therein. As a consquence, there are thousands of entries spread across the 26 BIBL1 files (<ident>BIBL1_A</ident>, <ident>BIBL1_B</ident>, and so on), which are regularly updated and expanded by the LEMDO RAs. We have occasionally created a duplicate entry. This diagnostic uses a similarity metric to check the <ident>BIBL1</ident> files and flag <gi>bibl</gi> entries that appear to be similar. If you are an RA checking the general diagnostics report, you’ll want to clear this diagnostic regularly so that you catch duplicates shortly after the second one has been created.</p>
      
      <p>If two entries do refer to the same source, search the repository to see which xml:id has been cited the most often in <gi>ref</gi> elements. If are checking Diagnostics regularly, you’ll normally find that the duplicate id has been used just once or twice. Standardize the <gi>ref</gi>s so that they all point to the most-used xml:id. Delete the duplicate <gi>bibl</gi>.</p>
      
      <p>If the diagnostic has flagged two similiar entries that are <emph>not</emph> duplicates, we have a mechanism for telling the similarity metric to ignore pairs (or trios) of entries. Add a <att>corresp</att> attribute to the <gi>bibl</gi> element of each one. The value of the <att>corresp</att> attribute is <val>not:</val> followed by the xml:id of the entry: e.g., <val>not:CONN2</val>. Note that the <att>corresp</att> can have multiple space-separated values.</p>
      
      <p>In the examples below, the similarity metric has flagged three editions contributed by Francis X. Connor to the <title level="m">New Oxford Shakespeare</title>. To each entry, we have added the <att>corresp</att> attribute to indicate that the entry is <emph>not</emph> a duplicate of either of the other two.
         
         <egXML xmlns="http://www.tei-c.org/ns/Examples" valid="false"><bibl xml:id="CONN3" corresp="not:CONN2 not:CONN10"><editor>Connor, Francis X.</editor>, ed. <title level="m">Lucrece</title>. By <author>William Shakespeare</author>. <title level="m">The New Oxford Shakespeare</title>. Ed. <editor>Gary Taylor</editor>, <editor>John Jowett</editor>, <editor>Terri Bourus</editor>, and <editor>Gabriel Egan</editor>. <pubPlace>Oxford</pubPlace>: <publisher>Oxford University Press</publisher>, <date>2016</date>. 673–721. WSB <idno type="WSB">aaag2304</idno>.</bibl></egXML>
         
         <egXML xmlns="http://www.tei-c.org/ns/Examples" valid="false"><bibl xml:id="CONN10" corresp="not:CONN3 not:CONN2"><editor>Connor, Francis X.</editor>, ed. <title level="m">The Tragedy of Coriolanus</title>. By <author>William Shakespeare</author>. <title level="m">The New Oxford Shakespeare</title>. Ed. <editor>Gary Taylor</editor>, <editor>John Jowett</editor>, <editor>Terri Bourus</editor>, and <editor>Gabriel Egan</editor>. <pubPlace>Oxford</pubPlace>: <publisher>Oxford University Press</publisher>, <date>2016</date>. 2723–2813. WSB <idno type="WSB">aaag2304</idno>.</bibl></egXML>
         
         <egXML xmlns="http://www.tei-c.org/ns/Examples" valid="false"><bibl xml:id="CONN2" corresp="not:CONN3 not:CONN10"><editor>Connor, Francis X.</editor>, ed. <title level="m">Venus and Adonis</title>. By <author>William Shakespeare</author>. <title level="m">The New Oxford Shakespeare</title>. Ed. <editor>Gary Taylor</editor>, <editor>John Jowett</editor>, <editor>Terri Bourus</editor>, and <editor>Gabriel Egan</editor>. <pubPlace>Oxford</pubPlace>: <publisher>Oxford University Press</publisher>, <date>2016</date>. 639–672. WSB <idno type="WSB">aaag2304</idno>.</bibl></egXML>
      </p>
   </div>
   
   
   <div xml:id="learn_generalDiagnostics_oldIMLchars">
      <head>Unknown Old IML Characaters Diagnostic</head>
      
      <p>When files were converted from IML to TEI, some special characters were not transformed into TEI. These characters were not recognized in the transformation, and so flag a diagnostic for us to resolve as part of remediation.</p>
      
      <p>To resolve this diagnostic, open the file that the old IML character is in and search for it using Ctrl+F (Cmd+F on Mac). Check the transcription agains the facsimile of the text and add the correct character. For information on encoding glyphs and ligatures in TEI, see <ptr target="doc:learn_encodeGlyphs"/>.</p>
   </div>
   
   
   <div xml:id="learn_generalDiagnostics_persName">
      <head>Files Containing TEI <gi>persName</gi> Elements without <att>ref</att> Attributes Diagnostic</head>
      
      <p>LEMDO uses the <gi>persName</gi> element to identify people. In order to identify them, we put a <att>ref</att> attribute on <gi>persName</gi> linking to either PERS1 (for contributors to LEMDO) or PROS1 (for historical people). Our processor cannot do anything with a <gi>persName</gi> element that has no <att>ref</att> attribute. This diagnostic finds instances of <gi>persName</gi> elements with no <att>ref</att> attribute.</p>
      
      <p>To resolve this diagnostic, add <att>ref</att> attributes to all <gi>persName</gi> elements. If the person is a LEMDO contributor, give <att>ref</att> a value of <val>pers:</val> followed by the person’s xml:id as given in PERS1. If the person is historical, give <att>ref</att> a value of <val>pros:</val> followed by the person’s xml:id as given in PROS1. If the person does not already have an xml:id in PERS1 or PROS1, contact the <ref target="mailto:lemdo@uvic.ca">LEMDO team</ref> to add one.</p>
   </div>
   
   
   <div xml:id="learn_generalDiagnostics_ptrToHeadlessDiv">
      <head>LocalCit Pointers to Divs without Heads Diagnostic</head>
      
      <p>LEMDO only uses the <gi>ptr</gi> element to link to acts, scenes, speeches, and stage directions (A.S.Sp. and A.S.SD. in modernized texts and semi-diplomatic transcriptions or to <gi>div</gi> elements that have child <gi>head</gi> elements. In cases where a <gi>ptr</gi> link points to a <gi>div</gi> element, this diagnostic checks that the <gi>div</gi> has a child <gi>head</gi>. If it does not, it will flag a diagnostic error.</p>
      
      <p>To resolve this diagnostic, ensure that you are only using the <gi>ptr</gi> as allowed in the LEMDO project: use it only to link within your edition and only use it to link to acts, scenes, speeches, stage directions, or <gi>div</gi> elements that have a <gi>head</gi>. If you have linked to a <gi>div</gi> without a <gi>head</gi>, add a <gi>head</gi> element. This will not only clear the diagnostic, but will also make the rendered page more easily navigable and will add the <gi>div</gi> to the page’s table of contents.</p>
      
      <p>For information about when to use the <gi>ptr</gi> element, see <ptr target="doc:learn_chooseLinkingMech"/>. For information about making links with the <gi>ptr</gi> element, see <ptr target="doc:learn_linkPtr"/>.</p>
   </div>
   
   
   <!--<div xml:id="learn_generalDiagnostics_catRefTarget">
      <head><gi>catRef</gi>s whose Target Does Not Match Their Scheme</head>
   </div>-->
</div>