Skip to content

Commit

Permalink
Edits to Advanced Reuse
Browse files Browse the repository at this point in the history
Getting up-to-date with my edits and other updates.
  • Loading branch information
simonbate committed Nov 28, 2016
1 parent e3d4fd1 commit 38453b3
Show file tree
Hide file tree
Showing 35 changed files with 23,355 additions and 140 deletions.
3 changes: 1 addition & 2 deletions en-us/course1_intro/assessments/lca_constraint.dita
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
<lcAnswerContent>False</lcAnswerContent>
</lcAnswerOption>
</lcAnswerOptionGroup>
<lcFeedbackIncorrect>Specialization allows an information architect to create new elements based
on existing elements. </lcFeedbackIncorrect>
<lcFeedbackIncorrect>Constraints allow an information architect to remove elements. </lcFeedbackIncorrect>
</lcTrueFalse>
</lcInteraction>
</learningAssessmentbody>
Expand Down
4 changes: 2 additions & 2 deletions en-us/course1_intro/assessments/lca_specialization.dita
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
<lcAnswerContent>False</lcAnswerContent>
</lcAnswerOption>
</lcAnswerOptionGroup>
<lcFeedbackIncorrect>Constraints allow an information architect to remove elements.
</lcFeedbackIncorrect>
<lcFeedbackIncorrect>Specialization allows an information architect to create new elements based
on existing elements. </lcFeedbackIncorrect>
</lcTrueFalse>
</lcInteraction>
</learningAssessmentbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ duckdata> _
<p>Export your duck database as HTML output to make it easy to share on your website. You can
also offer your database to users as a download.</p>
<draft-comment>Are you sure you want to offer a download?</draft-comment>
<required-cleanup>
<p>Consider giving users the option to send feedback or suggested entries for your duck
database.</p>
</required-cleanup>
</section>
<required-cleanup>
<p>Consider giving users the option to send feedback or suggested entries for your duck
database.</p>
</required-cleanup>
</conbody>
</concept>
6 changes: 3 additions & 3 deletions en-us/course2_authoring_concepts/topics/lc_more_advanced.dita
Original file line number Diff line number Diff line change
Expand Up @@ -137,20 +137,20 @@ You can also offer your database to users as a download.&lt;/p></ph>
this topic to rethink the decision to offer a download.</info>
</step>
<step>
<cmd>After the &lt;section> element, add a &lt;required-cleanup> element and
at content to it as shown in the following example:</cmd>
<cmd>At the end of the &lt;section> element, add a &lt;required-cleanup> element
and add content to it as shown in the following example:</cmd>
<stepxmp>
<pre>&lt;?xml version="1.0" encoding="UTF-8"?>
&lt;!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
&lt;concept id="concept_advanced">
&lt;title>Writing about ducks&lt;/title>
&lt;conbody>
...
&lt;/section>
<ph outputclass="newchanged">&lt;required-cleanup>
&lt;p>Consider giving users the option to send feedback or suggested entries for your
duck database.&lt;/p>
&lt;/required-cleanup></ph>
&lt;/section>
&lt;/conbody>
&lt;/concept></pre>
</stepxmp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<lcCorrectResponse/>
</lcAnswerOption>
<lcAnswerOption>
<lcAnswerContent>The referencing element doesn't have to be the same as the referenced
<lcAnswerContent>The referencing element doesnt have to be the same as the referenced
element.</lcAnswerContent>
</lcAnswerOption>
<lcAnswerOption>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<lcCorrectResponse/>
</lcAnswerOption>
<lcAnswerOption>
<lcAnswerContent>You don't have to use the same filtering attribute values as other writers on
<lcAnswerContent>You dont have to use the same filtering attribute values as other writers on
your team.</lcAnswerContent>
</lcAnswerOption>
</lcAnswerOptionGroup>
Expand Down
Binary file not shown.
3,364 changes: 3,364 additions & 0 deletions en-us/course7_reuse_advanced/images/conkeyref-01.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3,363 changes: 3,363 additions & 0 deletions en-us/course7_reuse_advanced/images/conkeyref_2-01.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3,286 changes: 3,286 additions & 0 deletions en-us/course7_reuse_advanced/images/conrefend-01.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3,326 changes: 3,326 additions & 0 deletions en-us/course7_reuse_advanced/images/pushafter-01.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3,326 changes: 3,326 additions & 0 deletions en-us/course7_reuse_advanced/images/pushbefore-01.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3,311 changes: 3,311 additions & 0 deletions en-us/course7_reuse_advanced/images/pushreplace-01.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,140 changes: 2,140 additions & 0 deletions en-us/course7_reuse_advanced/images/submap_of_keys-01.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions en-us/course7_reuse_advanced/maps/this_course_keys.ditamap
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,13 @@
<!-- key for warehouse file containing conkeyref elements. -->
<keydef keys="sample_contents" href="../topics/z_conkeyref_elements.dita"/>

