RE: anything wrong with this XSL snippet

2007-11-30 Thread cknell
Maybe you want this, instead.

xsl:if test=@statusImageURL
  fo:block 
fo:external-graphic src=[EMAIL PROTECTED]/
xsl:value-of select=@status/
  /fo:block
/xsl:if
-- 
Charles Knell
[EMAIL PROTECTED] - email



-Original Message-
From: Daling Xu [EMAIL PROTECTED]
Sent: Fri, 30 Nov 2007 10:00:40 -0800 (PST)
To:   fop-users@xmlgraphics.apache.org
Subject:  anything wrong with this XSL snippet

Hi,
   
  I am using FOP to generate PDF from an XML doc.
   
  In my PDF, I would like to insert image in some places, but because not every 
time I have an image for all the element in the xml, I use a XSL:If statement 
like this way:
  fo:block 
  xsl:if test=@statusImageURLfo:external-graphic src=[EMAIL 
PROTECTED]//xsl:if
  xsl:value-of select=@status/ 
  /fo:block
   
  My XML element looks like:
  ElementName statusImageURL=urlxyz status=mystatusString /
  Here the 'statusImageURL'  is an optional attr, my intention is that if an 
element has a statusImageURL attr, the fo generated should be:
   
  fo:blockfo:external-graphic src=My URL XYZ/myStatusString123/fo:block
   
  But for an XML element without a statusImageURL, the fo should be:
  fo:blockmyStatusString123/fo:block
   
  But in my actual case, the system always generate something like
  fo:blockfo:external-graphic src=/myStatusString123/fo:block
  even my xml doesn't have the 'statusImageURL'   attr, and this finally cause 
FOP an exception of 
  Error while recovering image information () : null
   
  org.apache.fop.fo.flow.ExternalGraphic bind
  SEVERE: Image not available: 
   
  Any idea what's wrong with my XSLT?
  
Thanks
   
  Linda

   
-
Get easy, one-click access to your favorites.  Make Yahoo! your homepage.

ÿþ<div>Hi,</div>  <div>&nbsp;</div>  <div>I am using FOP to generate PDF from an XML doc.</div>  <div>&nbsp;</div>  <div>In my PDF, I would like to insert image in some places, but because not every time I have an image for all the element in the xml, I use a XSL:If statement like this way:</div>  <div><FONT size=2>&lt;fo:block &gt;</div>  <div align=left>&lt;xsl:if test="[EMAIL PROTECTED]"&gt;&lt;fo:external-graphic src="[EMAIL PROTECTED]"/&gt;&lt;/xsl:if&gt;</div>  <div align=left>&lt;xsl:value-of select="[EMAIL PROTECTED]"/&gt; </div>  <div>&lt;/fo:block&gt;</div>  <div>&nbsp;</div>  <div>My XML element looks like:</div>  <div>&lt;ElementName statusImageURL="urlxyz" status="mystatusString" /&gt;</div>  <div>Here the 'statusImageURL'&nbsp; is an optional attr, my intention is that if an element has a statusImageURL attr, the fo generated should be:</div>  <div></FONT>&nbsp;</div>  <div>&lt;fo:block&gt;&lt;fo:external-graphic src="My URL XYZ"/&gt;myStatusString123&lt;/fo:block&gt;</div>

  <div>&nbsp;</div>  <div>But for an XML element without a statusImageURL, the fo should be:</div>  <div>&lt;fo:block&gt;myStatusString123&lt;/fo:block&gt;</div>  <div>&nbsp;</div>  <div>But in my actual case, the system always generate something like</div>  <div>&lt;fo:block&gt;&lt;fo:external-graphic src=""/&gt;myStatusString123&lt;/fo:block&gt;</div>  <div>even my xml doesn't have the 'statusImageURL'&nbsp;&nbsp; attr, and this finally cause FOP an exception of </div><FONT color=#ff0000 size=2>  <div>Error while recovering image information () : null</div></FONT>  <div>&nbsp;</div><FONT color=#ff0000 size=2>  <div 

RE: RE: anything wrong with this XSL snippet

2007-11-30 Thread cknell
Please disregard. I didn't read your message closely enough.
-- 
Charles Knell
[EMAIL PROTECTED] - email



-Original Message-
From: [EMAIL PROTECTED]
Sent: Fri, 30 Nov 2007 14:01:45 -0500
To:   fop-users@xmlgraphics.apache.org
Subject:  RE: anything wrong with this XSL snippet

Maybe you want this, instead.

xsl:if test=@statusImageURL
  fo:block 
fo:external-graphic src=[EMAIL PROTECTED]/
xsl:value-of select=@status/
  /fo:block
/xsl:if
-- 
Charles Knell
[EMAIL PROTECTED] - email



-Original Message-
From: Daling Xu [EMAIL PROTECTED]
Sent: Fri, 30 Nov 2007 10:00:40 -0800 (PST)
To:   fop-users@xmlgraphics.apache.org
Subject:  anything wrong with this XSL snippet

Hi,
   
  I am using FOP to generate PDF from an XML doc.
   
  In my PDF, I would like to insert image in some places, but because not every 
time I have an image for all the element in the xml, I use a XSL:If statement 
like this way:
  fo:block 
  xsl:if test=@statusImageURLfo:external-graphic src=[EMAIL 
PROTECTED]//xsl:if
  xsl:value-of select=@status/ 
  /fo:block
   
  My XML element looks like:
  ElementName statusImageURL=urlxyz status=mystatusString /
  Here the 'statusImageURL'  is an optional attr, my intention is that if an 
element has a statusImageURL attr, the fo generated should be:
   
  fo:blockfo:external-graphic src=My URL XYZ/myStatusString123/fo:block
   
  But for an XML element without a statusImageURL, the fo should be:
  fo:blockmyStatusString123/fo:block
   
  But in my actual case, the system always generate something like
  fo:blockfo:external-graphic src=/myStatusString123/fo:block
  even my xml doesn't have the 'statusImageURL'   attr, and this finally cause 
FOP an exception of 
  Error while recovering image information () : null
   
  org.apache.fop.fo.flow.ExternalGraphic bind
  SEVERE: Image not available: 
   
  Any idea what's wrong with my XSLT?
  
Thanks
   
  Linda

   
-
Get easy, one-click access to your favorites.  Make Yahoo! your homepage.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



FOP task, what changed from 0.92beta to 0.94?

2007-10-02 Thread cknell
I recently downloaded FOP version 0.94, upgrading from 0.92beta. My build.xml 
file now fails when I execute the fop task, giving this error:

