in reply to Help translating into HTML

I get these results:

Input with C:

C 1010 K Perl K is K cool F 1234 S Alright R Whatever R More R BlaBla
Output with C:
<c> <p>%Perl,%is,%cool</p> <t> <setflag param="1234"/> <set name="temant">Alright</set> <r> <li>Whatever</li> <li>More</li> <li>BlaBla</li> </r> </t> </c>
Input with I:
I 1010 K _EXE F 1234 R Whatever R More R BlaBla
Output with I:
<c> <p>_EXE</p> <t> <ifflag param="1010"> <then> <setflag param="1234"/> <r> <li>Whatever</li> <li>More</li> <li>BlaBla</li> </then> </ifflag> </r> </t> </c>
Input special case:
K Special K Case R One R Two R Three
Output special case:
<c> <p>%Special,%Case</p> <t> <r> <li>One</li> <li>Two</li> <li>Three </li> </r> </t> </c>
Is this what you get?

Replies are listed 'Best First'.
Re^2: Help translating into HTML
by mrxg4 (Initiate) on Jul 18, 2004 at 20:47 UTC
    Yeah, when you set the DATA as individual blocks such as the ones you demo'ed, then it works flawlessly, but try setting DATA to say..

    C 90
    K One
    K Two
    F 1234
    R This
    R Is
    R The
    R First
    R Example
    #
    K Second
    F 4321
    R Second
    R Example
    #
    # Some
    # Comments
    #
    K Last
    F 0101
    F 0202
    F 0303
    R This
    R Is
    R The
    R Third
    R And
    R Last
    R Example

    Then you'll realize that the problem is the program interprets the whole input as one block, when in reality theres dozens and dozens of them.

    Hope its a bit clearer now.

    Thanks.

    Kind Regards,
    Marcos
      Please John, don't give up now, I know you're close.

      Whats the point of giving up right now..?

      I really appreciate all the help you've given so far, honestly.

      Best Regards,
      Marcos
        To hell with it, thanks for the try though.