'Replacement strings' in tagged data

Discussion in 'XML' started by RobM, Aug 28, 2004.

  1. RobM

    RobM Guest

    Greetings

    Am embarking on new project creating PDF using Apache FOP; XML + XSL:FO to
    PDF. Just looking at my data, designing XML layout, I have a string of text
    that currently (this is a rewrite PB into Java) has embedded tags within it,
    as stored on the database. This is a legal description of an Act/Section for
    example:

    You owe at lease <X> days rent. Your rent is paid up to <Y> therefore your
    owe $<Z>.

    I can obviously have X, Y & Z as normal separate tags within the XML file,
    its just that the description is on the database table and mostly this
    Act/Section description doesnt have embedded variables, e.g. "You caused
    problems with the neighbours". So I first thought...

    <section_description>You caused problems with the
    neighbours</section_description>

    .... which is OK for the XSL/FO to place on the doc. But... there's the rare
    occurrence where this includes replacement variables within.

    I can either easily parse this myself replacing any embedded variables when
    writing the XML file after reading text from the database
    <section_description> tag, OR.... is a way of having all the fields in the
    file and this <section_description> parsed with the variables at
    Transformation time?

    e.g. (making this up!)

    <days>14</days>
    <rent_paid_to>22 August 2004</rent_paid_to>
    <amount_owed>456.50</amount_owed>

    <section_description>You owe at lease <some_sort_of_tag value="days"> days
    rent. Your rent is paid up to <xsl:value-of select="rent_paid_to"/>
    therefore your owe $<Z>.

    I think the second tag above for rent_paid_to might be it - but this means I
    have to embed the XSL tags in the description in the database - no probs. Is
    this the way you'd go? Your thoughts appreciated.

    Cheers
    Rob
     
    RobM, Aug 28, 2004
    #1
    1. Advertising

  2. RobM

    RobM Guest


    > e.g. (making this up!)
    >
    > <days>14</days>
    > <rent_paid_to>22 August 2004</rent_paid_to>
    > <amount_owed>456.50</amount_owed>
    >
    > <section_description>You owe at lease <some_sort_of_tag value="days"> days
    > rent. Your rent is paid up to <xsl:value-of select="rent_paid_to"/>
    > therefore your owe $<Z>.
    >
    > I think the second tag above for rent_paid_to might be it - but this means

    I
    > have to embed the XSL tags in the description in the database - no probs.

    Is
    > this the way you'd go? Your thoughts appreciated.
    >
    > Cheers
    > Rob
    >


    ....which means embedded <xsl...> tag in the XML file - whereas I have to
    XSL/XSL:FO tags in an associated XSL file. Is this correct?

    Cheers
    Rob
     
    RobM, Aug 28, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sudsy
    Replies:
    1
    Views:
    344
    Brad BARCLAY
    Jan 7, 2004
  2. mikea_59
    Replies:
    1
    Views:
    619
    Martin Honnen
    Jan 13, 2005
  3. Ranga

    scope and life of tagged structure

    Ranga, Mar 17, 2005, in forum: C Programming
    Replies:
    4
    Views:
    373
    CBFalconer
    Mar 20, 2005
  4. Johan Tibell

    Tagged unions

    Johan Tibell, Jul 21, 2006, in forum: C Programming
    Replies:
    7
    Views:
    407
    Chris Torek
    Jul 22, 2006
  5. metal
    Replies:
    2
    Views:
    296
    Kay Schluehr
    Dec 12, 2009
Loading...

Share This Page