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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

FOSI internal file check

ebheadrick
1-Newbie

FOSI internal file check

Hi,

Has anybody done a check to see if an internal file (i.e. index.app) if it exists? What my problem is that we have a template that always puts in an Index tag even when there aren't index entries. So what I would like to do is check to see if the index.app file has anything in it before I put out the Index header etc. I think it might be some kind of system-func or #FOSI type check, but I haven't come up with anything yet.

Thanks,
Ellen

3 REPLIES 3

I changed my thinking on this and just set a counter inside the index term to check to see if there were any in the document.



In Reply to Ellen Headrick:

Hi,

Has anybody done a check to see if an internal file (i.e. index.app) if it exists? What my problem is that we have a template that always puts in an Index tag even when there aren't index entries. So what I would like to do is check to see if the index.app file has anything in it before I put out the Index header etc. I think it might be some kind of system-func or #FOSI type check, but I haven't come up with anything yet.

Thanks,
Ellen

Ellen,

If i correctly understand what you are trying to do, I think something like the
following should work -- as long as index.app is not modified in the same e-i-c
with the specval:

<specval attloc="#FOSI" attname="index.app" attval="#ANY">
<charsubset>
<usetext source="index.app">...

Note that when a string or counter variable is modified in an e-i-c, that
variable cannot be tested or used with #FOSI in the same e-i-c (well, you can
code it, but it doesn't work right). However, you can put the #FOSI attribute
rule in a pseudo-element that is called from a usetext in the original e-i-c. As
I recall though, this approach does not work when the pseudo-element formatting
is to apply to element content because the pseudo-element content is not the
same as the e-i-c content (set gentexttagdisplay=full at the command line to see
pseudo-elements in the Edit window).

Good luck!
Suzanne Napoleon
www.FOSIexpert.com
"WYSIWYG is last-century technology!"


Suzanne,
FYI, it didn't work, it always thought the index.app was none/empty, so even when I had an index it didn't come out.

Ellen
Top Tags