473,606 Members | 2,200 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Finding the value of "TOP" from prior block-containers used

Hi all,

My main problems are:::::::::

1. Set a value within a block container that can be used and changed by
subsequent templates/block-containers/tables etc..
2. get/determine/find the setting that tell the process that the new
top of the document region is now at the end of the last
block-container used, this must be set in that last block container.
3. find the value used in the 'top" setting on the prior
position="absol ute" in the block container.

What I am trying to do is::::::

We have an existing system that has some reports; these reports need to
be reproduced verbatim in a PDF format using XML&XSL --> FOP --> PDF.

The reports aren't to complex and we have devised a way in which the
existing programs can write out a useful XML file that has the
structure as per the previous report, see XML further down.

The text and structure of the report will be kept using an XSL style
sheet.

I have automated the XSL creation as there a many reports that are
required so it doesn't make sense to sit down and manually code these
to style sheets, I wrote a program that looked at the structure of
existing reports and wrote the appropriate XSL syntax for it (but I
need a workable template!!, so this is what is sending me a bit,loopy)
I have been able to get the XML elements to line up correctly, but the
main problem is that some of the elements need to be placed in an exact
position (lines down) on the page, and then the rest of the elements
need to be placed after that absolute positioned block. This means I
don't care about the positioning of any XML tags that follow the TAG
that was absolutely positioned via the block-container, but, the
following XML tags (and content etc.) should start after the block
container that was absolutely positioned (confused, well, whose on
first).

What I have done so far:::::::CPI & LPI conversion

Match the report LPI and CPI --> easy enough done by using courier new
and setting line-height and height as an attribute of the
block-container or the table that is being used. Some report lines need
to absolutely positioned --> Can be done via the shorthand
block-container position="absol ute", in fact works greater. Please see
following:

<fo:block-container xsl:use-attribute-sets="block-container"
top="1*{$doc-line}in">

<xsl:attribut e-set name="block-container">
<xsl:attribut e name="position" >absolute</xsl:attribute>
<xsl:attribut e name="width">10 0%</xsl:attribute>
<xsl:attribut e name="height">0 .1in</xsl:attribute>
<xsl:attribut e name="line-height">0.1in</xsl:attribute>
</xsl:attribute-set>

<fo:table xsl:use-attribute-sets="table">

<xsl:attribut e-set name="table">
<xsl:attribut e name="table-layout">fixed</xsl:attribute>
<xsl:attribut e
name="inline-progression-dimension.maxim um">100%</xsl:attribute>
<xsl:attribut e name="height">0 .1in</xsl:attribute>
<xsl:attribut e name="line-height">0.1in</xsl:attribute>
</xsl:attribute-set>

I am using the xsl:use-attribute-sets as the attribute set resides in
another XSL, it made sense to me that. If I wish to change this for any
reason I could change it one place, and it would update all the style
sheets that use it.

Please also note that in the block-container I have used the
top="1*{$doc-line}in". The 1 is a static value for each
block-container, the program I have written to create the XSL places it
there and, the $doc-line is a global variable that has been set to 0.1,
so the calculation top=1*0.1 in or top = 0.1in, this means that the
absolute positioning of this 0.1in from the top, as the lines on the
previous reports were 10 lines per inch it matches perfectly.

What I have done so far::::::: detail line conversion.

The detail line is broken up into table-columns, each detail line can
be different to the last, but I need to keep the details of the lineup
of the line to be the same so it will match the previous report, the
way I did this was to use the following, please note the prior report
was 132 chars across, so this report should be the same, also that the
proportional-column-width() will add up to 100% even though the total
is 132, that is that it will add up all then proportion them to the
100% used.

<xsl:template match="DTL01">
<fo:table xsl:use-attribute-sets="table">
<fo:table-column column-width="proporti onal-column-width(7)"/>
<fo:table-column column-width="proporti onal-column-width(3)"/>
<fo:table-column column-width="proporti onal-column-width(40)"/>
<fo:table-column column-width="proporti onal-column-width(3)"/>
<fo:table-column column-width="proporti onal-column-width(30)"/>
<fo:table-column column-width="proporti onal-column-width(49)"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell text-align="right">
<fo:block>
<xsl:call-template name="formatZer oDecimals">
<xsl:with-param name="number" select="CLTKYC"/>
</xsl:call-template>
</fo:block>
</fo:table-cell>
<fo:table-cell/>
<fo:table-cell>
<fo:block>
<xsl:value-of select="CLNAMC"/>
</fo:block>
</fo:table-cell>
<fo:table-cell/>
<fo:table-cell>
<fo:block>
<xsl:value-of select="ADDR1C"/>
</fo:block>
</fo:table-cell>
<fo:table-cell/>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:template>

