Skip to main content
1-Visitor
April 21, 2016
Question

using fosi to format pseudo elements

  • April 21, 2016
  • 3 replies
  • 5125 views

I created pseudo elements in my document with ACL:

<?Pub _source_data><?Pub _rqrd_item

attr1="source2" attr2="Required Source Data Item"><?Pub /_rqrd_item><?Pub

_src_item attr1="source1" attr2="value1"><?Pub /_src_item><?Pub _src_item

attr1="source3" attr2="value3"><?Pub /_src_item><?Pub /_source_data>

I am trying to use the FOSI to format these elements:

<e-i-c gi="_source_data">

<charlist charsubsetref="standalone">

<usetext source="\SOURCE DATA:\" placemnt="after">

<subchars charsubsetref="gentext"></subchars>

</usetext>

</charlist>

</e-i-c>

I can't seem to get it to work.  Am I missing something.  I am using PTC 5.3.

    3 replies

    12-Amethyst
    April 21, 2016

    Hi John,

    What you are referring to as pseudo-elements are actually processing instructions. However, before getting into processing instructions and formatting, I am curious why the PIS are needed. Generally an element in the document outputs generated text such as "Required Source Data Item."

    Suzanne Napoleon

    www.FOSIexpert.com

    "WYSIWYG is last-century technology!"

    jbaklayan1-VisitorAuthor
    1-Visitor
    April 21, 2016

    The users don’t want any of that information stored in the instance.  That information is pulled from a database and only needs to be displayed.


    Thanks. 

    John

    12-Amethyst
    April 21, 2016

    Hi John,

    FOSI-generated text is not stored in the document. Generated text exists only in the stylesheet and in the formatted output. Different FOSI stylesheets that output different gentext can be used to format the same source document. The document is never changed.

    Suzanne

    12-Amethyst
    April 23, 2016

    What is the element and the context of the element that is to receive this "SOURCE DATA: ", gentext?

    Is the gentext output based on a condition of the element, first, last, not first, etc., or is it based on the condition of value of one of the element's attributes? For example <para role="SD">example...</para><para>example...</para>

    In the FOSI, then you would have

    <!-- *** Example showing attribute testing *** -->

    <e-i-c gi="para">

    <charlist charsubsetref="standalone"></charlist>

    <att><specval attname="role" attval="SD" attloc="para">

    <charsubset>

    <usetext source="\SOURCE DATA:\" placemnt="before">

    </charsubset>

    </usetext>

    </att>

    </e-i-c>

    <!-- *** Example showing context usage *** -->

    <e-i-c gi="para" context="address">

    <charlist inherit="1" charsubsetref="standalone">

    <usetext source="\SOURCE DATA:\" placemnt="before">

    </charlist>

    </e-i-c>

    <!-- *** Example showing occurence usage *** -->

    <e-i-c gi="para" occur="first">

    <charlist inherit="1" charsubsetref="standalone">

    <usetext source="\SOURCE DATA:\" placemnt="before">

    </charlist>

    </e-i-c>

    12-Amethyst
    April 28, 2016

    Have the suggestions provided been useful?

    If so, could you indicate the correct answer, so the community will know.

    Thank you.

    jbaklayan1-VisitorAuthor
    1-Visitor
    April 28, 2016

    Since I couldn't get the FOSI to format the PIs, I decided on a different approach.  I was able to insert pseudo attributes, such as <?Pub Lcl src-rqrd1="Drawing">, which the FOSI would recognize as attributes on the parent element.  I could then use the FOSI on those attributes as long as I included those attributes in the atiattr.cf file.

    The issue I am having now is when normalizing some of the FOSIs I am running into the error:

    Capacity limit IDREFCAP exceeded. The number of points to add is 288;

    the program has already used 299880 points and the declared maximum

    value is 300000

    Trying to resolve that issue now.

    Thanks.

    12-Amethyst
    May 2, 2016

    I do not know what you mean by "normalizing some of the FOSIs."


    Also, using pseudo-attributes adds complexity, so I am curious why you do not want to code FOSI-generated text in e-i-cs for DTD elements.


    If the gentext is subject to change, it doesn't not have to be hard-coded in the FOSI. The current values can be stored in strings in an ACL file that is sourced before formatting, and the FOSI will use those values. That seems simpler and easier than adding pseudo-attributes and a process to fill them.


    For example:

    ACL

    ===

    $title1=SOURCE DATA


    FOSI

    ====

    <fillval attloc="system-var" attname="title1" fillcat="usetext" fillchar="source">

    <charsubset>

    <usetext><usetext>

    </charsuset>

    </fillval>


    OUTPUT

    =======

    SOURCE DATA


    Suzanne