build.xml:105: java.lang.NoClassDefFound
Error: org/apache/xmlgraphics/util/Service

It seems that something has changed in FOP that breaks the Ant FOP task, but I 
don't see anything concerning this on the FOP or Ant site. All upgrade 
information concerns upgrading from 0.20, but I can't find any mention of a 
problem when upgrading from 0.92beta.

Of course, I could switch to the java task, but if possible, I'd prefer to 
stick with the fop task.

Can anyone point me to the right direction?

Thanks.


-- 
Charles Knell
[EMAIL PROTECTED] - email

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Keeping tables together with FOP 0.92b

2006-09-14 Thread cknell
I know that if a table has 20 or more rows, it won't fit on a single page. I 
deal with such large tables in my XSLT like this:

xsl:template match=table
  xsl:variable name=page-break-flag
xsl:choose
  xsl:when test=count(child::column) gt; 19page/xsl:when
  xsl:otherwiseauto/xsl:otherwise
/xsl:choose
  /xsl:variable
  ...
  fo:table-row keep-with-next=always break-before={$page-break-flag}
fo:table-cellfo:block/fo:block/fo:table-cell
  ...
/xsl:template

Here I am dealing with a situation where the number of rows on a particular 
table may not be very large, but because other tables appear on the page before 
it, the page breaks in the middle of the table, like this.:

 Page Break 
Table 1
row
row
row
row

Table 2
row
row
row
row
row
row
row
row

Table 3
row
row
row
row
 Page Break 
row
row
row
row

Table 4
row
row
row
row

In my case, the row heights are always the same, so Louis' warning is not 
applicable.

In order to know if I should start a new page before beginning to print Table 
3, I would have to know the number of rows that already appear on the page (or 
some other more clever work-around), but I can't think of a way to get that 
information.

Does this suggest a solution to anyone?

Thanks.
-- 
Charles Knell
[EMAIL PROTECTED] - email

ÿþ

<br><font size=2><tt>&quot;Pascal Sancho&quot; &lt;[EMAIL PROTECTED]&gt;

wrote on 09/14/2006 07:47:09 AM:<br>

<br>

&gt; &gt; -----Original Message-----<br>

&gt; &gt; From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] <br>

&gt; &gt; Sent: Wednesday, September 13, 2006 9:15 PM<br>

&gt; &gt; <br>

&gt; &gt; I' recently back to working with FOP. I have a document that

<br>

&gt; &gt; consists of a number of tables with widely-varying numbers of

<br>

&gt; &gt; rows. Sometimes several tables will fit entirely onto a <br>

&gt; &gt; single page, with others will span several pages. The problem

<br>

&gt; &gt; I'm having involves those cases where a table almost fits <br>

&gt; &gt; onto a page, but one or two rows flow over onto the next <br>

&gt; &gt; page. I'd like to start a new page if the table won't fit <br>

&gt; &gt; onto the current one.<br>

&gt; &gt; <br>

&gt; &gt; I've tried some keep-with-previous tacks, but when a very <br>

&gt; &gt; long table won't fit onto a single page FOP errors out.<br>

&gt; <br>

&gt; Hi,<br>

&gt; keep-with-previous property doesn't work for table &amp; list (see

[1])<br>

&gt; And this is not yet done in FOP_TRUNK (see [2]) <br>

&gt; <br>

&gt; &gt; Does anyone have a sure-fire method for causing a table to <br>

&gt; &gt; start on a new page if all the rows won't fit on the current

page?<br>

&gt; <br>

&gt; If you know rows height, you can add an explicit page break when needed,<br>

&gt; for example using the XPATH sequence &quot;position() mod XXX&quot;,

where XXX is<br>

&gt; the number of rows per page.<br>

&gt; <br>

</tt></font>

<br><font size=2 face="sans-serif">We use the </font><font size=2><tt>&quot;position()

mod XXX&quot;</tt></font><font size=2 face="sans-serif"> technique to break

page sequences and release memory, but there is one major issue we always

run in 

Keeping tables together with FOP 0.92b

2006-09-13 Thread cknell
I' recently back to working with FOP. I have a document that consists of a 
number of tables with widely-varying numbers of rows. Sometimes several tables 
will fit entirely onto a single page, with others will span several pages. The 
problem I'm having involves those cases where a table almost fits onto a page, 
but one or two rows flow over onto the next page. I'd like to start a new page 
if the table won't fit onto the current one.

I've tried some keep-with-previous tacks, but when a very long table won't fit 
onto a single page FOP errors out.

Does anyone have a sure-fire method for causing a table to start on a new page 
if all the rows won't fit on the current page?

Thanks.

-- 
Charles Knell
[EMAIL PROTECTED] - email

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: RE: Guide me some extended data display

2006-04-10 Thread cknell
It's the same pattern.

  xsl:template match=country
xsl:if test=position() mod 2 =1
  fo:table-row
fo:table-cellfo:blockxsl:value-of select=cityInstal 
//fo:block/fo:table-cell
fo:table-cellfo:blockxsl:value-of select=stateInstal 
//fo:block/fo:table-cell
fo:table-cellfo:blockxsl:value-of 
select=following-sibling::country[1]/cityInstal //fo:block/fo:table-cell
fo:table-cellfo:blockxsl:value-of 
select=following-sibling::country[1]/stateInstal //fo:block/fo:table-cell
  /fo:table-row
/xsl:if
  /xsl:template


-- 
Charles Knell
[EMAIL PROTECTED] - email



-Original Message-
From: Raghavendra U [EMAIL PROTECTED]
Sent: Mon, 10 Apr 2006 12:26:10 +0530
To:   undisclosed-recipients:;
Subject:  RE: Guide me some extended data display

Hi,

Thanks a Lot for your information it helped me a lot.

Similar to this another problem I'm facing now.
genericSiteDoc
country
cityInstalIndia/cityInstal
stateInstalstate1/stateInstal
/country
country
cityInstal UK /cityInstal
stateInstalstate2/stateInstal
/country
country
cityInstal USA /cityInstal
stateInstalstate3/stateInstal
/country
country
cityInstal Canada /cityInstal
stateInstalstate4/stateInstal
/country
country
cityInstal Australia /cityInstal
stateInstalstate5/stateInstal
/country
/genericSiteDoc 

And output should be

 Country 1Country 2

India   UK
State1  state2
---
USACanada
State3 state4

Austraila
State5
-



Regards
Raghavendra U

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Saturday, April 08, 2006 6:56 PM
To: fop-users@xmlgraphics.apache.org
Subject: RE: guide me

