Skip to content

Commit

Permalink
Sample topic showing some of the custom validation Schematron errors …
Browse files Browse the repository at this point in the history
…reported in our user's manual
  • Loading branch information
raducoravu authored May 17, 2018
1 parent af1f89f commit bc93d66
Showing 1 changed file with 144 additions and 0 deletions.
144 changes: 144 additions & 0 deletions DITA/rules/rule_based_validation_samples.dita
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="rule_based_validation_samples">
<title>Rule-based Validation Samples</title>
<body>
<p>This topic contains examples of how various user guide rules are triggered when working
with DITA content.</p>
<section id="section_i2l_lq4_vdb">
<title>Avoid having empty DITA elements</title>
<p>Rule location: <xref href="rulesAdvanced.sch#268" format="sch" scope="peer"/></p>
<p/>
</section>
<section id="section_wrt_mq4_vdb">
<title>Avoid having ; at the end of a list item</title>
<p>Rule location: <xref href="rulesAdvanced.sch#22" format="sch" scope="peer"/></p>
<p>
<ol id="ol_zss_nq4_vdb">
<li>Item 1;</li>
<li>Item 2;</li>
</ol>
</p>
</section>
<section id="section_mtx_4q4_vdb">
<title>Avoid using the @scale attribute on a DITA image</title>
<p>Rule location: <xref href="rulesAdvanced.sch#15" format="sch" scope="peer"/></p>
<p><image href="../img/Add16.png" scale="200" id="image_emd_rq4_vdb"/></p>
</section>
<section id="section_owy_rq4_vdb">
<title>Report link which has same text as target href</title>
<p>Rule location: <xref href="rulesAdvanced.sch#83" format="sch" scope="peer"/></p>
<p>Link to <xref href="http://www.google.com" format="html" scope="external">http://www.google.com</xref></p>
</section>
<section id="section_ky2_vq4_vdb">
<title>Report DITA image without an href or keyref</title>
<p>Rule location: <xref href="rulesAdvanced.sch#108" format="sch" scope="peer"/></p>
<p>Image <image id="image_lzj_yq4_vdb"/>.</p>
</section>
<section id="section_pzq_yq4_vdb">
<title>Two consecutive unordered lists</title>
<p>Rule location: <xref href="rulesAdvanced.sch#144" format="sch" scope="peer"/></p>
<p>
<ul id="ul_b3v_zq4_vdb">
<li>Item 1</li>
<li>Item 2</li>
</ul>
<ul id="ul_dlg_1r4_vdb">
<li>Item 3</li>
<li>Item 4</li>
</ul>
</p>
</section>
<section id="section_pzq_yq4_vdb2">
<title>Two consecutive ordered lists</title>
<p>Rule location: <xref href="rulesAdvanced.sch#164" format="sch" scope="peer"/></p>
<p>
<ol id="ul_b3v_zq4_vdb22">
<li>Item 1</li>
<li>Item 2</li>
</ol>
<ol id="ul_dlg_1r4_vdb33">
<li>Item 3</li>
<li>Item 4</li>
</ol>
</p>
</section>
<section id="indexterm">
<title>Indexterms not placed in prolog</title>
<p>Rule location: <xref href="rulesAdvanced.sch#59" format="sch" scope="peer"/></p>
<p>
<indexterm>Index word</indexterm>
</p>
</section>
<section id="codeblock">
<title>Codeblock without @outputclass attribute set on it</title>
<p>Rule location: <xref href="rulesAdvanced.sch#234" format="sch" scope="peer"/></p>
<p>
<codeblock>some &lt;tags&gt;</codeblock>
</p>
</section>
<section id="consecutiveNotes">
<title>Report two consecutive notes of the same type</title>
<p>Rule location: <xref href="rulesAdvanced.sch#249" format="sch" scope="peer"/></p>
<p>
<note type="warning">Warning 1</note>
<note type="warning">Warning 2</note>
</p>
</section>
<section id="sectionsNoIDs">
<title>Report sections without IDs</title>
<p>Rule location: <xref href="rulesAdvanced.sch#303" format="sch" scope="peer"/></p>
</section>
<section>
<title>Section title</title>
</section>
<section id="longTitles">
<title>Report very long titles</title>
<p>Rule location: <xref href="rulesAdvanced.sch#335" format="sch" scope="peer"/></p>
<data>
<title>Report very long titles because they are quite hard to understand and layout. </title>
</data>
</section>
<section id="menucascade">
<title>Report menucascade with only one uicontrol</title>
<p>Rule location: <xref href="rulesAdvanced.sch#348" format="sch" scope="peer"/></p>
<p>This is <menucascade>
<uicontrol>File</uicontrol>
</menucascade> menu.</p>
</section>
<section id="figWithTitle">
<title>Report figure which has a title</title>
<p>Rule location: <xref href="rulesAdvanced.sch#371" format="sch" scope="peer"/></p>
<p><fig><image href="../img/AcceptAll16.png"></image></fig></p>
</section>
<section id="figWithTitle">
<title>Report figure which has a title</title>
<p>Rule location: <xref href="rulesAdvanced.sch#371" format="sch" scope="peer"/></p>
<p><fig><image href="../img/AcceptAll16.png"></image></fig></p>
</section>
<section id="textInsideSection">
<title>Report text added directly inside section</title>
<p>Rule location: <xref href="rulesAdvanced.sch#473" format="sch" scope="peer"/></p>
</section>
<section id="textInsection">
Some text content here.
</section>
<section id="notAllowedElements">
<title>Report not allowed elements</title>
<p>Rule location: <xref href="rulesAdvanced.sch#499" format="sch" scope="peer"/></p>
<p>Some <pre>pre text</pre></p>
</section>
<section id="productNameInText">
<title>Report product name appearing in text content</title>
<p>Rule location: <xref href="rulesAdvanced.sch#547" format="sch" scope="peer"/></p>
<p>Some Oxygen mentions.</p>
</section>
<section id="lineLengthInCodeblocks">
<title>Report long lines in code blocks</title>
<p>Rule location: <xref href="rulesAdvanced.sch#223" format="sch" scope="peer"/></p>
<p><codeblock outputclass="language-xml">
Some very long line of text which may not be properly wrapped in the PDF output. And the line is really very long.
</codeblock></p>
</section>
</body>
</topic>

0 comments on commit bc93d66

Please sign in to comment.