Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Using the FOSI in ArborText v6.1 I am trying to convert XML content to upper case for PDF bookmark. I using the following in the FOSI.
<att>
<fillval attname="pdfbookmark::changeCase" attloc="SYSTEM-FUNC" fillcat="savetext" fillchar="conrule">
<charsubset><savetext textid="subject.pdf" append="1"></charsubset>
</att>
With the ACL
package pdfbookmark;
function changeCase(window,oid){
return toupper(oid_content(oid))
}
When I publish the using the FOSI the savetext content is not shown.
When I use the same ACL for usetext in fillval it works.
Not sure why this is not working.
Solved! Go to Solution.
You could try saving the return value to an unappended string and then saving that to the appended string. If that doesn't work, a solution using an ACL preprint process follows.
<fillval attname="pdfbookmark::changeCase" attloc="SYSTEM-FUNC" fillcat="savetext" fillchar="conrule">
<charsubset>
<savetext textid="subject.tmp" append="0">
<savetext textid="subject.pdf" conrule="subject.tmp" append="1">
</charsubset>
If the above doesn't work, this should:
1. Add a pseudo-attribute to be used by the title element.
2. Develop an ACL preprint process that finds each title, converts it to all caps, and writes it to the pseudo-attribute.
3. Change the FOSI to fillval from the pseudo-attribute instead of using #CONTENT.
Good luck!
Suzanne
I don't think you need ACL for this. The highlt category can be used for all caps. For example:
<highlt inherit="1" allcap="1">
You can code highlt in a formatting pseudo-element and save it with #CONTENT to a text string:
<e-i-c gi="allcaps.fmt">
<charlist inherit="1">
<highlt inherit="1" allcap="1">
</charlist>
</e-i-c>
...
<savetext conrule="<allcaps.fmt>,#CONtENT,</allcaps.fmt>" textid=...
The highlt category is documented in Arbortext Help and in my book Practical FOSI, which is available at fosiexpert.com/Practical-FOSI.html. My FOSI QuickStart Tutorials are also available on my website.
Good luck!
Suzanne Napoleon
www.FOSIexpert.com
"WYSIWYG is last-century technology!"
I had tried that originally, but since this is used to create the PDF bookmark, this is ignored. That is why I was trying to use the ACL to force the text to be upper case.
Again, the ACL worked when used with usetext, but not savetext.
I am using the subject.pdf later to create the PDF bookmark with
!<atidmd:Bookmark state='closed'><atidmd:Title>!,subject.pdf,!</atidmd:Title></atidmd:Bookmark>!
It seems the "<allcaps.fmt>,#CONTENT,</allcaps.fmt>" it is not processed or ignored when the FOSI generates the PDF bookmark.
I have attached a sample trying to use the <allcap> pseudo tag and the PDF result.
You could try saving the return value to an unappended string and then saving that to the appended string. If that doesn't work, a solution using an ACL preprint process follows.
<fillval attname="pdfbookmark::changeCase" attloc="SYSTEM-FUNC" fillcat="savetext" fillchar="conrule">
<charsubset>
<savetext textid="subject.tmp" append="0">
<savetext textid="subject.pdf" conrule="subject.tmp" append="1">
</charsubset>
If the above doesn't work, this should:
1. Add a pseudo-attribute to be used by the title element.
2. Develop an ACL preprint process that finds each title, converts it to all caps, and writes it to the pseudo-attribute.
3. Change the FOSI to fillval from the pseudo-attribute instead of using #CONTENT.
Good luck!
Suzanne
This worked by using append="0" and subject.tmp.
Thanks for the help.