Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
When I try this I am getting an error at the gray word, because the quote before it close the source string ... if I change to a single quote arround the gray word, it inserts the tag, but it is displayed as text ... Is my FOSI configured wrong?
Also, if I change the < and > to '<' and '>', the tag is not displayed, but it does not render either ...
@ptc-1908075 wrote:
HiSébastien!
The PI for shading is inserted in <entry> tags, so it must be applied to <entry> rather than <row>.In the FOSI fragment below, the e-i-c for entry calls an ACL function named oddeven, which determines whether to insert the PI for shading.
Hope this helps! Please let me know any questions you may have.
Best regards,
Suzanne Napoleon
Suzanne Napoleon@FOSIexpert.com
"WYSIWYG is last-century technology!"
<counter initial="0" style="arabic" enumid="rowct">
<e-i-c gi="row">
<charlist inherit="1" charsubsetref="block">
<enumerat increm="1" enumid="rowct">
</charlist>
</e-i-c>
<e-i-c gi="entry" context="row">
<charlist inherit="1"></charlist>
<att>
<specval attname="oddeven" attloc="SYSTEM-FUNC" attval="even">
<charsubset>
<usetext source="!<?Pub _cellfont Shading="gray"?>!"></usetext>
</charsubset>
</att>
</e-i-c>
When I try this I am getting an error at the gray word, because the quote before it close the source string ... if I change to a single quote arround the gray word, it inserts the tag, but it is displayed as text ... Is my FOSI configured wrong?
Also, if I change the < and > to '<' and '>', the tag is not displayed, but it does not render either ...
There does not appear to be a way to handle row shading via the FOSI. I suggest using ACL.
Good luck!
Suzanne Napoleon
"WYSIWYG is last-century technology!"
But I am not doing row shading, I am doing cell shading, by adding the PI to the entry element ...
<e-i-c gi="entry"> <charlist inherit="1" charsubsetref="TypeTable"> <indent inherit="0" rightind="0pt" firstln="*0pt"> <presp minimum="0pt" nominal="0pt" maximum="0pt" priority="force"> <textbrk startln="1" endln="1"> <savetext textid="background.color" conrule='!<?Pub _cellfont Shading="gray"?>!'> <usetext source='background.color'></usetext> </charlist>
I expected this to make all the cells gray ... It does nothing. If this work, I will use an attribute on the cell (called background-color) to set the color of the shade.
If I do give up on the FOSI route, how do I trigger the ACL to create the PI? Do I use a callback or a Hook?
Unfortunately, a FOSI-generated PI for shading a table cell has no effect, so I suggest using ACL to find the desired <entry> elements and insert the PI.
If you format/print/create PDF from an open document, you can call your function from the command line before formatting/printing/creating PDF; for example:
add_Shading()
If you use a script to format/print/create PDF, add the function before the format/print/create PDF command.
Good luck!
Suzanne
Thanks, Suzanne!
I am looking at formating the table for display only ... I am looking for the correct event to trigger the code.
will formatbeforehook be called before the XML is rendered for display?
Should I trigger an ACL function from FOSI?
Thanks,
Yakir
This is now outside my area of expertise. I suggest you start a new subject asking for advice on calling an ACL function to insert cell shading PIs in tables when a document is opened. It sounds like you also want to remove those PIs before formatting the document and when the document is closed -- true?
Good luck!
Suzanne