C2,

  I plan on answering some of your questions in a series of different messages. Here's the first one:

On 4/6/2022 2:58 PM, cuc tu wrote:
So I need to figure out how to get the formatting to work. It seems I can 
sometimes pick to use a para format, but the attributes do not allow different 
paragraphs for different attributes in the same element. I've tried the 
formatting as shown here and also in the Prefix/Suffix rules.

   XSLT can help you display different attributes in different paragraphs with different formats. If you are given an XML document that contains:

<ScpiCommand
          ClassName="LaunchSetupType"
          ClassLongName="Launch Setup Type"
          ClassDescription="Sets the launch setup type. Outputs the launch setup 
type."
          String="SYSTem:LAUNch:TYPE"
          Overlapping="false"
          Lockable="false"
          Type="Both">
        <CommandParameters>
          <Parameter Name="LaunchSetupType" Type="Enum" Enum="LaunchSetup" 
Description="Launch setup type to be set" />
        </CommandParameters>
        <QueryResultParameters>
          <Parameter Name="LaunchSetupType" Type="Enum" Enum="LaunchSetup" 
Description="Launch setup type to be read" />
        </QueryResultParameters>
        <Examples>
          <Example Name="SYST:LAUN:TYPE LAST" Description="Sets the launch setup type 
to Last." />
          <Example Name="SYST:LAUN:TYPE?" Description="Outputs the launch setup 
type." />
        </Examples>
      </ScpiCommand>

   XSLT can create a new related XML document in which you change the attributes to subelements. Your ScpiCommand element would then start with

<ScpiCommand
          <ClassName>LaunchSetupType</ClassName>
          <ClassLongName>Launch Setup Type</ClassLongName>
          <ClassDescription>Sets the launch setup type. Outputs the launch setup 
type.</ClassDescription>

   and continue with new elements for the remaining attributes and then the original content for the elements. This variation of the original document would be a temporary file that is never saved. Your XML application would specify using XSLT and when you open the provided XML document, FrameMaker would run XSLT to create the temporary file and then open the result to create a structured document that uses subelements instead of attributes. Doing so would allow you to use different paragraph formats for different original attribute values.

Your EDD would reflect the modified structure (with subelements instead of attributes).

    --Lynne

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

_______________________________________________

This message is from the Framers mailing list

Send messages to [email protected]
Visit the list's homepage at  http://www.frameusers.com
Archives located at http://www.mail-archive.com/framers%40lists.frameusers.com/
Subscribe and unsubscribe at 
http://lists.frameusers.com/listinfo.cgi/framers-frameusers.com
Send administrative questions to [email protected]

Reply via email to