This question will generally get more attention on the Mulberry-Tech XSL
list, but here goes.

This question reminds me of a riddle I learned in elementary school,
Question: How do you get down off an elephant?
Answer: You don't get down off an elephant, you get down off a duck.


Humor aside, that's not what the xsl:for-each element is used for.
Mainly, the xsl:for-each is used for grouping and sorting. XSLT is a
declarative language, like SQL, not a procedural language, like Java.

If you want to retrieve all the employees in department number 00987
from your database, you would write a query like this:

SELECT last_name, first_name from employees where
department_num='00987';

You don't write some sort of loop telling the database engine when to
start or stop.

Similarly, with XSLT, you create a template that matches the elements
you are interested in and describe the output you want. The messy
looping and other stuff is handled by the XSLT transformer. You don't
get involved with it.

So, here's an example of two templates that, taken together, will solve
your problem.

  xsl:template match=genericSiteDoc
xsl:apply-templates /
  /xsl:template
  
  xsl:template match=cityInstal
xsl:if test=position() mod 2 =1
  fo:table-row
fo:table-cellfo:blockxsl:value-of select=.
//fo:block/fo:table-cell
fo:table-cellfo:blockxsl:value-of
select=following-sibling::cityInstal[1] //fo:block/fo:table-cell
  /fo:table-row
/xsl:if
  /xsl:template

-- 
Charles Knell
[EMAIL PROTECTED] - email



-Original Message-
From: Raghavendra U [EMAIL PROTECTED]
Sent: Sat, 8 Apr 2006 17:28:43 +0530
To:   undisclosed-recipients:;
Subject:  guide me

 



From: Raghavendra U 
Sent: Saturday, April 08, 2006 5:24 PM
To: fop-users@xmlgraphics.apache.org
Subject: guide me


Hi All,
 
can anyone help me to solve my problem.
 
genericSiteDoc
 cityInstalIndia/cityInstal
cityInstal UK /cityInstal
cityInstal USA /cityInstal
cityInstal Canada /cityInstal
cityInstal Australia /cityInstal
/genericSiteDoc 
 
this is the XML data.
 
I want to display ,  in a  row two country names.
means output  should be like below
 
Country 1Country 2

IndiaUk

USACanada

Austraila
-
 
How to control the for each loop in XSL.
 
plz help me.
 
Raghavendra U | Associate Software Engineer | M P H A S I S Architecting
Value |139/1,Hosur Road, Koramangala, Bangalore-560 095 | Mobile:
+91-9845830975| www.mphasis.com http://www.mphasis.com/ 


  

 





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: 

RE: Re: guide me

2006-04-09 Thread cknell
 From an efficiency point of view, wouldn't it be better to have a select
 (that filters odd elements) in the xsl:apply-templates so that the second
 template gets called 1/2 the total number of cityInstal?

If you did that, then you would have to make an empty template for the 
complementary set of cityInstal elements, like so:

xsl:template match=cityInstal[position() mod 2 = 0] /

so that these elements would produce no output. Is that more efficient? I don't 
know. I may depend on how the XSLT engine is implemented or, depending on the 
number of nodes to be processed, the difference may be too small to notice. 
Does an elephant with a flea on his back weigh more than the same elephant 
without the flea?

 Jus a note on xslt processor. I have tried the code below out of curiosity,
 and I cannot explain why, but position() always returns 2, which results in
 an empty table-body, as the xsl:if fails. (Used: saxonb 8, fop 0.20.5, j2se
 1.4.2, winxp pro).

I've got the same setup, except that I've got Java 1.5.0_06, but I can't 
imagine that makes a difference. Here's the entire stylesheet. Try it.

?xml version=1.0 encoding=UTF-8?
xsl:stylesheet version=2.0
 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
  xmlns:fo=http://www.w3.org/1999/XSL/Format;
  xsl:output method=xml indent=yes /
  xsl:strip-space elements=* /

xsl:template match=/
xsl:apply-templates /
/xsl:template

  xsl:template match=genericSiteDoc
xsl:apply-templates /
  /xsl:template
  
  xsl:template match=cityInstal
xsl:if test=position() mod 2 =1
  fo:table-row
fo:table-cellfo:blockxsl:value-of select=. 
//fo:block/fo:table-cell
fo:table-cellfo:blockxsl:value-of 
select=following-sibling::cityInstal[1] //fo:block/fo:table-cell
  /fo:table-row
/xsl:if
  /xsl:template

/xsl:stylesheet

-- 
Charles Knell
[EMAIL PROTECTED] - email


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Re: guide me

2006-04-09 Thread cknell
Your XSLT processor still has to examine each cityInstal element to select 
only those that match the select statement. Without empirical testing we still 
don't know which is more efficient (faster).
-- 
Charles Knell
[EMAIL PROTECTED] - email



-Original Message-
From: Cinzia [EMAIL PROTECTED]
Sent: Sun, 9 Apr 2006 14:42:00 +0100
To:   fop-users@xmlgraphics.apache.org
Subject:  Re: guide me

  From an efficiency point of view, wouldn't it be better to have a select
  (that filters odd elements) in the xsl:apply-templates so that the
second
  template gets called 1/2 the total number of cityInstal?

 If you did that, then you would have to make an empty template for the
complementary set of cityInstal elements, like so:

 xsl:template match=cityInstal[position() mod 2 = 0] /

This is not necessary, in the same way as it is not necessary in your
example, see code fortest below.

  Jus a note on xslt processor. I have tried the code below out of
curiosity,
  and I cannot explain why, but position() always returns 2, which results
in
  an empty table-body, as the xsl:if fails. (Used: saxonb 8, fop 0.20.5,
j2se
  1.4.2, winxp pro).

 I've got the same setup, except that I've got Java 1.5.0_06, but I can't
imagine that makes a difference. Here's the entire stylesheet. Try it.


Thanks for that Charles, what made the difference to the result seemed to be
the line with xsl:strip-space elements=* /, a mistery. I get position()
1,2,3,..., with xsl:strip-space (see code fortest3), and 2,4,6,..., without
xsl:strip-space (see code fortest3b).

Cinzia

=== fortest
=== ?xml version=1.0 encoding=windows-1252 ?
xsl:stylesheet version=2.0 xmlns:fo=http://www.w3.org/1999/XSL/Format;
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;

   xsl:template match=genericSiteDoc
 fo:root font-family=Verdana font-size=6pt color=#66
fo:layout-master-set
  fo:simple-page-master master-name=A4Portrait
