[Date Prev][Date Next]
[Thread Prev][Thread Next]
[Date Index]
[Thread Index]
[New search]
To: framers@xxxxxxxxxxxxxx (Framers List)
Subject: Using Effectivity Attributes in Structured Docs
From: DW Emory <danemory@xxxxxxxxxxxxxxxxxx>
Date: Mon, 04 Aug 2003 12:19:07 -0700
Cc: "FrameSGML List" <FrameSGML@xxxxxxxxxxx>, "Free Framers" <framers@xxxxxxxxx>
Sender: owner-framers@xxxxxxxxx
Below is an elaboration on the discussion provided in my article, "A New Approach to Single Sourcing": =============================================== In many structured applications I've developed recently, I include a strings-type Effectivity attribute in most container-type elements to specify the applicability of the associated content (i.e., it's applicability to different product configurations and/or different document deliverables). The EDD-specified default value of this attribute is All, meaning that the content is applicable to all product configurations and/or document deliverables. In a single-sourcing application, you can use the value of the Effectivity attribute to determine whether content in a master document should be shown or hidden so as to produce a deliverable for a particular product configuration or document deliverable. In that case, you want to hide all content in which the value of the Effectivity attribute is neither All nor (as one of its string values) a particular product configuration. This is easily implemented by adding a choice-type Show/Hide attribute to each element which has an Effectivity attribute. This attribute has two possible values--Show and Hide, with Hide being the default value. Then, the following steps are performed (these steps could easily be implemented using FrameScript or the FDK): 1. Use Find/Change to replace the default value (All) of the Effectivity attribute with a forced value of All. This step is necessary because of an anomalous behavior of FrameMaker which results when the EDD specifies a default value for string-type attribute. When you use Find/ Change to search for the default value in such attributes, it is not found. That's because FrameMaker improperly treats default string values as "No Value" 2. Use Find/Change to search for a value of All in the Effectivity attribute. For all such found instances of this value, the Show/Hide attribute is changed to a value of Show. 3. Next, perform a Find/Change search for an Effectivity attribute having as one of its strings the value corresponding to the desired product configuration. For all such found instances of this value, the Show/Hide attribute is changed to Show. 4. All remaining instances of the Show/Hide attribute retain the default value of Hide. A single Conditional Text setting, Hide, is then applied to all of these elements. Finally, after the deliverable document has been produced, the master document is restored to its deliverable-neutral state by using Find/Change to change all Show/Hide attributes back to the default Hide value, and restoring all conditional text to unconditional text. To demonstrate the flexibility of this approach, consider the following cases: CASE 1: A parent List element is used only in certain product configurations to present steps in a procedure. The Effectivity attributes for the individual list items can retain the default value of All. Nevertheless, if the master document is being used to output a document for a particular product configuration which is not one of the configurations specified in the parent List element's Effectivity attribute, the entire list will be hidden, because the Show/Hide attribute in the parent List element is set to Hide, which applies the Hide conditional text setting to the entire list. CASE 2. A parent List element is used in all product configurations to present steps in a procedure, Thus it's Effectivity attribute retains the default value of All. But there are two list items, numbered 3 and 6 within that list, which have their Effectivity attribute set to indicate that they are applicable only to two particular product configurations. All other list items pertain to all configurations, thus their Effectivity attributes are set to the default value of All. If the master document is being used to output a document for either of the two product configurations specified in the Effectivity attributes for items 3 and 6, those two items will have their Show/Hide attributes set to Show, otherwise their Show/Hide attributes will be set to Hide, and the two list items will be hidden when the Hide conditional text setting is applied to them, and the list items below them will be renumbered. CASE 3. A parent List element, and all of its list items are used in all product configurations to present steps in a procedure, thus their Effectivity attributes are all set to the default value of All. But some list items include text strings which are wrapped with a text range element whose Effectivity attribute specifies that they are applicable only to certain product configurations. If the master document is being used to output a document for a product configuration which is not one of the configurations specified in the Effectivity attributes for those text range elements, the text in those text range elements will have their Show/Hide attribute set to Hide, and they will be hidden when the Hide conditional text setting is applied to them. CASE 4. Any combination of cases 2 and 3 is handled successfully, thus the problem of overlapping and/or conflicting conditional text settings is eliminated, because only one conditional text setting (Hide) is used. FrameMaker/FrameMaker+SGML Document Design & Database Publishing DW Emory <danemory@globalcrossing.net> ** To unsubscribe, send a message to majordomo@omsys.com ** ** with "unsubscribe framers" (no quotes) in the body. **