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

Re: Formatting elements on import of XML to FrameMaker



At 12:03 AM 10/15/2004, sverre.ola.medalen@xxxxxxxxxxxxx wrote:
We receive documents structured according to the Docbook DTD. In this
structure there is constructs like:

<para>
  <orderedlist>
    <listitem>
      <para>Text</para>
    </listitem>
   </orderedlist>
  </para>

I have read the Structure Application Developeer's Guide from Adobe to
learn the syntax for mapping XML elements to FrameMaker paragraph
formats. I have found how to map child elements of parent elements to
paragraph formats and how to map sibling elements to paragraph formats.
In this case I would like to map the <para> parent element of the
<ordered> element to a paragraph format. I have not found the syntax for
building the correct EDD rule. Does any of you have some good
information on this to share? I'm looking for a good book on this
subject as an alternative to Adobe's document. Any suggestions are
appreciated.

Sverre,
To map a <para> within an <orderedlist> you can use the context specification
listitem < orderedlist
or
* < orderedlist


within the rule for <para>. The first variation refers to a <para> in a <listitem> that is in an <orderedlist>, the second to a <listitem> that is a descendant of an <orderedlist> regardless of any intervening elements.
Be careful, though, do you ever have two <para> elements within one <listitem>:


<para>
  <orderedlist>
    <listitem>
     <para>first para</para>
     <para>second para</para>
   </listitem>
   </orderedlist>
  </para>

If so, you'll probably want the two paragraphs formatted differently. You can use a context specification such as:
{first} < listitem < orderedlist
in a rule for <para> to refer to the first <para> in a <listitem> in an <orderedlist>, or you can simply use a first paragraph rule (instead of a text format rule) for <listitem>.


By the way, are you writing a DocBook application from scratch? FrameMaker includes a DocBook starter kit. It's not a complete application, and it has some bugs, but it does get you started. There's a separate short manual for it, also in the online manuals folder.

--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.   **