From 09b2c3edccc31c4863d022bb9d7a98f7c9001fa8 Mon Sep 17 00:00:00 2001
From: Kristen James Eberlein Need an example of this. And do we really want to recommend that
people do this? When would doing this make sense/be a best
practice? Comment from Robert Anderson, 17 May 2021: " I think you would
+ most likely want to chain them if you're reusing someone else's
+ constraint. For example, if someone wants to use the strict task
+ from OASIS but also wants to constrain <step>, they could
+ import their module to constrain step, which then imports the
+ OASIS constraint for taskbody, which imports the core task
+ module. I find it hard to imagine chaining more than a couple,
+ because every one you add becomes more specific to your
+ configuration." The DITA architect decides to create a new attribute (
The new attribute will be specialized from
The DITA architect decides to integrate the attribute declaration and its assignment to
- elements into a single expansion module. An alternate approach would be to separate each
+ elements into a single expansion module. An alternate approach would be to put each
Comments by Eliot Kimber:
+[Re defining the attribute]: I don't really see the value in having the + "-expansion" distinction here--whether to use this as a global attribute or + through extension is really up to the doc type shell author. The definer of + the attribute domain may intend for it to be used only on specific element + types but that's not really their choice to make."
+[Re the entity to be used in the @specializations attribute]: "Should there + be leading and trailing space in the replacement text?"
+[Re adding the attribute to the elements]: "I first thought we shouldn't + allow this specialization-and-integration-in-one kind of module but I + convinced myself it's OK. However, we still need an example of not doing + this, for example, taking an *existing* attribute domain and using a + separate extension module to allow it in specific places, omitting the usual + global integration."
+Comment by Eliot Kimber: "See my comment above: I don't think we should + do this."
+Comment by Robert Anderson: "[The note] should clarify that this entity is totally optional -- only useful here because we're adding the same attribute @@ -61,7 +80,12 @@ attribute to one element, you wouldn't want this entity."
Comment by Eliot Kimber: "This is something almost everybody *would* do but + it's not actually required since the use of catalogs is not required by DITA + or by the use of DTDs generally, at least in theory (and in actual fact if + you are an Author/Editor user, which doesn't support catalogs)."
+A constrained document type allows only a subset of the possible instances of the unconstrained
- document type. Thus, for a processor to determine whether a document instance is compatible with
- another document type, the document instance
For DITA 2.0, we've removed the requirement to add tokens for constraints. So, I think we need - to remove this normative statement. Do we want to replace it with anything? Another statement - about constraints and interoperability? This reminds we that we might want to stress for folks - that we have removed the entire concept of strong and weak constraints ...
-For example, an unconstrained task is compatible with an unconstrained
topic, because the
For DITA 2.0, we've removed the requirement to add tokens for constraints; accordingly I + removed the following paragraph:
+"A constrained document type allows only a subset of the possible instances of the
+ unconstrained document type. Thus, for a processor to determine whether a document instance is
+ compatible with another document type, the document instance
Does this topic make sense without that paragraph? How do we need to rework it? Does it need + to cover anything about
+A DITA document either must have an associated document-type definition or all required
attributes must be made explicit in the document instances. Most DITA documents have an
associated document-type shell. DITA documents that reference a document-type shell can
- be validated using standard XML processors. Such validation enables processors to read
- the XML grammar files and determine default values for the
+ be validated using most standard XML processors. Such validation enables processors to
+ read the XML grammar files and determine default values for the
The following figure illustrates the relationship between a DTD-based DITA document, its
document-type shell, the vocabulary modules that it uses,
Comment by Eliot Kimber: "I think this is an expansion of the suggested qualification + of expansion I suggested for a much earlier point in the spec. I'm not sure it's + necessary to go into this level of detail because the constraints on expansion + should be clear based on the "no less constrained" requirement. That said, it's + always helpful to have examples. Maybe this is better represented as a set of + non-normative examples?"
Comment from Eliot Kimber: "I would say "violate" here, since per + Robert's comment, you can change the ordinality as long as the result is + consistent with the original. If A is only allowed before B you can't + change that but if A and B are in an OR group you can put them into a + sequence by extension."
For example, a DITA architect wants to add a new specialization of @@ -72,6 +83,19 @@ alternate title takes its place, which again, we might need to redefine "ordinality" as "DITA ordinality" to cover specialization?"
+Comment from Eliot: "Using title in section as an example is both + problematic but also very instructive. It's problematic because the + grammar is *less constrained* than the prose of the specification, + so the rule as stated in Kris' text is correct--the *prose* doesn't + allow <title> anywhere except as the first child of <section>, + so the solution proposed is correct, in particular, the requirement + to make a choice between <title> and the <specialization>, + *because of the prose-imposed rule*, a rule not expressed in the + grammars. A better example, or at least a more obvious one, would be + an expansion of an element whose base content model is a sequence + (i.e., prolog). That said, it's probably useful to focus on + <section> for this because so many people don't understand this + subtlety of <section>."
The elements must be defined in a separate element domain that declares the - content model and attributes list for the new elements.
+ content models and attribute lists for the new elements.Comment from Eliot Kimber, 18 May 2021: "I would be tempted to + just drop this discussion entirely. I think it's an edge case + for the reasons Robert gives. It's also inherent in the way RNG + works: anyone who understands RNG well enough to do this + understands it enough to know that they *can* do it--we don't + have to tell them how to do it (or that it's possible)."
diff --git a/specification/archSpec/base/specialization-class-attribute.dita b/specification/archSpec/base/specialization-class-attribute.dita index f2d7b58a..2ea0da25 100644 --- a/specification/archSpec/base/specialization-class-attribute.dita +++ b/specification/archSpec/base/specialization-class-attribute.dita @@ -50,16 +50,22 @@The root element of every topic and map
Response by Eliot Kimber, 18 May 2021:
If @specializations is only relevant to attribute specializations then I think it would + be sensible to allow it to be omitted, with an omitted @specializations being equivalent + to specializations="" (empty or whitespace-only value).
+The counter to that approach is that you can't easily distinguish between really having + no attribute specializations and just forgetting to provide @specializations, but in + that case I think you'd get runtime failures if you actually had specializations that + weren't declared (i.e., your @props specializations aren't recognized so things don't + filter correctly).
+Seems like an edge case in practice since DITA defines a number of out-of-the box + attribute specializations, including now all of the original conditional attributes.
+Every DITA element (except the
OK, what verbiage do we want to add here to cover what we permit with expansion - modules?
-Suggestions from Chris Nitchie:
-DITA elements are never in a namespace. Only the
The
Each specialization of the
The
For example:
The
For example:
In this example, a document-type shell integrates the task structural module and the following domain modules:
The second and third sentence in the definition are problematic, especially the third - sentence. We should clarify which structural modules becomes dependent, and what is in - dependent on.
-Structural modules also can define specializations of, or reuse elements from, domain or + other structural modules. When this happens, the structural module becomes dependent.