[Date Prev][Date Next] [Thread Prev][Thread Next]
[Date Index] [Thread Index] [New search]

Re: FM+SGML: Attribute Indicators in Object Format Rules



Your problem is that you haven't specified a default value for the "Role"
attribute, thus, if the attribute has no value in the SGML document
instance, no default value is applied to it when the instance is imported
into FM+SGML, consequently the cross-feference format is indeterminate. You
could solve this by one of the following methods:

1. Add a default value for the Role attribute in the EDD.
                                OR
2. Add a final rule to the Initial format rules for Doc Reference in the EDD:

        Else
           Use cross-reference format: (name of a default xref format)
This rule applies only when an instance of the Role attribute has no value.

Be aware also that, when authoring/modifying a document in FM+SGML, the EDD
must either specify that the Role attribute has a default value, or that the
attribute has a Required value, otherwise, the cross-reference format will
be indeterminate, and you must then manually select the cross-reference
format, and subsequently enter the corrsponding attribute value in the Role
attribute. The best remedy is to make the Role attribute have a Required
value, in which case you can choose "Always Prompt for Required Attribute
Values" in New Element Options. Then, when you insert a Doc Reference
element, you will always be prompted to enter a value for the Role attribute
before the element can be inserted. Then, the specified cross-reference will
be pre-selected in the Cross-Reference dialog.

The same problems described above for cross-references also apply to other
element types (e.g., marker and table elements) that have initial
format/marker type rules when the initial format/marker type is specified by
an attribute value. That is, one of the following methods must be used in
the EDD to handle the format/type-specifying attribute:

1. Make the Attribute have a Required value (as opposed to Optional), OR
2. Specify a default attribute value for the attribute, OR
3. Use a final Else rule in the initial format rules to handle the case
   where the attribute has no value. 
  
At 02:40 PM 4/30/99 -0400, Anthony Villa wrote:
>Hello Framers,
>
>Has anyone encountered a problem getting attribute indicators to work
>properly in context rules for cross-reference elements? The attribute
>indicators work correctly for text format rules, but not in object
>format rules. Here's an example taken from my EDD:
>Element (CrossReference): Doc Reference
>	Attribute list
>		Name: Refid	ID Reference	Required
>		Name: Role	Choice	Optional
>		Choices:	DocExt | Edition | ISBN | Service
>	Initial cross-reference format
>		If context is: [Role = "DocExt"]
>				Use cross-reference format: DocExt
>Format
>			Else, if context is: [Role = "ISBN"]
>				Use cross-reference format: ISBN Title
>
>It seems that when the SGML instance is read into Frame, the <unresolved
>cross-reference> token appears, despite the fact that the
>cross-reference formats actually exist in the template. The only
>condition that works correctly is when I reverse the attribute check to
>the negative: [Role != "DocExt"]. Then all of the cross-reference
>elements take the specified cross-reference format.
>
>Your help is much appreciated.
     ====================
     | Nullius in Verba |
     ====================
Dan Emory, Dan Emory & Associates
FrameMaker/FrameMaker+SGML Document Design & Database Publishing
Voice/Fax: 949-722-8971 E-Mail: danemory@primenet.com
10044 Adams Ave. #208, Huntington Beach, CA 92646
---Subscribe to the "Free Framers" list by sending a message to
   majordomo@omsys.com with "subscribe framers" (no quotes) in the body.


** To unsubscribe, send a message to majordomo@omsys.com **
** with "unsubscribe framers" (no quotes) in the body.   **