page-height=29.7cm page-width=21cm
  fo:region-body margin=1cm region-name=body/
/fo:simple-page-master
  /fo:layout-master-set
  fo:page-sequence master-reference=A4Portrait
fo:flow flow-name=body
  fo:block text-align=left
  fo:table table-layout=fixed width=254pt
fo:table-column column-width=127pt/
fo:table-column column-width=127pt/
fo:table-body background-color=#ff
  xsl:apply-templates select=cityInstal[position() mod 2  1]/
/fo:table-body
  /fo:table
  /fo:block
/fo:flow
  /fo:page-sequence
/fo:root
   /xsl:template

   xsl:template match=cityInstal
 fo:table-row
   fo:table-cellfo:blockxsl:value-of select=. /,
xsl:value-of select=position()//fo:block/fo:table-cell
   fo:table-cellfo:blockxsl:value-of
select=following-sibling::cityInstal[1] //fo:block/fo:table-cell
 /fo:table-row
   /xsl:template

/xsl:stylesheet


 fortest3
 ?xml version=1.0 encoding=windows-1252 ?
xsl:stylesheet version=2.0 xmlns:fo=http://www.w3.org/1999/XSL/Format;
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;

xsl:strip-space elements=* /

   xsl:template match=genericSiteDoc
 fo:root font-family=Verdana font-size=6pt color=#66
fo:layout-master-set
  fo:simple-page-master master-name=A4Portrait
page-height=29.7cm page-width=21cm
  fo:region-body margin=1cm region-name=body/
/fo:simple-page-master
  /fo:layout-master-set
  fo:page-sequence master-reference=A4Portrait
fo:flow flow-name=body
  fo:block text-align=left
  fo:table table-layout=fixed width=254pt
fo:table-column column-width=127pt/
fo:table-column column-width=127pt/
fo:table-body
  xsl:apply-templates/
/fo:table-body
  /fo:table
  /fo:block
/fo:flow
  /fo:page-sequence
/fo:root
  /xsl:template

   xsl:template match=cityInstal
xsl:if test=position() mod 2 =1
  fo:table-row
fo:table-cellfo:blockxsl:value-of select=. /,
  xsl:value-of select=position()//fo:block/fo:table-cell
fo:table-cellfo:blockxsl:value-of
select=following-sibling::cityInstal[1] //fo:block/fo:table-cell
  /fo:table-row
/xsl:if
   /xsl:template

/xsl:stylesheet

= fortest3b
= ?xml version=1.0 encoding=windows-1252 ?
xsl:stylesheet version=2.0 xmlns:fo=http://www.w3.org/1999/XSL/Format;
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;

   xsl:template match=genericSiteDoc
 fo:root font-family=Verdana font-size=6pt color=#66
fo:layout-master-set
  fo:simple-page-master master-name=A4Portrait
page-height=29.7cm page-width=21cm
  fo:region-body margin=1cm region-name=body/
/fo:simple-page-master
  /fo:layout-master-set
  fo:page-sequence master-reference=A4Portrait
fo:flow flow-name=body
  fo:block text-align=left
  fo:table 

RE: creating SVG from MathML

2006-03-31 Thread cknell
Since MathML is XML and SVG is XML, the natural way to convert one to another, 
as I see it, is with with XSLT. Are you looking for a ready-made Java package 
with classes to produce a variety of SVG formats, or are you looking for a 
general approach?
-- 
Charles Knell
[EMAIL PROTECTED] - email



-Original Message-
From: Dirk Bromberg [EMAIL PROTECTED]
Sent: Fri, 31 Mar 2006 15:18:00 +0200
To:   fop-users@xmlgraphics.apache.org
Subject:  creating SVG from MathML

Hi,

i've a short question:

i want to create SVG images to embedd in fop from MathML XML Code.
I don't want to use the direct way, because i want to use the SVG images 
in another application too...

But how can i do this? (in Java Code...)

Some hints?

Thanks.

Dirk


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Chemical Markup Language

2006-03-13 Thread cknell
I've just had a look at CML. What a nightmare! Take this element, for example,

CML.TAB ID=table1 NAME=NET ATOMIC CHARGES ROWS= 12 COLUMNS=3 
COL.NAMES=ELEMENT CHARGE DENSITY COL.REFS=CML.COR.NOTATION CML.THE.CHARGE 
CML.THE.AEDENSITY COL.TYPES=STRING FLOAT FLOAT
 C  -0.1021234.1021
 C  -0.1021084.1021
 C  -0.1021104.1021
 C  -0.1021184.1021
 C  -0.1021004.1021
 C  -0.1020984.1021
 H   0.1021110.8979
 H   0.1021050.8979
 H   0.1021110.8979
 H   0.1021150.8979
 H   0.1020970.8979
 H   0.1021190.8979
/CML.TAB

Someone should slap the designer of this monstrosity. 

All that aside, I've been able to produce all kinds of output from 
well-designed input using XSLT. If what you are trying to produce is CML, what 
format is used in the input?
-- 
Charles Knell
[EMAIL PROTECTED] - email



-Original Message-
From: H. krishna [EMAIL PROTECTED]
Sent: Mon, 13 Mar 2006 05:13:59 -0800 (PST)
To:   fop-user@xml.apache.org
Subject:  Chemical Markup Language

Dear All,

We have received one job from client. The required
output file is chemical markup language (cml). We have
tried to convent chemical markup language using
jumbo3. Anybody can give idea on this?


Thanks for advance.

Regards,
bala


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Re: Help with table-of-contents:don't understand ref-id attribute

2006-03-03 Thread cknell
Here is a trimmed-down model of the XML.
test-case-documents
  directory @name=dir-1
directory @name=dir-1-1
  file
nameTC_01/name
.. More elements here ..
  /file
/directory
  /directory
test-case-documents

This is the template in question:

  xsl:template match=file mode=toc
fo:block text-align-last=justify
  fo:in-line
value-of select=name /
fo:leader leader-pattern=dots /
fo:page-number-citation ref-id={name} /
  /fo:in-line
/fo:block
  /xsl:template

Here is where I invoke the template:

xsl:template match=/
   . XSLT goes here 
fo:page-sequence master-reference=matrix
  xsl:apply-templates select=test-case-documents/directory//file mode=toc 
/
/fo:page-sequence
   . even more XSLT goes here 
/xsl:template

When I apply-templates, the context node is a file, no?
As you can see, name is a child of file and I assert the value of each 
name is unique throughout the document.

Thanks for your interest.
-- 
Charles Knell
[EMAIL PROTECTED] - email