This is the second main detail line:::::: (again 132)

<xsl:template match="DTL02">
<fo:table xsl:use-attribute-sets="table"/> <!-- space line -->
<fo:table xsl:use-attribute-sets="table">
<fo:table-column column-width="proporti onal-column-width(53)"/>
<!-- spaces -->
<fo:table-column column-width="proporti onal-column-width(2)"/>
<!-- text -->
<fo:table-column column-width="proporti onal-column-width(2)"/>
<!-- spaces -->
<fo:table-column column-width="proporti onal-column-width(16)"/>
<!-- phone -->
<fo:table-column column-width="proporti onal-column-width(59)"/>
<!-- spaces -->
<fo:table-body>
<fo:table-row>
<fo:table-cell/>
<fo:table-cell>
<fo:block>P:</fo:block>
</fo:table-cell>
<fo:table-cell/>
<fo:table-cell>
<fo:block>
<xsl:value-of select="PHONEC"/>
</fo:block>
</fo:table-cell>
<fo:table-cell/>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:template>

What I cannot yet do::::::::::::: ::::::::::::::: :::::::!!!???## @@!!

The detail lines i.e. DTL01 & DTL02 must follow an absolutely position
line that is set in about the middle of the page, in some case 3/3 or
1/4 down the page, it varies in some reports.

I have tried creating a variable that is set within the block
container, but it cannot be passed to subsequent templates and the
value is only set within the template that is being processed. In some
cases the absolute positioned tag may not be placed on the report.

There is no counter I can increment for line number or any other number
number I wish to make up. Some things can be counted, like node()
position(), but these are no good to me as I wish to count lines, in
some cases I wish to write a space between the lines (see DTL02).

Variable are static in XSL, and cannot be incremented, that suck, I
mean that really suck, it is like meatloaf through a straw it sucks and
it sucks hard.

What I would like to do is one of the following:::::: :::

1. Set a value within a block container that can be used and changed by
subsequent templates.
2. get the setting that tell the process that the new top of the
document region is now at the end of the last block-container used,
this must be set in that last block container.
Please see full XML:::::::::::: :::::::::::::::

Please note in this case it is the HEADER and the CHEQUE_AMOUNT are the
ones that need to be absolutely positioned, and the DTL01 and DTL02
need to come after the CHEQUE_AMOUNT

<?xml version="1.0" encoding="UTF-8"?>
<REPORT>
<DATE>2309200 5</DATE>
<TIME>1040370 0</TIME>
<LAYOUT></LAYOUT>
<DESIGN></DESIGN>
<CL999>
<HEADER>
<CMPNY_>Compa ny NameXXXXXXXXXXX XXXXXXXXXXXXXXX XX</CMPNY_>
</HEADER>
<TOT01>
<CHEQUE_AMOUNT> 123456</CHEQUE_AMOUNT>
</TOT01>
<DTL01>
<CLTKYC>0000001 </CLTKYC>
<CLNAMC>Clien t NameXXXXXXXXXXX XXXXXXXXXXXXXXX XXX</CLNAMC>
<ADDR1C>Addre ss line 1XXXXXXXXXXXXXX XX</ADDR1C>
<UNDCDC>UCD</UNDCDC>
<_UNDCD>Underwr iter codeXXXXXXXXXXX XXX</_UNDCD>
</DTL01>
<DTL02>
<PHONEC>+03 9576 4533XXX</PHONEC>
</DTL02>
<DTL01>
<CLTKYC>0000002 </CLTKYC>
<CLNAMC>Clien t NameXXXXXXXXXXX XXXXXXXXXXXXXXX XXX</CLNAMC>
<ADDR1C>Addre ss line 1XXXXXXXXXXXXXX XX</ADDR1C>
<UNDCDC>UCD</UNDCDC>
<_UNDCD>Underwr iter codeXXXXXXXXXXX XXX</_UNDCD>
</DTL01>
<DTL02>
<PHONEC>+03 9576 4533XXX</PHONEC>
</DTL02>
<DTL01>
<CLTKYC>0000003 </CLTKYC>
<CLNAMC>Clien t NameXXXXXXXXXXX XXXXXXXXXXXXXXX XXX</CLNAMC>
<ADDR1C>Addre ss line 1XXXXXXXXXXXXXX XX</ADDR1C>
<UNDCDC>UCD</UNDCDC>
<_UNDCD>Underwr iter codeXXXXXXXXXXX XXX</_UNDCD>
</DTL01>
<DTL02>
<INDEXC>IndexXX XXXXXXXXX</INDEXC>
<ADDR2C>Addre ss line 2XXXXXXXXXXXXXX XX</ADDR2C>
<SERCLC>X</SERCLC>
<_SERCL>Servi ce classXXXXXXXXXX XXXXXXX</_SERCL>
</DTL02>
</CL999>
</REPORT>

