Skip to main content
1-Visitor
August 2, 2010
Question

FOSI internal file check

  • August 2, 2010
  • 3 replies
  • 1326 views

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

    1-Visitor
    August 2, 2010

    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

    1-Visitor
    August 4, 2010
    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!"

    1-Visitor
    August 5, 2010

    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