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

Re: Default anchored frame position



At 10:54 PM 6/9/2005, Steve Whitlatch wrote:
How would one make the anchored frame properties available as attributes?
Similar to what I posted?

Steve, Read/write rules similar to those in your previous message are used to set anchored frame properties during XML import; Stephane, however, was asking for a method of setting defaults that would be used when she created new anchored frames when editing FrameMaker documents.


What does "notation" mean in

            notation attribute "align"
              {
                is fm property alignment;
                value "left" is fm property value align left;
                value "center" is fm property value align center;
                value "right" is fm property value align right;
              }

"notation" is used several different ways in the docs, mostly what I find is
in connection with writing output. What's happenning in the above read/write
rule?

While the above read/write rule is permitted, it doesn't make much sense.


When FrameMaker creates a DTD from an EDD, it has a default way of declaring every attribute. For example, an optional FrameMaker integer attribute named 'intatt' is declared in an XML DTD as:

<!ATTLIST ...
    intatt NMTOKEN #IMPLIED
...>

You can change this behavior by specifying a declared value at the beginning of an attribute rule.
For example, the rule:


cdata attribute "intatt" is fm attribute;

causes the above declaration to be replaced by

<!ATTLIST ...
    intatt CDATA #IMPLIED
...>

You are probably familiar with declared notations used in the declaration of data entities for graphics, for example:

<!ENTITY af1 SYSTEM "intro1.gr" NDATA TIFF>

Here, the DTD must declare TIFF to be a notation.

Another use of notations is in enumerated type attributes. An element type can have a single attribute type whose value is a notation attribute that is used to identify the notation or format of elements' content. For example, you might give a <formula> element an attribute with possible values "chemical" or "algebra". While you could declare the attribute as:

<!ATTLIST formula
    type (chemical | algebra) #REQUIRED
>

you could also declare it as

<!ATTLIST formula
    NOTATION type (chemical | algebra) #REQUIRED
>

as long as chemical and algebra are notations that are also declared in the DTD.

In a FrameMaker EDD, both variations would be declared as a choice attribute. If you develop the EDD first and then export the DTD from the EDD, FM by default generates a declaration of the first form above. You can use a rule such as

notation attribute "type" is fm attribute;

to generate a declaration of the second form instead.

Which finally takes us back to your question. In the following rule:

            notation attribute "align"
              {
                is fm property alignment;
                value "left" is fm property value align left;
                value "center" is fm property value align center;
                value "right" is fm property value align right;
              }

FM uses the keyword "notation" when it is generating a DTD from an EDD to declare
the align attribute as a notation attribute. For XML documents that use the resulting
DTD to be valid, the values "left", "center", and "right" must be declared as notations.


Note: The above description is based on SGML functionality; I assume but have not
tested that FM uses these rules in the same way when generating XML DTDs.


--Lynne



Lynne A. Price
Text Structure Consulting, Inc.
Specializing in structured FrameMaker consulting, application development, and training
lprice@xxxxxxxxxxxx http://www.txstruct.com
voice/fax: (510) 583-1505 cell phone: (510) 421-2284




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