473,473 Members | 2,169 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

'Replacement strings' in tagged data

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
Jul 20 '05 #1
1 1251
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
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Steve S. | last post by:
I am looking for something in .NET that is functionally equivalent to the VB6 Mid() function, which allows me to replace a portion of a string at a specific position with another string. What I...
2
by: Art | last post by:
Hi & help, I'm trying to parse arithmetic expressions such as 4*(7-2.1). The first thing I'm trying is to add spaces to get: 4 * ( 7 - 2.1 ). I thought that Regular Expressions would be the...
4
by: Sjaakie | last post by:
I need to replace parts of a string, in a collection deserialized from an XML file, with values from another collection. Is there another, more clever/faster/better, method than the loops below? ...
7
by: Johan Tibell | last post by:
I use a tagged union to represent different expression types in one of my programs. struct exp { enum { LIT, VAR } type; union { int lit;
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.