Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
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.
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!"
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
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
I understand that. So can I use the FOSI to create generated text on PIs I insert into the instance?
If I have in the instance:
<?Pub _source_data>
Can I create generated text for the above PI?
That is what I am trying to do.
Thanks.
John
Arbortext Editor and FOSI formatting do not recognize non-proprietary processing instructions. FOSI formatting for Arbortext PIs is discussed in a 43-page section in Chapter 11 of my book Practical FOSI (available for purchase at Practical FOSI). PDF of the book's TOC, LOT, and LOF is attached, as well as PDF of the TOC for the section on PIs.
Maybe a supported PI would work for you, but there is no need for that; it just adds unnecessary complexity. Your best bet is to code the gentext in the e-i-cs for elements in the document.
Note that with FOSI formatting, the source document is never altered in any way. FOSI formatting is a batch, black-box process that creates only machine-readable files. , No formatted version of the source document is created that can be modified independently from the source document and then output. With FOSI formatting, there is always only one source document, which ensures the integrity of the content database..
Suzanne
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>
Have the suggestions provided been useful?
If so, could you indicate the correct answer, so the community will know.
Thank you.
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.
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
We had this problem.
Capacity limit IDCAP exceeded. The number of points to add is 288;
the program has already used 299880 points and the declared maximum
value is 300000
I copied the ati-unc.dcl file from C:\Program Files (x86)\PTC\Arbortext Editor\entities\ati-unc.dcl (or similar) and put it in my dtd folder, renaming ati-unc to match the dtd name. I changed the values of TOTALCAP, IDCAP and IDREFCAP to 5000000 and recompiled the dtd.