regarding addition in xsl

2002-02-06 Thread Meena



Hi,
I have a param in my template. and i've assigned a 
value '1' to it.
This template is called recursively from within 
itself. I want to keep incrementing the param everytime this template is called. 
Is it possible to do so in xsl?

xsl:apply-templates 
select="test"
 xsl:with-param 
name="number"1/xsl:with-param
/xsl:apply-templates

xsl:template match="test"
xsl:param name="number"


xsl:apply-templates 
select="test"
 xsl:with-param name="number" 
select="$number+1"/
/xsl:apply-templates


regds,
MEena

**Disclaimer
  


Information contained in this E-MAIL being proprietary to Wipro Limited
is 'privileged' and 'confidential' and intended for use only by the
individual or entity to which it is addressed. You are notified that any
use, copying or dissemination of the information contained in the E-MAIL
in any manner whatsoever is strictly prohibited.



 


SimpleTranform xsl, xml to fo using Xalan

2002-02-06 Thread Pedro Barco Bernal
Hi all,

These sentences works perfectly at local machine (make the fo file) but
when we run it at server write a fofile empty, and there aren't any error or
exception...

¿Someone knows what could be the problem?

//Make transformation of xmlfile to fo-file using  xslfile

 TransformerFactory tFactory = TransformerFactory.newInstance();
 Transformer transformer = tFactory.newTransformer(new
StreamSource(xsl.xsl));
 transformer.transform(new StreamSource(xml.xml), new StreamResult(new
FileOutputStream(xml.fo)));




Re: SimpleTranform xsl, xml to fo using Xalan

2002-02-06 Thread Keiron Liddle
On 2002.02.06 11:51 Pedro Barco Bernal wrote:
Hi all,
These sentences works perfectly at local machine (make the fo file)
but
when we run it at server write a fofile empty, and there aren't any error
or
exception...
¿Someone knows what could be the problem?
//Make transformation of xmlfile to fo-file using  xslfile
 TransformerFactory tFactory = TransformerFactory.newInstance();
 Transformer transformer = tFactory.newTransformer(new
StreamSource(xsl.xsl));
 transformer.transform(new StreamSource(xml.xml), new StreamResult(new
FileOutputStream(xml.fo)));
This simply writes to the streams. You should do a bit more handling such 
as flushing and closing the streams I think. You are probably exiting or 
reading the file before it is written out.


Re: SimpleTranform xsl, xml to fo using Xalan

2002-02-06 Thread Pedro Barco Bernal
I tried with this, but I didn't obtain any result... ¿What is the problem?


//Make transformation of xmlfile to fo-file using  xslfile

 TransformerFactory tFactory = TransformerFactory.newInstance();
 Transformer transformer = tFactory.newTransformer(new
StreamSource(xsl.xsl));
  FileOutputStream f = new FileOutputStream(xml2.fo);
  StreamResult h = new StreamResult(f);
 transformer.transform(new StreamSource(xml.xml), h);
  f.flush();
  f.close();

