cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

FOSI savetext in fillval with ACL

bschanck
5-Regular Member

FOSI savetext in fillval with ACL

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. 

ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

7 REPLIES 7

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!"

bschanck
5-Regular Member
(To:SuzanneNapoleon)

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'm not sure I'm following you. Are you saying you tried this:
 
<savetext conrule="<allcaps.fmt>,#CONTENT,</allcaps.fmt>" textid="subject.pdf" append="1">
 
and it didn't work?
bschanck
5-Regular Member
(To:SuzanneNapoleon)

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.

bschanck
5-Regular Member
(To:bschanck)

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

bschanck
5-Regular Member
(To:SuzanneNapoleon)

This worked by using append="0" and subject.tmp.

Thanks for the help.

Announcements

Top Tags