-Original Message-
From: Jay Bryant [EMAIL PROTECTED]
Sent: Fri, 3 Mar 2006 10:58:21 -0600
To:   fop-users@xmlgraphics.apache.org
Subject:  Re: Help with table-of-contents:don't understand ref-id attribute

Hi, Charles,

It is certainly true that the value of ref-id can be an element rather than
an attribute. It doesn't even necessarily have to be a child of the element
whose page number you want. I've bumped into XML that had ref values as
top-level elements next to the heading elements. Of course, either an
attribute or a child element makes for much nicer XSL.

My first thought is that you have a context issue: The name node must be a
child of the current context node. Unless you've used a for-each or some
other structure to force the context to be the heading (or whatever) for
which you are trying to get a page number, the processor can never find that
node. I know you are a regular on the Mulberry XSLT list, though, so I bet
you have already accounted for that possibility.

Can you post some of your XML source and the relevent parts of your
stylesheet or make a trimmed-down demonstration of the problem? If so, I'll
be happy to try to help figure out the problem.

Jay Bryant
Bryant Communication Services


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Help with table-of-contents:don't understand ref-id attribute

2006-03-03 Thread cknell
This might be useful. It is a block of markup from the from the XSL-FO document 
produced by the template.

  fo:block text-align-last=justify
 fo:in-lineTC_01fo:leader leader-pattern=dots/
fo:page-number-citation ref-id=TC_01/
 /fo:in-line
  /fo:block

-- 
Charles Knell
[EMAIL PROTECTED] - email



-Original Message-
From: [EMAIL PROTECTED]
Sent: Fri, 03 Mar 2006 12:15:41 -0500
To:   fop-users@xmlgraphics.apache.org
Subject:  RE: Re: Help with table-of-contents:don't understand ref-id attribute

Here is a trimmed-down model of the XML.
test-case-documents
  directory @name=dir-1
directory @name=dir-1-1
  file
nameTC_01/name
.. More elements here ..
  /file
/directory
  /directory
test-case-documents

This is the template in question:

  xsl:template match=file mode=toc
fo:block text-align-last=justify
  fo:in-line
value-of select=name /
fo:leader leader-pattern=dots /
fo:page-number-citation ref-id={name} /
  /fo:in-line
/fo:block
  /xsl:template

Here is where I invoke the template:

xsl:template match=/
   . XSLT goes here 
fo:page-sequence master-reference=matrix
  xsl:apply-templates select=test-case-documents/directory//file mode=toc 
/
/fo:page-sequence
   . even more XSLT goes here 
/xsl:template

When I apply-templates, the context node is a file, no?
As you can see, name is a child of file and I assert the value of each 
name is unique throughout the document.

Thanks for your interest.
-- 
Charles Knell
[EMAIL PROTECTED] - email



-Original Message-
From: Jay Bryant [EMAIL PROTECTED]
Sent: Fri, 3 Mar 2006 10:58:21 -0600
To:   fop-users@xmlgraphics.apache.org
Subject:  Re: Help with table-of-contents:don't understand ref-id attribute

Hi, Charles,

It is certainly true that the value of ref-id can be an element rather than
an attribute. It doesn't even necessarily have to be a child of the element
whose page number you want. I've bumped into XML that had ref values as
top-level elements next to the heading elements. Of course, either an
attribute or a child element makes for much nicer XSL.

My first thought is that you have a context issue: The name node must be a
child of the current context node. Unless you've used a for-each or some
other structure to force the context to be the heading (or whatever) for
which you are trying to get a page number, the processor can never find that
node. I know you are a regular on the Mulberry XSLT list, though, so I bet
you have already accounted for that possibility.

Can you post some of your XML source and the relevent parts of your
stylesheet or make a trimmed-down demonstration of the problem? If so, I'll
be happy to try to help figure out the problem.

Jay Bryant
Bryant Communication Services


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Help with table-of-contents:don't understand ref-id attribute

2006-03-03 Thread cknell
I'm back. Just when I thought it was safe to go back into the water  (cue 
bass violin and muted trumpets);

fop 0.20.5 is processing the XSL-FO document without complaint. I've still got 
some minor formatting issues to deal with, but I have one huge problem, no page 
numbers appear in the PDF file.

Here is one of the relevant elements from the XSL-FO document's table of 
contents section:

fo:block text-align-last=justify text-indent=-1em start-indent=1em
  fo:inline padding-start=1emTC_01fo:leader leader-pattern=dots/
   fo:page-number-citation ref-id=TC_01/
   /fo:inline
/fo:block

This is what the PDF looks like:

 Table of Contents
TC_01..
TC_02..
etc.

Can anyone tell me where my page numbers went?


-- 
Charles Knell
[EMAIL PROTECTED] - email



-Original Message-
From: [EMAIL PROTECTED]
Sent: Fri, 03 Mar 2006 13:36:07 -0500
To:   fop-users@xmlgraphics.apache.org
Subject:  RE: RE: Re: Help with table-of-contents:don't understand ref-id 
attribute

I found my errors. Naturally they weren't where I was looking, but I was 
distracted by my unfamiliarity with the table of contents piece. I had a 
missing element, a mis-spelled element name, and I omitted a namespace part of 
another element.

Now the only problem I seem to have is that fop.bat won't terminate when it 
tells me it's ..., stopping renderer.

Thanks.
-- 
Charles Knell
[EMAIL PROTECTED] - email



-Original Message-
From: [EMAIL PROTECTED]
Sent: Fri, 03 Mar 2006 12:15:41 -0500
To:   fop-users@xmlgraphics.apache.org
Subject:  RE: Re: Help with table-of-contents:don't understand ref-id attribute

Here is a trimmed-down model of the XML.
test-case-documents
  directory @name=dir-1
directory @name=dir-1-1
  file
nameTC_01/name
.. More elements here ..
  /file
/directory
  /directory
test-case-documents

This is the template in question:

  xsl:template match=file mode=toc
fo:block text-align-last=justify
  fo:in-line
value-of select=name /
fo:leader leader-pattern=dots /
fo:page-number-citation ref-id={name} /
  /fo:in-line
/fo:block
  /xsl:template

Here is where I invoke the template:

xsl:template match=/
   . XSLT goes here 
fo:page-sequence master-reference=matrix
  xsl:apply-templates select=test-case-documents/directory//file mode=toc 
/
/fo:page-sequence
   . even more XSLT goes here 
/xsl:template

When I apply-templates, the context node is a file, no?
As you can see, name is a child of file and I assert the value of each 
name is unique throughout the document.

