Skip to main content
arnor33453439
Inspiring
September 7, 2016
Answered

Import xml with attributes how to apply pagination property

  • September 7, 2016
  • 1 reply
  • 585 views

I have xml files in which the pagination is set by means of an attribute. The value of this attribute must be read and applied to the paragraph format in FrameMaker during the import of the xml files. I assume this must be dealt with by means of the read write rules. But how?

This topic has been closed for replies.
Correct answer Lynne A. Price

Arnor,

   To control the paragraph format with an attribute, use format rules in the EDD rather than read/write rules. You can not copy an attribute value to a property value, but can test for specific attribute values and set a property accordingly. For example, if you have an attribute named Widow and are sure the value will never exceed 10, you can tediously have a rule such as:

1. If context is: [Widow = "1"]

         Pagination properties

              Widow/orphan lines: 1

    Else, if context is [Widow = "2"]

         Pagination properties

              Widow/orphan lines: 2

            ...

    Else, if context is [Widow = "10"]

         Pagination properties

              Widow/orphan lines: 10

For other paragraph pagination properties, your EDD also needs to test for possible values, for example:

2.  If context is [Placement = "RunIn"]

         Pagination properties

             Placement: Run-in head

                   Default punctuation: .

     Else, if [Placement = "Side"]

             Placement: Side head

Of course, the attribute names can be quite different from FrameMaker's property names or value keywords.

      --Lynne

1 reply

Lynne A. PriceCorrect answer
Inspiring
September 7, 2016

Arnor,

   To control the paragraph format with an attribute, use format rules in the EDD rather than read/write rules. You can not copy an attribute value to a property value, but can test for specific attribute values and set a property accordingly. For example, if you have an attribute named Widow and are sure the value will never exceed 10, you can tediously have a rule such as:

1. If context is: [Widow = "1"]

         Pagination properties

              Widow/orphan lines: 1

    Else, if context is [Widow = "2"]

         Pagination properties

              Widow/orphan lines: 2

            ...

    Else, if context is [Widow = "10"]

         Pagination properties

              Widow/orphan lines: 10

For other paragraph pagination properties, your EDD also needs to test for possible values, for example:

2.  If context is [Placement = "RunIn"]

         Pagination properties

             Placement: Run-in head

                   Default punctuation: .

     Else, if [Placement = "Side"]

             Placement: Side head

Of course, the attribute names can be quite different from FrameMaker's property names or value keywords.

      --Lynne

arnor33453439
Inspiring
September 8, 2016

Lynne,

Thanks for your clear reply!

I will change my EDD accordingly and keep you posted.

Regards,

Arno