🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.framemaker.sgml
Article #1492

Re: Conditional formating based on child element

#1492
From: Lynne_A._Price
Date: Sun, 23 Jul 2006 15:24
24 lines
2237 bytes
Carlos,
  Since you have a large XML document that already exists, consider using XSLT to create a related document that FM can more easily format the way you want. In particular, change

<P_AREA>
     <p_content>
        <p_variation>

to something like:

<P_AREA>
     <p_content before_p_variation="yes">
        <p_variation>

I only recommend this technique if all editing is being done outside FM, that is, if you are using FM only to format existing material. Working entirely within FM, I would find it prohibitively tedious to set the before_p_variation attribute. A plug-in or FrameScript could set it automatically, or you could save the FM document to XML, run XSLT to set the attribute, and read the result back into FM.

By the way, the Dev Guide's description of context specifications such as

{before p_variation}

is accurate. However, it does not apply to your situation. Even though the start-tag for the p_content element occurs before the start-tag for the p_variation element, the p_content element does not precede the p_variation element; it contains the p_variation element. As an analogy, consider a section within a chapter of a book. The chapter may start before the section (since it probably has a title and may have other sections before the particular section), but the section is part of the chapter, not something that follows it.

As far as the use of the word "sibling" to describe context specifications within curly braces, you are correct that it applies only to subelements and the same level (just as it would in a family tree).

--Lynne
Technical Details
Message-ID: <3bc0ff17.2@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news1.google.com!news.germany.com!news.ispa.de!news.ecp.fr!news.stben.net!webcrossing
References: <3bc0ff17.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: fcc08,df1e4d00f12a0903
X-Google-Attributes: gidfcc08,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Lynne_A._Price@adobeforums.com
Newsgroups: adobe.framemaker.sgml
Subject: Re: Conditional formating based on child element
Message-ID: <3bc0ff17.2@webcrossing.la2eafNXanI>
Date: Sun, 23 Jul 2006 08:24:26 -0700
References: <3bc0ff17.-1@webcrossing.la2eafNXanI>
Lines: 41
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news1.google.com!news.germany.com!news.ispa.de!news.ecp.fr!news.stben.net!webcrossing