Thanks for your interest.
-- 
Charles Knell
[EMAIL PROTECTED] - email



-Original Message-
From: Jay Bryant [EMAIL PROTECTED]
Sent: Fri, 3 Mar 2006 10:58:21 -0600
To:   fop-users@xmlgraphics.apache.org
Subject:  Re: Help with table-of-contents:don't understand ref-id attribute

Hi, Charles,

It is certainly true that the value of ref-id can be an element rather than
an attribute. It doesn't even necessarily have to be a child of the element
whose page number you want. I've bumped into XML that had ref values as
top-level elements next to the heading elements. Of course, either an
attribute or a child element makes for much nicer XSL.

My first thought is that you have a context issue: The name node must be a
child of the current context node. Unless you've used a for-each or some
other structure to force the context to be the heading (or whatever) for
which you are trying to get a page number, the processor can never find that
node. I know you are a regular on the Mulberry XSLT list, though, so I bet
you have already accounted for that possibility.

Can you post some of your XML source and the relevent parts of your
stylesheet or make a trimmed-down demonstration of the problem? If so, I'll
be happy to try to help figure out the problem.

Jay Bryant
Bryant Communication Services


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Re: Help with table-of-contents:don't understand ref-id attribute

2006-03-03 Thread cknell
As you can see from my trimmed-down data model. I have no id attribute. That 
issue is what I thought I was asking about when you replied:

 It is certainly true that the value of ref-id can be an element rather than
 an attribute.

So it appears that I misunderstand the question of what has to be pointed to by 
the ref-id attribute.

I'm thinking that I should add an id attribute using generate-id() during the 
XSLT transform, but I can't figure out which element it should be added to.
-- 
Charles Knell
[EMAIL PROTECTED] - email



-Original Message-
From: Jay Bryant [EMAIL PROTECTED]
Sent: Fri, 3 Mar 2006 13:36:16 -0600
To:   fop-users@xmlgraphics.apache.org
Subject:  Re: Help with table-of-contents:don't understand ref-id attribute

Hi, Charles,

For ref-id to work, there has to be a corresponding id attribute somewhere.

So, some other template should be creating something like

fo:block id=TC_01Content here/fo:block

Of course, you're probably doing that (no way to know from what I've seen so
far). I'd check to make sure that whatever template is supposed to do that
is doing the right thing. To do that, examine the FO file and see what shows
up.

HTH

Jay Bryant
Bryant Communication Services


- Original Message - 
From: [EMAIL PROTECTED]
To: fop-users@xmlgraphics.apache.org
Sent: Friday, March 03, 2006 1:06 PM
Subject: Re: Help with table-of-contents:don't understand ref-id attribute


 I'm back. Just when I thought it was safe to go back into the water 
(cue bass violin and muted trumpets);

 fop 0.20.5 is processing the XSL-FO document without complaint. I've still
got some minor formatting issues to deal with, but I have one huge problem,
no page numbers appear in the PDF file.

 Here is one of the relevant elements from the XSL-FO document's table of
contents section:

 fo:block text-align-last=justify text-indent=-1em start-indent=1em
   fo:inline padding-start=1emTC_01fo:leader leader-pattern=dots/
fo:page-number-citation ref-id=TC_01/
/fo:inline
 /fo:block

 This is what the PDF looks like:

  Table of Contents

TC_01...
..

TC_02...
..
 etc.

 Can anyone tell me where my page numbers went?


 -- 
 Charles Knell
 [EMAIL PROTECTED] - email



 -Original Message-
 From: [EMAIL PROTECTED]
 Sent: Fri, 03 Mar 2006 13:36:07 -0500
 To:   fop-users@xmlgraphics.apache.org
 Subject:  RE: RE: Re: Help with table-of-contents:don't understand ref-id
attribute

 I found my errors. Naturally they weren't where I was looking, but I was
distracted by my unfamiliarity with the table of contents piece. I had a
missing element, a mis-spelled element name, and I omitted a namespace part
of another element.

 Now the only problem I seem to have is that fop.bat won't terminate when
it tells me it's ..., stopping renderer.

 Thanks.
 -- 
 Charles Knell
 [EMAIL PROTECTED] - email



 -Original Message-
 From: [EMAIL PROTECTED]
 Sent: Fri, 03 Mar 2006 12:15:41 -0500
 To:   fop-users@xmlgraphics.apache.org
 Subject:  RE: Re: Help with table-of-contents:don't understand ref-id
attribute

 Here is a trimmed-down model of the XML.
 test-case-documents
   directory @name=dir-1
 directory @name=dir-1-1
   file
 nameTC_01/name
 .. More elements here ..
   /file
 /directory
   /directory
 test-case-documents

 This is the template in question:

   xsl:template match=file mode=toc
 fo:block text-align-last=justify
   fo:in-line
 value-of select=name /
 fo:leader leader-pattern=dots /
 fo:page-number-citation ref-id={name} /
   /fo:in-line
 /fo:block
   /xsl:template

 Here is where I invoke the template:

 xsl:template match=/
. XSLT goes here 
 fo:page-sequence master-reference=matrix
   xsl:apply-templates select=test-case-documents/directory//file
mode=toc /
 /fo:page-sequence
. even more XSLT goes here 
 /xsl:template

 When I apply-templates, the context node is a file, no?
 As you can see, name is a child of file and I assert the value of each
name is unique throughout the document.

 Thanks for your interest.
 -- 
 Charles Knell
 [EMAIL PROTECTED] - email



 -Original Message-
 From: Jay Bryant [EMAIL PROTECTED]
 Sent: Fri, 3 Mar 2006 10:58:21 -0600
 To:   fop-users@xmlgraphics.apache.org
 Subject:  Re: Help with table-of-contents:don't understand ref-id
attribute

 Hi, Charles,

 It is certainly true that the value of ref-id can be an element rather
than
 an attribute. It doesn't even necessarily have to be a child of the
element
 whose page number you want. I've bumped into XML that had ref values as
 top-level elements next to the heading 

RE: Re: Help with table-of-contents:don't understand ref-id attribute

2006-03-03 Thread cknell
All is forgiven! I got everything worked out. There were a lot more warts on 
that toad than I thought, but I've knocked out every one.

Thanks again.
-- 
Charles Knell
[EMAIL PROTECTED] - email



-Original Message-
From: Jay Bryant [EMAIL PROTECTED]
Sent: Fri, 3 Mar 2006 14:12:48 -0600
To:   fop-users@xmlgraphics.apache.org
Subject:  Re: Help with table-of-contents:don't understand ref-id attribute

