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.
"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:
If you use a script to format/print/create PDF, add the function before the format/print/create PDF command.
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?
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?