diff --git a/en-us/course07-reuse_advanced/assessments/advanced_conrefs/lca_conref_push_requirements.dita b/en-us/course07-reuse_advanced/assessments/advanced_conrefs/lca_conref_push_requirements.dita
index ace54f1e..039805af 100644
--- a/en-us/course07-reuse_advanced/assessments/advanced_conrefs/lca_conref_push_requirements.dita
+++ b/en-us/course07-reuse_advanced/assessments/advanced_conrefs/lca_conref_push_requirements.dita
@@ -27,13 +27,12 @@
In addition, you can use the key if you just need to refer to the linktext:
-For more information, see <cite keyref="initing_ddb"/>.-
When this is processed, the <linktext> content will be used in the <cite> - element:
-Key references with fall-backs
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 diff --git a/en-us/course07-reuse_advanced/topics/lc_conditions_allowed_elements.dita b/en-us/course07-reuse_advanced/topics/lc_conditions_allowed_elements.dita index 16942322..8d4b5cb3 100644 --- a/en-us/course07-reuse_advanced/topics/lc_conditions_allowed_elements.dita +++ b/en-us/course07-reuse_advanced/topics/lc_conditions_allowed_elements.dita @@ -40,8 +40,8 @@
There are two areas where you need to exercise some caution in filtering: inline elements and elements that have required children.
It is not a good idea to filter inline elements. This is mostly a localization
- concern. The previous course () covered this to some
- degree: what makes sense in one language when it is filtered out might not make good
+ concern. The previous course (
You need to be careful when filtering elements that have required children, otherwise this might result in an invalid structure. If filtering removes required elements, diff --git a/en-us/course07-reuse_advanced/topics/lc_conditions_ditaval.dita b/en-us/course07-reuse_advanced/topics/lc_conditions_ditaval.dita index d2f070a3..84d617a4 100644 --- a/en-us/course07-reuse_advanced/topics/lc_conditions_ditaval.dita +++ b/en-us/course07-reuse_advanced/topics/lc_conditions_ditaval.dita @@ -21,10 +21,10 @@ 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.)
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, + 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 - <ditavalref> element to include a ditaval file in a DITA map.)
The name of + passed to output generators using a command argument. In DITA 1.3, you can use the + <ditavalref> element to include a ditaval file in a DITA map.
The name of your ditaval file is up 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. @@ -46,8 +46,11 @@ value is found. In this case, any element that contains platform="iphone" is excluded from output (that is, it is hidden). -
Conditional filtering example
In this example DITA topic, the
- second <p> element contains a sentence within a <ph> (phrase) element. The
+
Conditional filtering example
In this example DITA topic, + the second <p> element contains a sentence within a <ph> (phrase) element. The product conditional attribute has the value “wild_ducks":
<p>For the healthiest ducks, we recommend using our feeds.</p> <p>All our duck feeds are composed of cracked corn, oats, rice, and milo seed. @@ -59,7 +62,7 @@ this:But if you use this ditaval file to filter out content where product="wild_ducks":
<val> - <prop action="exclude" att="product" val="wild_ducks" /> + <prop att="product" val="wild_ducks" action="exclude" /> </val>The output looks like this:
For more information about ditaval files and how to use them for diff --git a/en-us/course07-reuse_advanced/topics/lc_conditions_filtering_attributes.dita b/en-us/course07-reuse_advanced/topics/lc_conditions_filtering_attributes.dita index 162fe64e..03cbe566 100644 --- a/en-us/course07-reuse_advanced/topics/lc_conditions_filtering_attributes.dita +++ b/en-us/course07-reuse_advanced/topics/lc_conditions_filtering_attributes.dita @@ -41,10 +41,6 @@
The names of the attributes are defined in the DITA specification. They are a - suggestion about how you might use them, but you should not feel locked into using - them specifically for audience, platform, or product filtering; it’s up to you to - determine how you want to use each one.
For example, you might use the platform attribute to indicate whether content is intended for iPhone or Android users:
<p platform="android">Visit Google Play for more information.</p> @@ -55,6 +51,10 @@ 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.) +The names of the attributes are defined in the DITA specification. They are a + suggestion about how you might use them, but you should not feel locked into using + them specifically for audience, platform, or product filtering; it’s up to you to + determine how you want to use each one.
As with the attributes themselves, the values you use with each of the conditional attributes are up to you to decide. You can use any characters you want for the conditional attribute values, except for the space character. Case is important in diff --git a/en-us/course07-reuse_advanced/topics/lc_conditions_rev_attribute.dita b/en-us/course07-reuse_advanced/topics/lc_conditions_rev_attribute.dita index f1f8b1a6..95bca1a3 100644 --- a/en-us/course07-reuse_advanced/topics/lc_conditions_rev_attribute.dita +++ b/en-us/course07-reuse_advanced/topics/lc_conditions_rev_attribute.dita @@ -18,11 +18,14 @@
In addition to filtering, you can use conditional attributes to flag (or highlight) content that is intended for different readers or different products. You can use any conditional attribute for flagging, and you can use the rev attribute to - indicate and flag a specific revision of your product or service.
Flagging - the conditional attributes
To use the conditional attributes for - flagging, you use the ditaval <prop> element with the action="flag" attribute. - This allows you to flag text with color, background color, text styles, and images - (depending on what is supported in your transforms and the output generator). For + indicate and flag a specific revision of your product or service.
The DITA + sources shown in the following examples are in the downloadable samples file . The DITA file is c_filtering_and_flagging.dita; the + ditaval files are wild.ditaval and show_rev.ditaval. Flagging the + conditional attributes
To use the conditional attributes for flagging, + use the ditaval <prop> element with the action="flag" attribute. This allows you + to flag text with color, background color, text styles, and images (depending on + what is supported in your transforms and the output generator). For example:
<prop att="platform" val="android" action="flag" color="purple"/>The <prop> element show here directs the output generator to use purple text on any element in which the platform attribute contains the value “android”.
When diff --git a/en-us/course07-reuse_advanced/topics/lc_conkeyrefs.dita b/en-us/course07-reuse_advanced/topics/lc_conkeyrefs.dita index 40cb5be9..dc73835e 100644 --- a/en-us/course07-reuse_advanced/topics/lc_conkeyrefs.dita +++ b/en-us/course07-reuse_advanced/topics/lc_conkeyrefs.dita @@ -16,8 +16,8 @@
A conkeyref is a content reference that uses a key instead of a file path. - As described in the
course, a content reference to an - element in another file might look like this: + As described in the course, a content reference to + an element in another file might look like this: <ul conref="domestic_duck_warehouse.dita#domestic_warehouse/nesting_materials"> <li/> </ul>This @@ -42,10 +42,12 @@ example at the beginning of this topic shows a <ul> element with a conref. Replace the conref attribute with a conkeyref attribute that contains the key, a slash ('/'), and the id of the element to be pulled: -
<ul conkeyref="duck_warehouse/nesting_materials"/>When using - conkeyrefs you do not need to use the id of the topic that contains the referenced - element. When the topic containing the conkeyref is processed, the key - duck_warehouse is replace with the current key definition, which is +
<ul conkeyref="duck_warehouse/nesting_materials"> + <li/> +</ul>When + using conkeyrefs you do not need to use the id of the topic that contains the + referenced element. When the topic containing the conkeyref is processed, + the key duck_warehouse is replace with the current key definition, which is domestic_duck_warehouse.dita.
You can reuse the topic containing the conkeyref in another DITA map, but you might need it to pull content from a file that is specific to the new map. To do this, add a <keydef> element to the new diff --git a/en-us/course07-reuse_advanced/topics/lc_conref_basic_review.dita b/en-us/course07-reuse_advanced/topics/lc_conref_basic_review.dita index aa1a3a7f..6c50ed92 100644 --- a/en-us/course07-reuse_advanced/topics/lc_conref_basic_review.dita +++ b/en-us/course07-reuse_advanced/topics/lc_conref_basic_review.dita @@ -16,7 +16,7 @@
- In the course you learned how to use the conref +
In the
course you learned how to use the conref attribute to reuse elements. The conref attribute allows you to pull content from one element (possibly from a different topic) into another element. To use a content reference:
diff --git a/en-us/course07-reuse_advanced/topics/lc_conrefend.dita b/en-us/course07-reuse_advanced/topics/lc_conrefend.dita index 942b7427..f9236f8c 100644 --- a/en-us/course07-reuse_advanced/topics/lc_conrefend.dita +++ b/en-us/course07-reuse_advanced/topics/lc_conrefend.dita @@ -41,8 +41,8 @@ <li conref="wh.dita#wh_elements/food_fish" conrefend="wh.dita#wh_elements/food_frogs"/> ... </ul>
If you use conrefend, keep in mind - that:
If you use conrefend, + keep in mind that:
You can also use conrefend with conkeyrefs. If conrefend is combined with a conkeyref, the filename in the conrefend attribute is ignored and is replaced with - the filename used by the key specified in the conkeyref.
+ the filename used by the key specified in the conkeyref.For example, to push an element before, after, or in place of this element, it must have an id:
-<p id="install_intro">This chapter describes how to install and configure the Duck Database on - Windows and Macintosh.</p>+
<p id="install_intro">This chapter describes how to install and configure the Duck Database on Windows and Macintosh.</p>
Create a DITA topic containing the element to be pushed.
@@ -73,7 +72,10 @@ </concept>Output from this topic, without any conref push looks like this:
Replacing the target
+ keyref="i_no_push" id="image_px1_dbv_cy" base="2016/11"/>
Replacing the target element
To replace an element in the target topic, use the element’s
conref attribute to identify the element to replace, and set the conaction attribute
to
diff --git a/en-us/course07-reuse_advanced/topics/lc_key.dita b/en-us/course07-reuse_advanced/topics/lc_key.dita
index cba14d0a..171c1337 100644
--- a/en-us/course07-reuse_advanced/topics/lc_key.dita
+++ b/en-us/course07-reuse_advanced/topics/lc_key.dita
@@ -17,9 +17,17 @@
A DITA key allows you to create a placeholder for a file path or a short piece of
- text. You create the key definition (the text to use in place of the key) in a DITA
- map. All keys are resolved when topics and maps are transformed into an output
- format. This allows you to create reusable topics and maps.
The advantage of using a key is that you define the key in one place (in the map), + then refer to that key by name throughout all your topics. If the file path or text + changes, you only need to change the definition and the new definition is reflected + everywhere that the keyref attribute is used.
+Keys make it easy to create reusable topics. Because key definitions can be different + for each map, a reusable topic that uses keys can contain different file paths or + strings, depending on which map it is used in.
For instance, you might create a reusable topic that uses two keys:
In the
Congratulations on purchasing <ph keyref="product_name"/>!
When the DITA map includes the <keydef> element shown above, the output would contain:
-Inside the samples folder, you will find the following sub-folders: -
exercises
-samples
-The samples folder contains these files, which help illustrate + principles of conditional filtering and flagging and the conref push operation:
+ To view the sources for some of the examples in this course,
+ download
In the instructions and examples, we show you the DITA code for the sample files. Most DITA editors have auto-complete or other similar features to guide you through @@ -11,5 +19,14 @@ element, most DITA editors will automatically add the closing tag for you). Therefore, you will probably not need to create every piece of code from scratch as you work.
+ ++ The lessons will instruct you on which files to use for the samples. +
+ +
+ Download
Download
Download
Each lesson will instruct you on which folders and files to use for the samples and +
Each lesson will instruct you on which folders and files to use for the samples and exercises. Save your file as you complete each step to avoid losing your work.
Create a local copy of each file to work in as you complete the lessons. That way, if you reach a point where your working file doesn’t match the examples, or is broken