My bad, Charles.

I was thinking of the input file rather than the FO when I responded to your
initial question. Sorry about the confusion.

I would add the id attribute to the block (or table or whatever) that
contains the content of the source-document node you want to reference.

So, if I had a source document like this:

doc
  heading value=Some Heading
paraP1/para
paraP2/para
  /heading
/doc

I'd use a template like this:

xsl:template match=heading
  fo:block id={generate-id()}xsl:value-of select=@value//fo:block
/xsl:template

Then the ToC template would be something like:

xsl:template match=heading mode=toc
  fo:block text-align-last=justify
xsl:value-of select=@value/fo:leader
leader-pattern=dots/fo:page-number-citation ref-id={generate-id()}/
  /fo:block
/xsl:template

(Of course, both blocks would have many more attributes to specify
formatting, which is why I love attribute-sets.)

HTH

Jay Bryant
Bryant Communication Services

- Original Message - 
From: [EMAIL PROTECTED]
To: fop-users@xmlgraphics.apache.org
Sent: Friday, March 03, 2006 1:49 PM
Subject: RE: Re: Help with table-of-contents:don't understand ref-id
attribute


 As you can see from my trimmed-down data model. I have no id attribute.
That issue is what I thought I was asking about when you replied:

  It is certainly true that the value of ref-id can be an element rather
than
  an attribute.

 So it appears that I misunderstand the question of what has to be pointed
to by the ref-id attribute.

 I'm thinking that I should add an id attribute using generate-id() during
the XSLT transform, but I can't figure out which element it should be added
to.
 -- 
 Charles Knell
 [EMAIL PROTECTED] - email



 -Original Message-
 From: Jay Bryant [EMAIL PROTECTED]
 Sent: Fri, 3 Mar 2006 13:36:16 -0600
 To:   fop-users@xmlgraphics.apache.org
 Subject:  Re: Help with table-of-contents:don't understand ref-id
attribute

 Hi, Charles,

 For ref-id to work, there has to be a corresponding id attribute
somewhere.

 So, some other template should be creating something like

 fo:block id=TC_01Content here/fo:block

 Of course, you're probably doing that (no way to know from what I've seen
so
 far). I'd check to make sure that whatever template is supposed to do that
 is doing the right thing. To do that, examine the FO file and see what
shows
 up.

 HTH

 Jay Bryant
 Bryant Communication Services


 - Original Message - 
 From: [EMAIL PROTECTED]
 To: fop-users@xmlgraphics.apache.org
 Sent: Friday, March 03, 2006 1:06 PM
 Subject: Re: Help with table-of-contents:don't understand ref-id attribute


  I'm back. Just when I thought it was safe to go back into the water 
 (cue bass violin and muted trumpets);
 
  fop 0.20.5 is processing the XSL-FO document without complaint. I've
still
 got some minor formatting issues to deal with, but I have one huge
problem,
 no page numbers appear in the PDF file.
 
  Here is one of the relevant elements from the XSL-FO document's table of
 contents section:
 
  fo:block text-align-last=justify text-indent=-1em
start-indent=1em
fo:inline padding-start=1emTC_01fo:leader leader-pattern=dots/
 fo:page-number-citation ref-id=TC_01/
 /fo:inline
  /fo:block
 
  This is what the PDF looks like:
 
   Table of Contents
 

TC_01...
 ..
 

TC_02...
 ..
  etc.
 
  Can anyone tell me where my page numbers went?
 
 
  -- 
  Charles Knell
  [EMAIL PROTECTED] - email
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
  Sent: Fri, 03 Mar 2006 13:36:07 -0500
  To:   fop-users@xmlgraphics.apache.org
  Subject:  RE: RE: Re: Help with table-of-contents:don't understand
ref-id
 attribute
 
  I found my errors. Naturally they weren't where I was looking, but I was
 distracted by my unfamiliarity with the table of contents piece. I had a
 missing element, a mis-spelled element name, and I omitted a namespace
part
 of another element.
 
  Now the only problem I seem to have is that fop.bat won't terminate when
 it tells me it's ..., stopping renderer.
 
  Thanks.
  -- 
  Charles Knell
  [EMAIL PROTECTED] - email
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
  Sent: Fri, 03 Mar 2006 12:15:41 -0500
  To:   fop-users@xmlgraphics.apache.org
  

RE: transparent background is black on the paper

2006-02-21 Thread cknell
I had a similar problem when printing to a laser printer. I solved it by 
placing a white rectangle behind the image.

rect fill=white x=0 y=-400 width=1600 height=1600 /
-- 
Charles Knell
[EMAIL PROTECTED] - email


 -Original Message-
 From: Zmitko, Jan [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, February 21, 2006 10:07 AM
 To: fop-users@xmlgraphics.apache.org
 Subject: transparent background is black on the paper
 
 Hallo Together,
 
 I´ve an problem with printing my PDF generated by FOP 0.20.5. 
 The generated PDF looks corectly, however if I print these on 
 my printer, the contained logo looks bad. The transparent 
 background of the image has black color. Has any one an Idea, 
 whats the reason of these problem?
 
 Thanks a lot,
 
 Jan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: putting an svg element into an fo document

2006-02-20 Thread cknell
You have shown what you expect to appear in the XSL-FO document, but not what 
actually does appear there. Consequently, it's hard to say where you are going 
wrong. With what information you have supplied, the second construction (the 
one using copy-of) appears to be the correct one.

Show what you actually get in the XSL-FO document at the point where you have 
xsl:copy-of select=Report/TrackT1/[EMAIL PROTECTED]'Left Front']/[EMAIL 
PROTECTED]'1']/svg/ in the stylesheet and perhaps we can help.

If that's where the problem is, you would be better off on the XSL list.
-- 
Charles Knell
[EMAIL PROTECTED] - email



-Original Message-
From: Tracey Zellmann [EMAIL PROTECTED]
Sent: Mon, 20 Feb 2006 08:32:18 -0500
To:   fop-users@xmlgraphics.apache.org
Subject:  putting an svg element into an fo document

My problem may overlap FOP, XSLT, SVG and XPATH, but I would like to start 
here, because I am basically having a problem creating a PDF using FOP. If 
anyone thinks I should better ask another forum, please point me in that 
direction.

I have an xml document that contains a number of svg elements. I am trying to 
use an XSLT stylesheet to put them into an fo document, which I then feed 
through FOP to create a PDF. I have control over the structure of everything.