<!-- IMAGES -->
<keydef keys="i_conkeyref" href="../images/conkeyref-01.svg" format="svg"/>
<keydef keys="i_conrefend" href="../images/conrefend-01.svg" format="svg"/>
<keydef keys="i_pushafter" href="../images/pushafter-01.svg" format="svg"/>
<keydef keys="i_pushbefore" href="../images/pushbefore-01.svg" format="svg"/>
<keydef keys="i_pushreplace" href="../images/pushreplace-01.svg" format="svg"/>
<keydef keys="i_keysubmap" href="../images/submap_of_keys-01.svg" format="svg"/>


</map>
15 changes: 8 additions & 7 deletions en-us/course7_reuse_advanced/topics/lc_advanced_keys.dita
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,19 @@
cross-reference. In this case, you can create a &lt;keydef> element that associates
a key with an href to the topic, but also uses the nested &lt;topicmeta> to define a
&lt;linktext> element:</p>
<pre>&lt;keydef keys="demo_name" href="demo_topic.dita">
<pre>&lt;keydef keys="initing_ddb" href="init_ddb.dita">
&lt;topicmeta>
&lt;linktext>Some different text&lt;/linktext>
&lt;linktext>Initializing the Duck Database&lt;/linktext>
&lt;/topicmeta>
&lt;/keydef></pre>
<p>If you reference this key in a cross-reference (&lt;xref> element), the link will
target demo_topic.dita and the text for the link will be “Some different
text”:<pre>&lt;xref keyref="demo_name"/></pre></p>
<p>In addition, you can use the key if you just need to refer to the linktext</p>
<pre>For more information, see &lt;cite keyref="demo_name"/>. </pre>
target init_ddb.dita and the text for the link will be “Initializing the Duck
Database”:<pre>&lt;xref keyref="initing_ddb"/></pre></p>
<p>In addition, you can use the key if you just need to refer to the linktext:</p>
<pre>For more information, see &lt;cite keyref="initing_ddb"/>. </pre>
<p>When this is processed, the &lt;linktext> content will be used in the &lt;cite>
element. </p>
element: </p>
<pre>For more information, see <i>Initializing the Duck Database</i>. </pre>
<p><b>Key references with fall-backs</b></p>
<p>If you use both a keyref and an href attribute in an element, a DITA output generator
will attempt to resolve the keyref first. If the key is not defined, the href target
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,20 @@
concern. The previous course (<cite>Introduction to Reuse</cite>) convered this to
some degree: what makes sense in one language when it is filtered out might not make
good sense (or translate well) when it is presented in another language.</p>
<p>You need to be careful when filtering elements that may result in invalid structure.
If filtering removes required elements, it will result in an invalid topic. For
example, if you add filtering attributes to all &lt;li> elements in an unordered
list (&lt;ul>) and filtering removes them all, the empty &lt;ul> element will be
invalid. Other elements that have required children include &lt;ol>, &lt;sl>,
&lt;steps>, &lt;substeps>, &lt;properties>, &lt;table>, &lt;simpletable>. If you are
not sure which child elements are required, check the <xref keyref="dita_12_url"/>. </p>
<p>You need to be careful when filtering elements that have required children, or
otherwise might result in invalid structure. If filtering removes required elements,
it will result in an invalid topic. For example, if you add filtering attributes to
all &lt;li> elements in an unordered list (&lt;ul>) and filtering removes them all,
the empty &lt;ul> element will be invalid. Other elements that have required
children include &lt;ol>, &lt;sl>, &lt;steps>, &lt;substeps>, &lt;properties>,
&lt;table>, &lt;simpletable>. If you are not sure which child elements are required,
check the <xref keyref="dita_12_url"/>. </p>
<p><b>What you cannot filter</b></p>
<p>There are a number of elements that cannot be filtered out. These include:<sl>
<sli>topic titles</sli>
<sli>individual table entries</sli>
<sli>individual table &lt;entry> elements</sli>
<sli>step command (&lt;cmd>) elements </sli>
<sli>choice table entries</sli>
<sli>choicetable entries</sli>
</sl></p>
</lcInstruction>
</learningContentbody>
Expand Down
22 changes: 11 additions & 11 deletions en-us/course7_reuse_advanced/topics/lc_conditions_ditaval.dita
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@
</prolog>
<learningContentbody>
<lcInstruction>
<p>When generating output from sources that use the filtering attributes, you need to be
able to tell the output processor what to hide and what to show. </p>
<p>When generating output from sources that use the filtering attributes, you need to
tell the output processor what to hide and what to show. </p>
<p>In most output generators, you use a <term>ditaval</term> file, which indicates which
attributes with what values to filter out of your content. (Some output generators
do not use ditaval files; they use filtering mechanisms of their own design, but the
principles are still the same.)</p>
<p>The ditaval file is an XML file, but it is not a DITA file (that is, it does not use
the DITA doctypes or elements). In DITA 1.2, the ditaval file is not included in
DITA maps; the file path to your ditaval file is passed to output generators using a
command argument. (In DITA 1.3, you can use the &lt;ditavalref> element to include
ditaval files in a DITA map.) </p>
<p>You can name the ditaval file whatever makes sense to you, although it's a good idea
to use a filename that indicates the file's purpose. Typically you store the ditaval
file along with your maps, although it can reside anywhere that is accessible to
your output generator. </p>
command argument. (In DITA 1.3, you can use the &lt;ditavalref> element to include a
ditaval file in a DITA map.) </p>
<p>The name of your ditaval file is up to you, although its a good idea to use a
filename that indicates the files purpose. Typically you store the ditaval file
along with your maps, although it can reside anywhere that is accessible to your
output generator. </p>
<p>Typically you will have one ditaval file for each main map or bookmap file.</p>
<p>The root element in the ditaval file is the &lt;val> element; in a typical file the
&lt;val> element contains one or more &lt;props> elements.</p>
Expand All @@ -43,8 +43,8 @@
platform.</li>
<li>The val attribute indicates what value to match in the att attribute. In the
example, all elements where platform="iphone" are filtered.<note>When specifying
the val attribute, case is important. A val attribute containing "iPhone"
would <i>not</i> match a filtering attribute with the value "iphone".
the val attribute, case is important. A val attribute containing iPhone
would <i>not</i> match a filtering attribute with the value iphone.
</note></li>
<li>The action attribute indicates what to do when a match for the attribute and
value is found. In this case, any element that contains
Expand All @@ -56,7 +56,7 @@
what is supported in your transforms and the output generator). For example:</p>
<pre>&lt;prop att="platform" val="android" action="flag" color="purple"/></pre>
<p>This &lt;prop> element says to flag any element in which the platform attribute
contains the value "android"; to flag, all text in the element is output in the
contains the value android; to flag, all text in the element is output in the
color purple. When flagging, you can use these attributes to flag text:</p>
<ul id="ul_qr5_k1t_5x">
<li><b>color</b> - style the text using the specified color</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
<lcInstruction>
<p>DITA conditional filtering allows to choose what to show and hide in your DITA topics
when they are processed for output. </p>
<p>You mark DITA elements for filtering by adding attributes to elements; the value you
use with an attribute is used to determine whether the element should be hidden
(filtered out) or shown. </p>
<p>You mark DITA elements for filtering by adding special filtering attributes to
elements; the value you use with a filtering attribute is used to determine whether
the element should be hidden (filtered out) or shown. </p>
<p>The four basic filtering attributes and their <i>suggested</i> uses are: <dl>
<dlentry>
<dt>audience</dt>
Expand All @@ -39,7 +39,7 @@
</dlentry>
<dlentry>
<dt>otherprops</dt>
<dd>Content is specific to an aspect that is up to you to decide. </dd>
<dd>Content is specific to a a custom aspect. </dd>
</dlentry>
</dl></p>
<p>The names of the attributes are defined in the DITA specification. They are a
Expand All @@ -53,11 +53,11 @@
<p>When generating output for Android users, you can tell the DITA filtering mechanism
to hide elements where <tt>platform="iphone"</tt> and show elements where
<tt>platform="android"</tt>. To generate output for iPhone users, you show
elements where <tt>platform="iphone"</tt> and hide elements where
<tt>platform="android"</tt>. (How to hide and show content is described later in
this lesson.)</p>
elements where platform has the value “iphone and hide elements where platform has
the value “android. (How to hide and show content is described later in this
lesson.)</p>
<p>As with the attributes themselves, the values you use with each of the filtering
attributes is up to you to decide. You can use any characters you want for the
attributes are up to you to decide. You can use any characters you want for the
filtering attribute values, except for the space character. Case is important in the
filtering attribute values, so choose one form of capitalization and use it
consistently. </p>
Expand All @@ -70,7 +70,7 @@
DITA specialization to create additional filtering attributes that have meaning for
your content. The DITA specification identifies another filtering attribute: props.
This attribute is used as the basis for specialization. </note>
<p>Keep in mind that filtering of elements extends to any element in a DITA map, such as
<p>Keep in mind that filtering of elements extends to DITA map elements, such as
&lt;topicref> and &lt;mapref>. This way, you can use filtering to remove entire
topics or chapters from your output. </p>
</lcInstruction>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
attribute; separate the values with one or more spaces. </p>
<pre>&lt;p rev="v2.7 v2.8">The field is limited to 32 characters.&lt;/p></pre>
<note>It is important to note that you cannot use the rev attribute for filtering
content. It's purpose is for identifying revisions.</note>
content. Its purpose is for identifying revisions.</note>
<p><b>Showing rev in output</b></p>
<p>You control the display of the rev attribute with the &lt;revprop> element in the
ditaval file. You can apply styling just as with the &lt;prop> element (color,
Expand All @@ -36,8 +36,8 @@
the &lt;revprop> element to place change bars in the margins next to text marked
with a rev attribute. However, the capabilities and the syntax of the changebar
attribute vary depending on the output format and the output generator. If you need
to use this feature, it's best to review the documentation for your output
generator. </p>
to use this feature, its best to review the documentation for your output
generator. </p>
<!--<p>You can also use the &lt;revprop> element to place change bars in the margins next to text marked with a rev attribute (if supported by your output generator). There are not separate attributes to indicate each of the changebar properties. Instead, the changebar value contains one or more property-value pairs. The value is separated from the property name with a colon (:), multiple property-value pairs are separated by semicolons (;).</p><p>The properties you can specify are:<ul id="ul_o3r_jxs_5x"><li>color - either using a 6-digit hex code or a color name</li><li>width - </li><li>style</li><li>offset</li><li>placement</li></ul> </p>-->
</lcInstruction>
</learningContentbody>
Expand Down
Loading

0 comments on commit 38453b3

Please sign in to comment.