From 327b6ffac49679196c474d730a44140c17ab9256 Mon Sep 17 00:00:00 2001
From: "Simon F. Bate"
Date: Fri, 2 Dec 2016 14:27:17 -0500
Subject: [PATCH] Course updates
Edits, new conref push content for housekeeping.
---
.../lca_conref_push_requirements.dita | 5 ++-
.../using_keys/lca_file_path_usage.dita | 2 +-
.../maps/m_advanced_conrefs.ditamap | 2 +-
.../maps/m_using_conditions.ditamap | 2 +-
.../maps/m_using_keys.ditamap | 2 +-
.../maps/this_course_keys.ditamap | 2 +-
.../advanced_reuse_examples.ditamap | 0
.../samples/c_conrefpush_sources.dita | 34 ++++++++++++++++++
.../c_conrefpush_target.dita | 0
.../c_filtering_and_flagging.dita | 0
.../{sources => samples}/domestic.ditaval | 0
.../samples/reuse_advanced_samples.zip | Bin 0 -> 3050 bytes
.../{sources => samples}/show_rev.ditaval | 0
.../{sources => samples}/wild.ditaval | 0
.../sources/c_conrefpush_sources.dita | 20 -----------
.../topics/lc_advanced_keys.dita | 7 ++--
.../lc_conditions_allowed_elements.dita | 4 +--
.../topics/lc_conditions_ditaval.dita | 15 ++++----
.../lc_conditions_filtering_attributes.dita | 8 ++---
.../topics/lc_conditions_rev_attribute.dita | 13 ++++---
.../topics/lc_conkeyrefs.dita | 14 ++++----
.../topics/lc_conref_basic_review.dita | 2 +-
.../topics/lc_conrefend.dita | 8 +++--
.../topics/lc_conrefpush.dita | 8 +++--
.../topics/lc_key.dita | 14 ++++++--
.../topics/lc_review_basic_reuse.dita | 6 ++--
.../topics/lc_using_conditions.dita | 3 +-
.../topics/lc_using_keys_text.dita | 2 +-
.../topics/z_conkeyref_elements.dita | 17 ++++-----
.../topics/z_conref_push_elements.dita | 19 +++++++++-
...course07-reusing_elements_advanced.ditamap | 3 ++
.../topics/lc_general_housekeeping.dita | 4 +--
32 files changed, 133 insertions(+), 83 deletions(-)
rename en-us/course07-reuse_advanced/{sources => samples}/advanced_reuse_examples.ditamap (100%)
create mode 100644 en-us/course07-reuse_advanced/samples/c_conrefpush_sources.dita
rename en-us/course07-reuse_advanced/{sources => samples}/c_conrefpush_target.dita (100%)
rename en-us/course07-reuse_advanced/{sources => samples}/c_filtering_and_flagging.dita (100%)
rename en-us/course07-reuse_advanced/{sources => samples}/domestic.ditaval (100%)
create mode 100644 en-us/course07-reuse_advanced/samples/reuse_advanced_samples.zip
rename en-us/course07-reuse_advanced/{sources => samples}/show_rev.ditaval (100%)
rename en-us/course07-reuse_advanced/{sources => samples}/wild.ditaval (100%)
delete mode 100644 en-us/course07-reuse_advanced/sources/c_conrefpush_sources.dita
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 @@
The element to be pushed must have the attribute
- conaction="pushbefore"
+ conaction="pushbefore".
The element with conaction="pushbefore" must come before the element
- with conaction="mark"
-
+ with conaction="mark".
diff --git a/en-us/course07-reuse_advanced/assessments/using_keys/lca_file_path_usage.dita b/en-us/course07-reuse_advanced/assessments/using_keys/lca_file_path_usage.dita
index d67b9eb5..80fab33f 100644
--- a/en-us/course07-reuse_advanced/assessments/using_keys/lca_file_path_usage.dita
+++ b/en-us/course07-reuse_advanced/assessments/using_keys/lca_file_path_usage.dita
@@ -17,7 +17,7 @@
- This is the correct way to use a key for a file path: <topicref
+ This is a correct way to use a key for a file path:
<topicref
keyref="product_intro"/>. (True or False?)
diff --git a/en-us/course07-reuse_advanced/maps/m_advanced_conrefs.ditamap b/en-us/course07-reuse_advanced/maps/m_advanced_conrefs.ditamap
index 44ddb796..bcad9052 100644
--- a/en-us/course07-reuse_advanced/maps/m_advanced_conrefs.ditamap
+++ b/en-us/course07-reuse_advanced/maps/m_advanced_conrefs.ditamap
@@ -4,7 +4,7 @@
Advanced conrefs
-
+
diff --git a/en-us/course07-reuse_advanced/maps/m_using_conditions.ditamap b/en-us/course07-reuse_advanced/maps/m_using_conditions.ditamap
index 1dcd04ab..9f46e73a 100644
--- a/en-us/course07-reuse_advanced/maps/m_using_conditions.ditamap
+++ b/en-us/course07-reuse_advanced/maps/m_using_conditions.ditamap
@@ -4,7 +4,7 @@
Using conditions
-
+
diff --git a/en-us/course07-reuse_advanced/maps/m_using_keys.ditamap b/en-us/course07-reuse_advanced/maps/m_using_keys.ditamap
index 65ba73ff..ece253c8 100644
--- a/en-us/course07-reuse_advanced/maps/m_using_keys.ditamap
+++ b/en-us/course07-reuse_advanced/maps/m_using_keys.ditamap
@@ -4,7 +4,7 @@
Using keys
-
+
diff --git a/en-us/course07-reuse_advanced/maps/this_course_keys.ditamap b/en-us/course07-reuse_advanced/maps/this_course_keys.ditamap
index c84f7104..0d3546c1 100644
--- a/en-us/course07-reuse_advanced/maps/this_course_keys.ditamap
+++ b/en-us/course07-reuse_advanced/maps/this_course_keys.ditamap
@@ -3,7 +3,7 @@
- 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:
- For more information, see Initializing the Duck Database.
+
+
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 () covered this to some
+ degree: what makes sense in one language when it is filtered out might not make
sense (or translate well) when it is presented in another language.
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
+ 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 is domestic.ditaval.
+
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 @@
Content is specific to a custom aspect.
- 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:
+ keyref="i_conrefend" id="image_ggs_r4d_dy" base="2016/12"/>If you use conrefend,
+ keep in mind that:
- Both of the elements identified by the conref and conrefend attributes must be
the same element name as the referencing element. For instance, if the
referencing element is a <p> element, the elements indicated by the conref
@@ -55,6 +55,8 @@
the content reference.
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.Not all CCMS
+ support the conrefend attribute. Test or check with your vendor before using this
+ attribute.
diff --git a/en-us/course07-reuse_advanced/topics/lc_conrefpush.dita b/en-us/course07-reuse_advanced/topics/lc_conrefpush.dita
index 5a202b9b..ecf767cc 100644
--- a/en-us/course07-reuse_advanced/topics/lc_conrefpush.dita
+++ b/en-us/course07-reuse_advanced/topics/lc_conrefpush.dita
@@ -41,8 +41,7 @@
element before, after, or in place of) has an id attribute.
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"/>The DITA sources
+ shown in these examples are in the downloadable samples file . The target DITA file is c_conrefpush_target.dita; the
+ source DITA file is c_conrefpush_target.dita.
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.
+ text. You create the key name and definition (the text to use in place of the key)
+ in a DITA map;. You refer to a key by specifying the key name in a keyref attribute.
+ The keyref attributes are resolved when topics and maps are transformed into an
+ output format.
+ 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:
- The key product_name contains the name of a product
diff --git a/en-us/course07-reuse_advanced/topics/lc_review_basic_reuse.dita b/en-us/course07-reuse_advanced/topics/lc_review_basic_reuse.dita
index 258c6b7a..85e2d2b5 100644
--- a/en-us/course07-reuse_advanced/topics/lc_review_basic_reuse.dita
+++ b/en-us/course07-reuse_advanced/topics/lc_review_basic_reuse.dita
@@ -18,11 +18,11 @@
In the course you learned that:
- - Reusable topics are essential to reuse. Reusable topics are consistent,
- context-free, and generalized.
+ - You should keep reusability in mind when creating topics. Reusable topics are
+ consistent, context-free, and generalized.
- You can reuse topics in many different maps.
- You can reuse maps in many different maps.
- - The same topic can be used multiple times in the same map.
+ - You can reuse same topic multiple times in the same map.
- You can use content references (or “conrefs”) to reuse an element across many
different topics.
diff --git a/en-us/course07-reuse_advanced/topics/lc_using_conditions.dita b/en-us/course07-reuse_advanced/topics/lc_using_conditions.dita
index 4f99a9d7..819effa5 100644
--- a/en-us/course07-reuse_advanced/topics/lc_using_conditions.dita
+++ b/en-us/course07-reuse_advanced/topics/lc_using_conditions.dita
@@ -19,9 +19,8 @@
Identify the four fundamental conditional attributes.
Apply the four fundamental conditional attributes.
- Create a ditaval file to filter content.
Apply the rev attribute.
- Create a ditaval file to flag content.
+ Create a ditaval file to filter and flag content.
diff --git a/en-us/course07-reuse_advanced/topics/lc_using_keys_text.dita b/en-us/course07-reuse_advanced/topics/lc_using_keys_text.dita
index b7ebe1fd..3e87bf93 100644
--- a/en-us/course07-reuse_advanced/topics/lc_using_keys_text.dita
+++ b/en-us/course07-reuse_advanced/topics/lc_using_keys_text.dita
@@ -62,7 +62,7 @@
Congratulations on purchasing <ph keyref="product_name"/>!
When the DITA map includes the <keydef> element shown above, the output would
contain:
- Congratulations on purchasing Duck Database!
+ Congratulations on purchasing Duck Database!
diff --git a/en-us/course07-reuse_advanced/topics/z_conkeyref_elements.dita b/en-us/course07-reuse_advanced/topics/z_conkeyref_elements.dita
index 2f1922fe..2ca75d42 100644
--- a/en-us/course07-reuse_advanced/topics/z_conkeyref_elements.dita
+++ b/en-us/course07-reuse_advanced/topics/z_conkeyref_elements.dita
@@ -6,14 +6,15 @@
- 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:
+ - advanced_reuse_examples.ditamap
+ - c_conrefpush_sources.dita
+ - c_conrefpush_target.dita
+ - c_filtering_and_flagging.dita
+ - domestic.ditaval
+ - show_rev.ditaval
+ - wild.ditaval
diff --git a/en-us/course07-reuse_advanced/topics/z_conref_push_elements.dita b/en-us/course07-reuse_advanced/topics/z_conref_push_elements.dita
index e37edb58..bd0cd3c1 100644
--- a/en-us/course07-reuse_advanced/topics/z_conref_push_elements.dita
+++ b/en-us/course07-reuse_advanced/topics/z_conref_push_elements.dita
@@ -3,7 +3,15 @@
Conref push elements
-
+
+ To view the sources for some of the examples in this course,
+ download now.
+ Extract the contents and put them in a directory that you can access easily.
+ If you have access to an output generator (usually the DITA Open Toolkit), you can
+ use it to generate output and see these principles in action.
+
+
+
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 now. It contains the sample files for the
+ entire course. Extract the contents and put them in
+ a directory that you can access easily.
diff --git a/en-us/course07-reusing_elements_advanced.ditamap b/en-us/course07-reusing_elements_advanced.ditamap
index a26194e4..bab28e70 100644
--- a/en-us/course07-reusing_elements_advanced.ditamap
+++ b/en-us/course07-reusing_elements_advanced.ditamap
@@ -21,4 +21,7 @@
-->
+
+
+
diff --git a/en-us/shared/topics/lc_general_housekeeping.dita b/en-us/shared/topics/lc_general_housekeeping.dita
index e0a713db..cfe94a5d 100644
--- a/en-us/shared/topics/lc_general_housekeeping.dita
+++ b/en-us/shared/topics/lc_general_housekeeping.dita
@@ -15,11 +15,11 @@
- Download now. It contains the sample files for the
+
Download now. It contains the sample files for the
entire course. Extract the contents and put them in
a directory that you can access easily.
- 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