Nov 11 '05 #1
2 2210
TadPole wrote:
Hi all,

My main problems are:::::::::


I think this is best posted to the XSL List rather than c.t.x
(see www.mulberrytech.com for joining)

///Peter

Nov 23 '05 #2
Thaks for the re-direction.

The people at mulberry have re-directed me to ww********@w3.o rg

so the quest begins....

Nov 23 '05 #3

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

Similar topics

4
7674
by: Flapper | last post by:
Help please, Have a situation when converting from Oracle SP's to SQL SP's. The old oracle cursor was roughly as follows CURSOR cur_rsStock IS select * from (select StockRowId, CategoryId
1
2109
by: boonkit | last post by:
Hi all, I cannot find MySQl performance info at linux "top" command. I already tested on slow MySQL query that took more than 5 minutes (create fulltext index), but during the 5 minutes, i cannot find any mysql process at top command. Below is the system information: Linux version: 2.6.9-1.667smp (Red Hat 3.4.2-6.fc3) MySQL version: 4.1.11 (source installation)
6
5258
by: Matt | last post by:
When I do the following, the mycode will still execute. The reason I put window.opener=top; is to disable the close confirmation dialog box. window.opener = top; window.close(); //mycode... But if I do the following without statement window.opener = top; window.close();
19
3286
by: Mason A. Clark | last post by:
How was I to know that "top" means "top" in MSIE6 ?? I was testing <a name="top"></a> at the top of the page with <a href="#top>go to top</a> at the bottom of the page. It always worked in IE so I drew conclusions only to discover that it worked even with <a name="xtop"></a> but not in Opera. IE6 understands "top" to mean *the top* !
6
7045
by: Mason A. Clark | last post by:
LAST WORD(s): 1. MSIE6 and Firefox will go to the top of the page on command <a href="#top">go upsy</a> even if there is NO name="top" or id="top" They know what a "top" is :-) Opera does not.
16
4431
by: Gufus | last post by:
Hi Group... <a name="#top"></a> ----del---- ----del---- <img SRC="images/top.gif" USEMAP="#top" BORDER=0> <map NAME="top">
16
2933
by: J. C. Denton | last post by:
I just manually validated alexa's global top 100 sites and find only 2 sites that pass validation. They are http://www.microsoft.com/ http://www.wikipedia.org/ All others should go w3c markup hall of shame, ;-)
3
12552
by: Brett Romero | last post by:
I have an MDI Parent form with a toolstrip and menustrip. The menustrip is always the top most. Both are Docked to Top. I contemplated using a toolstripcontainer but then removed it. I had to redock my toolstrip and menustrip. Now the toolstrip is always top most. I added a new MDI Parent form and can't find any differences. How do I get the menustrip to be top most? Also, is there a way to get the menu strip items (opening of a...
3
1628
by: snoonan | last post by:
The company in quesiton does construction work. Tables look like this: ***Job Table*** JobNumberID* JobName ***JobNote Table*** JobNoteID* JobNumberID* JobNoteCreateDate
1
1525
by: sheldonlg | last post by:
I define a div, excItem, with absolute positioning and with a top of 400px. I then call a javascript function which does toggling of visibility and should do positioning as well. I loop though the parents with offsetTop to get the position of the clicking element, which here is set in "y". Here is the code snippet: excItem.style.top = y + 20; alert('y=' + y + ' top=' + excItem.style.top);
0
7951
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8430
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8094
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8305
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5966
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5465
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3977
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1553
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1296
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.