- Original Message -
From: Keiron Liddle [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 06, 2002 12:01 PM
Subject: Re: SimpleTranform xsl, xml to fo using Xalan


 On 2002.02.06 11:51 Pedro Barco Bernal wrote:
  Hi all,
 
  These sentences works perfectly at local machine (make the fo file)
  but
  when we run it at server write a fofile empty, and there aren't any
error
  or
  exception...
 
  ¿Someone knows what could be the problem?
 
  //Make transformation of xmlfile to fo-file using  xslfile
 
   TransformerFactory tFactory = TransformerFactory.newInstance();
   Transformer transformer = tFactory.newTransformer(new
  StreamSource(xsl.xsl));
   transformer.transform(new StreamSource(xml.xml), new StreamResult(new
  FileOutputStream(xml.fo)));

 This simply writes to the streams. You should do a bit more handling such
 as flushing and closing the streams I think. You are probably exiting or
 reading the file before it is written out.



Using FOP in an applet ?

2002-02-06 Thread Bruno VERNAY
Title: Using FOP in an applet ?





Hi,


 What I would like to do is send XML to the browser client (MS-IE6, in the case of our extranet, but not limited to.)
 There, show it on screen as html/css (already possible with XSLT and the MS-XML dll.)
 and print it as PDF ... (Impossible for now, why didn't MS implement css @page.)



Would it be a *solution* to embed FOP in an applet and use it on the client to print PDF ?




PS : After some research, I didn't find anything about FOP and Applet.
I know that it it possible to use FOP with Servlet, PHP and many Apache project.
I know about WebGrabber, PdfLib, RenderX ...
(This means : I am not expecting people on this list to be at my service, but I came to the point where I need help to continue.)

 Thanks.





RE: Using FOP in an applet ?

2002-02-06 Thread Bruno VERNAY



In the 
case of my current problem, I have a high band-width. 
I saw that fop.jar is 1.6Mo, it 
should need Xalan and Xerces too, so between 2 and 3 Mo. (I don't use SVG, so I 
save 2Mo of Batik)
This is not the problem in my 
case.


  Embeding FOP in an applet 
  would make your applet humongous. It would only be possible in a LAN 
  configuration with high band-width.


Re: regarding addition in xsl

2002-02-06 Thread G. Ken Holman
At 2002-02-06 16:03 +0530, Meena wrote:
I have a param in my template. and i've assigned a value '1' to it.
This template is called recursively from within itself.
In your example you are not calling the template, you are pushing the 
children
I want to keep incrementing the param everytime this template is called. 
Is it possible to do so in xsl?

xsl:apply-templates select=test
  xsl:with-param name=number1/xsl:with-param
Careful, you aren't declaring a type of number here, but of type result 
tree fragment which can be coerced into a number but isn't really a number 
yet.

/xsl:apply-templates
xsl:template match=test
Here you are declaring a template to match elements named test, you 
aren't declaring a template named test.

xsl:param name=number

xsl:apply-templates select=test
Here you are pushing child elements named test, you aren't calling a 
template named test.

   xsl:with-param name=number select=$number+1/
/xsl:apply-templates
I think your problems will be solved by using call-template ... see below.
I hope this helps.
 Ken
T:\ftemptype meena.xsl
?xml version=1.0 encoding=utf-8?
xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
version=1.0
xsl:template match=/
  xsl:call-template name=test/
/xsl:template
xsl:template name=test
  xsl:param name=number select=1/
  xsl:text/Loop xsl:value-of select=$number/:
xsl:text/
  xsl:if test=$numberlt;5
xsl:call-template name=test
  xsl:with-param name=number select=$number + 1/
/xsl:call-template
  /xsl:if
/xsl:template
/xsl:stylesheet
T:\ftempxt meena.xsl meena.xsl
?xml version=1.0 encoding=utf-8?
Loop 1:
Loop 2:
Loop 3:
Loop 4:
Loop 5:
T:\ftemp
--
Upcoming: 3-days XSLT/XPath and/or 2-days XSLFO - Feb 18-22, 2002
G. Ken Holmanmailto:[EMAIL PROTECTED]
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/
Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995)
ISBN 0-13-065196-6Definitive XSLT  XPath
ISBN 1-894049-08-X  Practical Transformation Using XSLT and XPath
ISBN 1-894049-07-1   Practical Formatting Using XSLFO
XSL/XML/DSSSL/SGML/OmniMark services, books(electronic, printed),
articles, training(instructor-live,Internet-live,web/CD,licensed)
Next public training:  02-02-11,12,14,15,18,21,03-04,05,06,08,11,
-04-08,09,10,12,05-14,15,06-04,07


RE: Security on FOP

2002-02-06 Thread Matthew L. Avizinis

 -Original Message-
 From: Christian Geisert [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 05, 2002 4:27 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Security on FOP


 dav sem wrote:

  Hi Community,
 
  I have a question:
 
  with FOP, Is possible to lock with a password
  the PDF Document generated???


 No.

  Which part of API can permit this? or this
  lock have to be performed by XSL:FO meta-language??


 ?
 You will have to do some post-processing with other software.

If you have Acrobat 5.0 -- you can use the File | Batch Processing | Edit
Batch Sequences feature.  You'll be able to process multiple files at one
time.  Although, not the ideal solution, it works for us.
   Matthew L. Avizinis mailto:[EMAIL PROTECTED]
Gleim Publications, Inc.
   4201 NW 95th Blvd.
 Gainesville, FL 32606
(352)-375-0772 ext. 101
  www.gleim.com http://www.gleim.com

===
computing (kum' pyoot ing)
1. n the art of calculating how much time you wasted and money you spent in
a doomed attempt to master a machine with a mind of it's own. --from
computing: A HACKER'S DICTIONARY


  Tanks

 Christian



FOP SVG precision; how to keep thin lines precision???

2002-02-06 Thread Irina Grigorieva



Hi,

I faced a problem. I need to generate barcodes (it 
is not a problem) and draw it into PDF.
That is, to draw several rectangles...
The FO document looks like:

?xml version="1.0" 
encoding="UTF-8"?
fo:root 
xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fox=http://xml.apache.org/fop/extensions
...
svg:svg xmlns:svg="http://www.w3.org/2000/svg" width="300" height="300"
...
svg:rect x="0" y="0" 
stroke-width="0" stroke="none" fill="black" height="50" 
width="1"/
...
/svg:svg
/fo:root

When setting small _and_ fractional values to 
rectangle widths, they are displayed incorrectly:
the rectangles that should be the same widths 
differs in real widths about.. several times.

However, the value "1" is displayed 
correctly.

As far as I could understand, the problem is FOP 
precision is 72 dots per inch, that's why
any fractional values like 0.5..1.5 produces huge 
distortions.

Am I right? Is it afeature of SVG, 
afeature of FOP? Can I use something different than Batik for 
SVG?
Would generating images solve the problem of 
precision (if then place these images into PDF with FOP)?

Please help.

BR, Irina.



Re: FOP SVG precision; how to keep thin lines precision???

2002-02-06 Thread Chuck Paussa
Irina Grigorieva wrote:
Hi,
 

I faced a problem. I need to generate barcodes (it is not a problem) 
and draw it into PDF.

That is, to draw several rectangles...
The FO document looks like:
We had the same problem and, after much playing with SVG and the example 
apps at http://www.renderx.com/barcodes.html we decided to purchase 
barcode fonts and embed those fonts in the PDF (Instructions at 
http://xml.apache.org/fop/fonts.html ) Barcode fonts are not expensive 
and the quality is excellent.

Chuck


Re: Page Sequence Question

2002-02-06 Thread Chuck Paussa
Lars,
I believe you use
fo:table table-omit-footer-at-break=true
and then define the footer within
   fo:table:footer
If you want to extend the footer across the whole page (So its not just 
a column footer) then you use
   fo:table-cell number-columns-spanned=the number of columns 
in the table

Lars Karschen wrote:
Hi,
I've got a question concerning page-sequences.
I tried to create a sequence of pages, which all
have a header on top of the page and no footer.
The flow content is a table.
Once all information on the table is displayed, the 
last page should close with a footer, summarizing 
the table contents.
The problem is, the footer should be on the last
page with the last data of the table if there is 
still enough space left, and it shouldn't be the 
only region beginning a new page if possible.

Is there any way to do it via page-sequences?
regards,
Lars Karschen



Java 1.1.8 was Re: Lock generated PDF

2002-02-06 Thread ewitness - Ben Fowler
  My 'platform' is a slot loading iMac.
I guessed right then. :-) You could install MacOSX which has a decent
JDK 1.3.1.
Apart from the fact that I would be making a leap of faith that
all else I want to do, would be effective (id est not too slow)
once I have OS X (note that it is quite hard to return to classic
Mac OS), it remains a goal for my project to run on systems
three years old. I feel that I should not force my customers
to upgrade.
  It should be a general goal of Open Source projects to be backwards
 compatible. My understanding is that it should be possible to
 use a tool like ant to extract a Java 1.1 subset.
Should it? To a certain extent, yes. But I think it would be best if
Steve Jobs held his promise to fully support the Java2 platform even on
his older systems.
You bet. I have to explain to people (or rather, explain away)
why there was phraseology on the front of the mac Java page
stating that the Mac was the best platform for developing java,
exempli gratia,
URL: http://developer.apple.com/devnews/devnews082997.html ,
... the Mac OS is the best platform for developing Java products.
This was so out of accord with reality, that I suspect that those
people thought I must be soft in the head for not being able to
work miracles with Java. No doubt, the Jobs RDF is so strong that
in Cupertino a dual G4 Powermac can finish an infinite loop in 7
and a half seconds allowing its users to grab the best seats for
Farmer MacGregor's Flying Circus.
My point is that however undesirable, it is understandable that
commercial organisations need to keep people upgrading. The
reverse should be the case for OS software In our case the only
issue is the cost of support, and since even niche products can
be made essentially self-supporting, there should be no artifical
limit established. Or do you look forward to a day when, say, vi
(which is well past its use by date) in the form of its popular
workalikes enter its EOL phase.
I've found a notice in the ant documentation:
For the current version of Ant, you will also need a JDK installed on
your system, version 1.1 or later. A future version of Ant will require
JDK 1.2 or later.
Quite so. As time goes by more and more of the good stuff becomes
(in my experience) JDK 1.3 or better, and obviously each of us
will reach a point when we can no longer handle older platforms
or protocols. Metrowerks has recently, for example, stopped delivering
68k Assemblers and Pascal compilers with its Mac desktop products.
I will leave it as an exercise for the reader to decide what the
users of these tools felt about it.
Ben.


FOPException

2002-02-06 Thread Xie, David (IPCG-NJ)
Hi all,

Has anyone ever experience the following FOP exception error?  Do you know what 
causes it?  I appreciate your input.

thanks

David


org.apache.fop.apps.FOPException
 at org.apache.fop.apps.Driver.render(Driver.java:429)
 at org.apache.fop.apps.Driver.run(Driver.java:508)
 at org.apache.fop.tools.servlet.FopPdf.renderFO(FopPdf.java:206)
 at org.apache.fop.tools.servlet.FopPdf.renderXml_Xsl(FopPdf.java:231)
 at org.apache.fop.tools.servlet.FopPdf.doGet(FopPdf.java:156)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unkn
 Source)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Sour

 at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
 at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
 at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
 at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
 at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
 at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
 at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
 at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
 at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
 at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
 at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
 at org.apache.catalina.valves.AccessLogValve.invoke(Unknown Source)
 at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
 at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
 at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
 at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
 at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
 at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
 at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)