Skip to main content
1-Visitor
June 7, 2010
Question

still struggling with FOSI mindset

  • June 7, 2010
  • 13 replies
  • 2294 views

I'm still trying to get FOSI with my XSLT orientation.

I have the following XML

<procedure>

<step>

<challenge>this is a challenge</challenge>

<para>First para in a step but with a challenge preceeding sibling</para>

</step>

<step>

<para>This is a para with no sibling, truly the first child of step</para>

</step>

</procedure>

So how can I apply different formatting to the second para in step 2, than the para in step 1? In both cases they are occurence= first so that test doesn't work. In XLST I would check to see if there was a preceeding-sibling, what is the best way to detect this in FOSI?

..dan

    13 replies

    1-Visitor
    June 9, 2010
    Steve,

    I think you are right on target. If XPath is needed, do it through ACL.

    FWIW: I have been working with FOSI since 1992 and have never needed XPath. Once or twice I have used SYSTEM-FUNC and some ACL to get something from the tree in order to process it in some way and return the result to the FOSI, but that's it.

    Suzanne





    ----------
    1-Visitor
    June 10, 2010
    Hi Suzanne,

    Would you mind explaining why you hold this opinion regarding xpath in fosi
    ie. "Using it directly in the FOSI completely changes the paradigm, in a
    not convenient or flexible way...."

    As I understand it to use xpath in fosi we just need to set the attloc
    to #xpath, and the attname to the required path....
    Are there problems with this method, performance or otherwise?


    thankyou,
    Tracey Orso



    On Thu, Jun 10, 2010 at 9:46 AM, Suzanne Napoleon <
    SuzanneNapoleon@fosiexpert.com> wrote:

    > Steve,
    >
    > I think you are right on target. If XPath is needed, do it through ACL.
    >
    > FWIW: I have been working with FOSI since 1992 and have never needed XPath.
    > Once or twice I have used SYSTEM-FUNC and some ACL to get something from the
    > tree in order to process it in some way and return the result to the FOSI,
    > but that's it.
    >
    > Suzanne
    >
    >
    1-Visitor
    June 10, 2010
    Tracey,
    Actually, that was me expressing that opinion. Suzanne just agreed.

    The "changes the paradigm" part is not opinion. To use XPath directly, you must change a setting that causes the FOSI to be processed in the order the e-i-c's are listed. That is completely different than the usual, which is to process the FOSI based on the best match found for the context and occurrence.

    From that, it directly follows that one is much more constrained in structuring the e-i-c's, and the order becomes of nearly primary importance. In some contexts, one order might be best, while in another, that order is inconvenient, to say the least. Thus, "not convenient or flexible".

    My Two Cents,
    Steve Thompson
    +1(316)977-0515
    ----------