The xml document is of this form
Report
TrackT1
Position position=Left Front
MCHistogram id=1
svg...

many g elements

/svg

and so forth...

As an example, I am trying to get the above svg element, in its entirety, with 
tags, into an fo document that looks like this:

fo:block
fo:instream-foreign-object content-width=6in
svg...

/svg
/fo:instream-foreign-object
fo:block

If I manually paste the svg element in, the resulting PDF looks exactly how I 
want it to look.

I have been trying to do this programmatically with XSLT, without success, and 
I would appreciate any help or advice.

I have tried

xsl:value-of select=Report/TrackT1/[EMAIL PROTECTED]'Left Front']/[EMAIL 
PROTECTED]'1']/svg/

also

xsl:copy-of select=Report/TrackT1/[EMAIL PROTECTED]'Left Front']/[EMAIL 
PROTECTED]'1']/svg/

Neither approach is successful.

I have tried many other combinations and permutations, without any real 
success. What would be a proper way of getting such an svg element into my 
report?


ÿþ<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML><HEAD>

<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">

<META content="MSHTML 6.00.2900.2802" name=GENERATOR>

<STYLE></STYLE>

</HEAD>

<BODY bgColor=#ffffff>

<DIV><FONT face=Arial size=2>My problem may overlap FOP, XSLT, SVG and XPATH, 

but I would like to start here, because I am basically having a problem creating 

a PDF using FOP. If anyone thinks I should better ask another forum, please 

point me in that direction.</FONT></DIV>

<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>

<DIV><FONT face=Arial size=2>I have an xml document that contains a number of 

svg elements. I am trying to use an XSLT stylesheet to put them into an fo 

document, which I then feed through FOP to create a PDF. I have control over the 

structure of everything.</FONT></DIV>

<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>

<DIV><FONT face=Arial size=2>The xml document is of this form</FONT></DIV>

<DIV><FONT face=Arial size=2>&lt;Report&gt;</FONT></DIV>

<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &lt;TrackT1&gt;</FONT></DIV>

<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;Position 

position="Left Front"&gt;</FONT></DIV>

<DIV><FONT face=Arial 

[ERROR] Index: 5, Size: 4

2005-12-30 Thread cknell
Can someone give me some guidance on this error message? Thanks.


[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] FOP 0.20.5
[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] building formatting object tree
[INFO] setting up fonts
[INFO] [1]
[ERROR] Index: 5, Size: 4

-- 
Charles Knell
[EMAIL PROTECTED] - email

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Help to convert an XML document to another format

2005-08-01 Thread cknell
I think you will have better luck if you post this kind of question to the XSL 
list at http://www.mulberrytech.com/xsl/xsl-list/index.html, but that 
notwithstanding, I looked over your file to see if I could help.

I had some problem with the encoding, so in order to proceed I removed the 
characters with accent marks. English doesn't use them and you didn't give any 
hint as to the encoding you are using. Is is the usual MS Windows ISO encoding?

Having changed the accented characters to non-accented characters I then wrote 
a stylesheet to transform your file to an HTML page. I added some minimal 
styling to make it more readable.

You didn't offer any explanation for The issue is that I need to be able to 
exploit it., so I don't know if you can exploit an HTML page. Here is the 
stylesheet.:

?xml version=1.0 encoding=UTF-8 ?
xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
 xsl:output method=xml indent=yes encoding=UTF-8 /

 xsl:template match=/
  xsl:apply-templates /
 /xsl:template

 xsl:template match=NewDataSet
  html
   head
style type=text/css
 .td-header  {font-family:Arial;font-weight:bold;}
 .td-data   {font-family:Arial;font-weight:normal;font-size:6 pt.;}
/style
   /head
   body
table
 trxsl:apply-templates select=Table mode=header-row //tr
 xsl:apply-templates select=Table mode=body-row /
/table
table
 trxsl:apply-templates select=Table1[1] mode=header-row //tr
 xsl:apply-templates select=child::Table1 mode=body-row /
/table
table
 trxsl:apply-templates select=Table2 mode=header-row //tr
 xsl:apply-templates select=Table2 mode=body-row /
/table
   /body
  /html
 /xsl:template

 xsl:template match=Table|Table1|Table2 mode=header-row
  xsl:call-template name=col-names /
 /xsl:template

 xsl:template match=Table|Table1|Table2 mode=body-row
  trxsl:call-template name=values //tr
 /xsl:template

 xsl:template name=col-names
  xsl:for-each select=child::*
   td class=td-headerxsl:value-of select=name() //td
  /xsl:for-each
 /xsl:template

 xsl:template name=values
  xsl:for-each select=child::*
   td class=td-dataxsl:value-of select=. //td
  /xsl:for-each
 /xsl:template

/xsl:stylesheet
-- 
Charles Knell
[EMAIL PROTECTED] - email



-Original Message-
From: Jimmy Pierre [EMAIL PROTECTED]
Sent: Sun, 31 Jul 2005 23:07:47 +0200
To:   fop-users@xmlgraphics.apache.org;fop-dev@xmlgraphics.apache.org
Subject:  Help to convert an XML document to another format

Greetings,

 

I am not a programmer, so when I encounter the type of problem that I will
expose, I am ever so grateful :-)

 

I have a report per machine and the report can only be saved in XML.

 

I would like to now convert the report in whatever, HTML, DOC, PDF,
spreadsheet etc. The issue is that I need to be able to exploit it.

 

I have posted the report on my site:

 

 http://www.cisware.co.uk/xmlproblem http://www.cisware.co.uk/xmlproblem
it's only 20 K

 

Anybody could give me a tool to just convert this thing? I am fluent in
English/French..

 

Best wishes,

Jimmy



ÿþ<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML><HEAD>

<META http-equiv=Content-Type content="text/html; charset=us-ascii">

<META content="MSHTML 6.00.3790.2440" name=GENERATOR></HEAD>

<BODY>

<DIV><FONT face=Arial size=2>

<DIV><FONT face=Arial size=2>

<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN-US 

style="mso-ansi-language: EN-US"><FONT size=3><FONT 

face="Times New Roman">Greetings,<?xml:namespace prefix = o ns = 

"urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></SPAN></P>

<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN-US 

style="mso-ansi-language: EN-US"><o:p><FONT face="Times New Roman" 

size=3>&nbsp;</FONT></o:p></SPAN></P>

<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN-US 

style="mso-ansi-language: EN-US"><FONT face="Times New Roman"><FONT size=3>I am 

not a programmer, so when I encounter the type of problem that I will