Re: image protocal in Fop on unix

2002-01-03 Thread Keiron Liddle

On 2002.01.02 21:23 Savino, Matt C wrote:
 This works for me:
 
 fo:external-graphic
 src=file:///usr/local/weblogic/config/isappdev/applications/RVWebApp1/WEB-I
 NF/lib/ClinTrialLogoGreenBig.gif /
 
 If you figure out how to use a relative path, PLEASE let me know.

The example in docs/examples/fo/images.fo has relative urls for images 
(can't really have absolute urls for cvs and distributions!).
The images are loaded properly.

Of course if you are embedding fop then you will need to set the basedir 
via the config.

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




cvs commit: xml-fop/src/org/apache/fop/svg SVGElementMapping.java

2002-01-03 Thread keiron

keiron  02/01/03 00:29:01

  Modified:src/org/apache/fop/extensions Tag: fop-0_20_2-maintain
ExtensionElementMapping.java
   src/org/apache/fop/fo Tag: fop-0_20_2-maintain
StandardElementMapping.java
   src/org/apache/fop/svg Tag: fop-0_20_2-maintain
SVGElementMapping.java
  Log:
  fixed thread prob as with trunk
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.4.2.1   +6 -2  
xml-fop/src/org/apache/fop/extensions/ExtensionElementMapping.java
  
  Index: ExtensionElementMapping.java
  ===
  RCS file: 
/home/cvs/xml-fop/src/org/apache/fop/extensions/ExtensionElementMapping.java,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- ExtensionElementMapping.java  24 Sep 2001 09:17:12 -  1.4
  +++ ExtensionElementMapping.java  3 Jan 2002 08:29:00 -   1.4.2.1
  @@ -1,5 +1,5 @@
   /*
  - * $Id: ExtensionElementMapping.java,v 1.4 2001/09/24 09:17:12 keiron Exp $
  + * $Id: ExtensionElementMapping.java,v 1.4.2.1 2002/01/03 08:29:00 keiron Exp $
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
  @@ -21,12 +21,16 @@
   
   private static HashMap foObjs = null;
   
  -public synchronized void addToBuilder(TreeBuilder builder) {
  +private static synchronized void setupExt() {
   if(foObjs == null) {
   foObjs = new HashMap();
   foObjs.put(outline, Outline.maker());
   foObjs.put(label, Label.maker());
   }
  +}
  +
  +public void addToBuilder(TreeBuilder builder) {
  +setupExt();
   builder.addMapping(URI, foObjs);
   
   
  
  
  
  No   revision
  
  
  No   revision
  
  
  1.26.2.1  +6 -4  xml-fop/src/org/apache/fop/fo/Attic/StandardElementMapping.java
  
  Index: StandardElementMapping.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/Attic/StandardElementMapping.java,v
  retrieving revision 1.26
  retrieving revision 1.26.2.1
  diff -u -r1.26 -r1.26.2.1
  --- StandardElementMapping.java   24 Sep 2001 09:17:12 -  1.26
  +++ StandardElementMapping.java   3 Jan 2002 08:29:01 -   1.26.2.1
  @@ -1,5 +1,5 @@
   /*
  - * $Id: StandardElementMapping.java,v 1.26 2001/09/24 09:17:12 keiron Exp $
  + * $Id: StandardElementMapping.java,v 1.26.2.1 2002/01/03 08:29:01 keiron Exp $
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
  @@ -18,7 +18,7 @@
   public class StandardElementMapping implements ElementMapping {
   private static HashMap foObjs = null;
   
  -public synchronized void addToBuilder(TreeBuilder builder) {
  +private static synchronized void setupFO() {
   
   if(foObjs == null) {
   foObjs = new HashMap();
  @@ -107,7 +107,10 @@
   foObjs.put(marker, Marker.maker());
   foObjs.put(retrieve-marker, RetrieveMarker.maker());
   }
  +}
   
  +public void addToBuilder(TreeBuilder builder) {
  +setupFO();
   String uri = http://www.w3.org/1999/XSL/Format;;
   builder.addMapping(uri, foObjs);
   
  @@ -119,7 +122,6 @@
   builder.addElementPropertyList(uri, elem,
  
FOPropertyMapping.getElementMapping(elem));
   }
  -
   }
  -
   }
  +
  
  
  
  No   revision
  
  
  No   revision
  
  
  1.17.2.1  +6 -3  xml-fop/src/org/apache/fop/svg/SVGElementMapping.java
  
  Index: SVGElementMapping.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/SVGElementMapping.java,v
  retrieving revision 1.17
  retrieving revision 1.17.2.1
  diff -u -r1.17 -r1.17.2.1
  --- SVGElementMapping.java5 Oct 2001 10:29:48 -   1.17
  +++ SVGElementMapping.java3 Jan 2002 08:29:01 -   1.17.2.1
  @@ -1,5 +1,5 @@
   /*
  - * $Id: SVGElementMapping.java,v 1.17 2001/10/05 10:29:48 keiron Exp $
  + * $Id: SVGElementMapping.java,v 1.17.2.1 2002/01/03 08:29:01 keiron Exp $
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
  @@ -22,7 +22,7 @@
   
   private static HashMap foObjs = null;
   
  -public synchronized void addToBuilder(TreeBuilder builder) {
  +private static synchronized void setupSVG() {
   
   

Re: [PROPOSAL] FormattingResults

2002-01-03 Thread Keiron Liddle

Hi Jeremias,

The code looks fine. Putting the new classes under apps might not be the 
best place, it's already confusing enough.

There is a problem that it doesn't actually compile due to a missing 
method on PageSequence.

I also think it should be put in the main branch, possibly in a different 
form to go with user agent etc.

Regards,
Keiron.

On 2001.12.04 16:04 Jeremias Maerki wrote:
 Hi foppers
 
 I did something I think is useful for some of us: It's basically a
 couple of new classes to report the results of a FO transformation.
 FormattingResults reports the total number of pages that have been
 generated and has a list of PageSequenceResult objects that return the
 number of pages generated within a particular page-sequence.
 PageSequenceResult also returns the page-sequence's id attribute, so a
 calling application can establish a context between the page-sequence
 and a logical document. This is especially handy if you're rendering
 multiple documents within one XML-file that are separated into multiple
 page-sequences.
 
 Attached is a ZIP-File with a diff and the two new classes. The diff is
 against the tag 'fop-0_20_2-maintain'. I think this should be brought
 over to the main branch at some time. The two new classes go into the
 package org.apache.fop.apps.
 
 As a little side-effect the patch includes a little modification to the
 render() methods in Driver.java which removes some duplicate code.
 
 Tell me what you think! If someone thinks there is a better way of doing
 this, I'm open to suggestions.
 
 
 Cheers,
 Jeremias Märki
 
 mailto:[EMAIL PROTECTED]
 
 OUTLINE AG
 Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
 Fon +41 (41) 317 2020 - Fax +41 (41) 317 2029
 Internet http://www.outline.ch

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




Re: [PROPOSAL] FormattingResults

2002-01-03 Thread Jeremias Maerki

Hi Keiron

On Thu, 3 Jan 2002 09:44:50 +0100 Keiron Liddle wrote:
 Hi Jeremias,
 
 The code looks fine. Putting the new classes under apps might not be the 
 best place, it's already confusing enough.

I guessed that could be a problem. I wasn't that happy with it, either.
But since it has to do with the interface to the outside world I thought
apps would be the most obvious place. I don't care where it finally
lands.

 There is a problem that it doesn't actually compile due to a missing 
 method on PageSequence.

Oops. Which method?

 I also think it should be put in the main branch, possibly in a different 
 form to go with user agent etc.

Ok. I haven't looked at the main branch for some weeks now, so I don't
know how this would look like. I hope to have time again to do something
for FOP in about two months. Maybe you could drop a mail explaining how
you envision this to be done.

Thanks for having looked at it!

 Regards,
 Keiron.
 
 On 2001.12.04 16:04 Jeremias Maerki wrote:
  Hi foppers
  
  I did something I think is useful for some of us: It's basically a
  couple of new classes to report the results of a FO transformation.
  FormattingResults reports the total number of pages that have been
  generated and has a list of PageSequenceResult objects that return the
  number of pages generated within a particular page-sequence.
  PageSequenceResult also returns the page-sequence's id attribute, so a
  calling application can establish a context between the page-sequence
  and a logical document. This is especially handy if you're rendering
  multiple documents within one XML-file that are separated into multiple
  page-sequences.
  
  Attached is a ZIP-File with a diff and the two new classes. The diff is
  against the tag 'fop-0_20_2-maintain'. I think this should be brought
  over to the main branch at some time. The two new classes go into the
  package org.apache.fop.apps.
  
  As a little side-effect the patch includes a little modification to the
  render() methods in Driver.java which removes some duplicate code.
  
  Tell me what you think! If someone thinks there is a better way of doing
  this, I'm open to suggestions.

Cheers,
Jeremias Märki

mailto:[EMAIL PROTECTED]

OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Fon +41 (41) 317 2020 - Fax +41 (41) 317 2029
Internet http://www.outline.ch


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




Re: [PROPOSAL] FormattingResults

2002-01-03 Thread Keiron Liddle

On 2002.01.03 10:01 Jeremias Maerki wrote:
  There is a problem that it doesn't actually compile due to a missing
  method on PageSequence.
 
 Oops. Which method?

int getPageCount()


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




Re: [PROPOSAL] FormattingResults

2002-01-03 Thread Jeremias Maerki


On Thu, 3 Jan 2002 10:06:47 +0100 Keiron Liddle wrote:
 On 2002.01.03 10:01 Jeremias Maerki wrote:
   There is a problem that it doesn't actually compile due to a missing
   method on PageSequence.
  
  Oops. Which method?
 
 int getPageCount()

Oh, now I understand. I forgot to include the change for that one.
You'll find it attached.

Cheers
Jeremias Märki

mailto:[EMAIL PROTECTED]

OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Fon +41 (41) 317 2020 - Fax +41 (41) 317 2029
Internet http://www.outline.ch



PageSequence.diff
Description: Binary data

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


Running fop from Java

2002-01-03 Thread Mitchell, Scott(LIT)

Hi,

I am trying to use jox to take a java bean and create an xml file.  With
this file, I use fop to convert to a pdf.  I get the following error when
running the code.  

Input XSL; Line 1; Column 1
XSL Error: Could not parse Input XML document!
XSL Error: SAX Exception
org.apache.xalan.xslt.XSLProcessorException: The markup in the document
preceding the root element must be well-formed.
at
org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1630)
at
org.apache.xalan.xslt.XSLTEngineImpl.getSourceTreeFromInput(XSLTEngineImpl.j
ava:852)
at
org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:552)
at com.wutka.jox.test.TestSer.main(TestSer.java:82)

This is the code, the red line is where the error occurs.

public class TestSer
{
public static void main(String[] args)
{
try
{
TestBean b = new TestBean();
b.setFoo(5);
b.setBar(This is the bar value);
b.setThingies(new String[] {
Moe, Larry, Curly, Shemp, Curly Joe });
TestSubbean sub = new TestSubbean();
sub.setName(Mark);
sub.setAge(35);
b.setSub(sub);

FileOutputStream fileOut = new
FileOutputStream(f:/ProgramFiles/jox/source/com/wutka/jox/test/bean.xml);
JOXBeanOutputStream joxOut = new JOXBeanOutputStream(fileOut);

joxOut.writeObject(MarkTest, b);

joxOut.close(); 
   
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Reader stylesheet = null;

// Get the XSLT processor
XSLTProcessor processor = XSLTProcessorFactory.getProcessor();

// Create the input source
Reader responseReader = new
StringReader(f:/ProgramFiles/jox/source/com/wutka/jox/test/bean.xml);
  
XSLTInputSource responseSource = new
XSLTInputSource(responseReader);

// Get the stylesheet
String stylesheetPath = ;

try {
stylesheet = new FileReader(c:/stylesheet.css);
} 
catch (FileNotFoundException fnfe) {}

if (stylesheet == null) {
stylesheet = new FileReader(c:/stylesheet.css);
}

XSLTInputSource stylesheetSource = new
XSLTInputSource(stylesheet);

// Get a target to contain the output
Writer formWriter  = new StringWriter();
XSLTResultTarget target = new XSLTResultTarget(formWriter);

// Transform the XML response to fo format
processor.process(responseSource, stylesheetSource, target);

// Redirect the fo file from a Writer to a Reader
Reader formReader = new StringReader(formWriter.toString());

// Transform from fop to pdf
XMLReader xmlReader = new SAXParser();  
Driver driver = new Driver();
driver.setRenderer(new org.apache.fop.render.pdf.PDFRenderer());
 
driver.addElementMapping(org.apache.fop.fo.StandardElementMapping);
 
driver.addElementMapping(org.apache.fop.svg.SVGElementMapping);
 
driver.addPropertyList(org.apache.fop.fo.StandardPropertyListMapping);
 
driver.addPropertyList(org.apache.fop.svg.SVGPropertyListMapping);
driver.setOutputStream(new BufferedOutputStream(baos));
driver.buildFOTree(xmlReader, new InputSource(formReader));
driver.format();
driver.render();

// Clean up
baos.close();
stylesheet.close();
}
catch (Exception exc)
{
exc.printStackTrace();
}
}
}


Any ideas would be appreciated.

Scott Mitchell
Experienced Software Developer

Liberty Information Technology  Direct Line: ++44 (0) 28 9044 5582
Clarendon House   Fax:   ++44 (0) 28 9044 5511
9-21 Adelaide StreetSwitchboard:   ++44 (0) 28 9044 5500
Belfast, Northern Ireland BT2 8DJ  Email:
[EMAIL PROTECTED]

Disclaimer: The contents of this e-mail and attached files in no way reflect
any policies of Liberty Information Technology Ltd.


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




Re: Running fop from Java

2002-01-03 Thread Claus Nielsen


How does your XML file look ?

Claus Nielsen



   
 
Mitchell, 
 
Scott(LIT)   To: [EMAIL PROTECTED]   
 
S.Mitchell@Liberty   cc:  
 
-IT.co.ukSubject: Running fop from Java   
 
   
 
03-01-2002 11:32   
 
Please respond to  
 
fop-dev
 
   
 
   
 




Hi,

I am trying to use jox to take a java bean and create an xml file.  With
this file, I use fop to convert to a pdf.  I get the following error when
running the code.

Input XSL; Line 1; Column 1
XSL Error: Could not parse Input XML document!
XSL Error: SAX Exception
org.apache.xalan.xslt.XSLProcessorException: The markup in the document
preceding the root element must be well-formed.
at
org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1630)
at
org.apache.xalan.xslt.XSLTEngineImpl.getSourceTreeFromInput(XSLTEngineImpl.j

ava:852)
at
org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:552)
at com.wutka.jox.test.TestSer.main(TestSer.java:82)

This is the code, the red line is where the error occurs.

public class TestSer
{
public static void main(String[] args)
{
try
{
TestBean b = new TestBean();
b.setFoo(5);
b.setBar(This is the bar value);
b.setThingies(new String[] {
Moe, Larry, Curly, Shemp, Curly Joe });
TestSubbean sub = new TestSubbean();
sub.setName(Mark);
sub.setAge(35);
b.setSub(sub);

FileOutputStream fileOut = new
FileOutputStream(f:/ProgramFiles/jox/source/com/wutka/jox/test/bean.xml);
JOXBeanOutputStream joxOut = new JOXBeanOutputStream(fileOut);

joxOut.writeObject(MarkTest, b);

joxOut.close();

ByteArrayOutputStream baos = new ByteArrayOutputStream();
Reader stylesheet = null;

// Get the XSLT processor
XSLTProcessor processor = XSLTProcessorFactory.getProcessor();

// Create the input source
Reader responseReader = new
StringReader(f:/ProgramFiles/jox/source/com/wutka/jox/test/bean.xml);

XSLTInputSource responseSource = new
XSLTInputSource(responseReader);

// Get the stylesheet
String stylesheetPath = ;

try {
stylesheet = new FileReader(c:/stylesheet.css);
}
catch (FileNotFoundException fnfe) {}

if (stylesheet == null) {
stylesheet = new FileReader(c:/stylesheet.css);
}

XSLTInputSource stylesheetSource = new
XSLTInputSource(stylesheet);

// Get a target to contain the output
Writer formWriter  = new StringWriter();
XSLTResultTarget target = new XSLTResultTarget(formWriter);

// Transform the XML response to fo format
processor.process(responseSource, stylesheetSource, target);

// Redirect the fo file from a Writer to a Reader
Reader formReader = new StringReader(formWriter.toString());

// Transform from fop to pdf
XMLReader xmlReader = new SAXParser();
Driver driver = new Driver();
driver.setRenderer(new org.apache.fop.render.pdf.PDFRenderer
());

driver.addElementMapping(org.apache.fop.fo.StandardElementMapping);

driver.addElementMapping(org.apache.fop.svg.SVGElementMapping);

driver.addPropertyList(org.apache.fop.fo.StandardPropertyListMapping);

driver.addPropertyList(org.apache.fop.svg.SVGPropertyListMapping);
driver.setOutputStream(new BufferedOutputStream(baos));
driver.buildFOTree(xmlReader, new InputSource(formReader));
driver.format();
driver.render();

// Clean up
baos.close();
stylesheet.close();
   }
catch (Exception exc)
   

cvs commit: xml-fop/src/org/apache/fop/fo/pagination PageSequence.java

2002-01-03 Thread keiron

keiron  02/01/03 02:39:56

  Modified:src/org/apache/fop/apps Tag: fop-0_20_2-maintain Driver.java
StreamRenderer.java
   src/org/apache/fop/fo Tag: fop-0_20_2-maintain
FOTreeBuilder.java
   src/org/apache/fop/fo/pagination Tag: fop-0_20_2-maintain
PageSequence.java
  Added:   src/org/apache/fop/apps Tag: fop-0_20_2-maintain
FormattingResults.java PageSequenceResults.java
  Log:
  Formatting results patch to enable embedders to obtain info from render doc
  Submitted by: Jeremias Maerki [EMAIL PROTECTED]
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.36.2.1  +17 -14xml-fop/src/org/apache/fop/apps/Driver.java
  
  Index: Driver.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/Driver.java,v
  retrieving revision 1.36
  retrieving revision 1.36.2.1
  diff -u -r1.36 -r1.36.2.1
  --- Driver.java   5 Oct 2001 09:49:21 -   1.36
  +++ Driver.java   3 Jan 2002 10:39:56 -   1.36.2.1
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Driver.java,v 1.36 2001/10/05 09:49:21 keiron Exp $
  + * $Id: Driver.java,v 1.36.2.1 2002/01/03 10:39:56 keiron Exp $
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
  @@ -241,6 +241,19 @@
   _treeBuilder.reset();
   }
   
  +/**
  + * Returns the results of the last rendering process. Information includes
  + * the total number of pages generated and the number of pages per
  + * page-sequence.
  + */
  +public FormattingResults getResults() {
  +try {
  +return _treeBuilder.getStreamRenderer().getResults();
  +} catch (NullPointerException e) {
  +return null;
  +}
  +}
  +
   public boolean hasData() {
   return (_treeBuilder.hasData());
   }
  @@ -483,19 +496,9 @@
*/
   public synchronized void render(Document document)
   throws FOPException {
  -
  -try {
  -DocumentInputSource source = new DocumentInputSource(document);
  -DocumentReader reader = new DocumentReader();
  -reader.setContentHandler(getContentHandler());
  -reader.parse(source);
  -} catch (SAXException e) {
  -throw new FOPException(e);
  -}
  -catch (IOException e) {
  -throw new FOPException(e);
  -}
  -
  + DocumentInputSource source = new DocumentInputSource(document);
  + DocumentReader reader = new DocumentReader();
  + render(reader, source);
   }
   
   /**
  
  
  
  1.6.2.1   +11 -0 xml-fop/src/org/apache/fop/apps/StreamRenderer.java
  
  Index: StreamRenderer.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/StreamRenderer.java,v
  retrieving revision 1.6
  retrieving revision 1.6.2.1
  diff -u -r1.6 -r1.6.2.1
  --- StreamRenderer.java   11 Sep 2001 10:04:24 -  1.6
  +++ StreamRenderer.java   3 Jan 2002 10:39:56 -   1.6.2.1
  @@ -66,6 +66,11 @@
   private Renderer renderer;
   
   /**
  + * The formatting results to be handed back to the caller.
  + */
  +private FormattingResults results = new FormattingResults();
  +
  +/**
 The FontInfo for this renderer.
   */
   private FontInfo fontInfo = new FontInfo();
  @@ -102,6 +107,10 @@
   return idReferences;
   }
   
  +public FormattingResults getResults() {
  +return this.results;
  +}
  +
   public void addExtension(ExtensionObj ext) {
   extensions.addElement(ext);
   }
  @@ -192,6 +201,8 @@
   } catch (FOPException e) {
   throw new SAXException(e);
   }
  +this.results.haveFormattedPageSequence(pageSequence);
  +log.debug(Last page-sequence produced +pageSequence.getPageCount()+ 
pages.);
   }
   
   public synchronized void queuePage(Page page)
  
  
  
  No   revision
  
  
  No   revision
  
  
  1.1.2.1   +73 -0 xml-fop/src/org/apache/fop/apps/Attic/FormattingResults.java
  
  
  
  
  1.1.2.1   +50 -0 xml-fop/src/org/apache/fop/apps/Attic/PageSequenceResults.java
  
  
  
  
  No   revision
  
  
  No   revision
  
  
  1.30.2.1  +5 -1  xml-fop/src/org/apache/fop/fo/FOTreeBuilder.java
  
  Index: FOTreeBuilder.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FOTreeBuilder.java,v
  retrieving revision 1.30
  retrieving revision 1.30.2.1
  diff -u -r1.30 -r1.30.2.1
  --- 

RE: Running fop from Java

2002-01-03 Thread Mitchell, Scott(LIT)

 bean.xml 
Any help is greatly appreciated, I have only been working on this technology
for a few days now.

 -Original Message-
 From: Claus Nielsen [SMTP:[EMAIL PROTECTED]]
 Sent: Thursday, January 03, 2002 10:45 AM
 To:   [EMAIL PROTECTED]
 Subject:  Re: Running fop from Java
 
 
 How does your XML file look ?
 
 Claus Nielsen
 
 
 
  
 
 Mitchell,
 
 Scott(LIT)   To:
 [EMAIL PROTECTED]
 S.Mitchell@Liberty   cc:
 
 -IT.co.ukSubject: Running fop
 from Java
  
 
 03-01-2002 11:32
 
 Please respond to
 
 fop-dev
 
  
 
  
 
 
 
 
 
 Hi,
 
 I am trying to use jox to take a java bean and create an xml file.  With
 this file, I use fop to convert to a pdf.  I get the following error when
 running the code.
 
 Input XSL; Line 1; Column 1
 XSL Error: Could not parse Input XML document!
 XSL Error: SAX Exception
 org.apache.xalan.xslt.XSLProcessorException: The markup in the document
 preceding the root element must be well-formed.
 at
 org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1630)
 at
 org.apache.xalan.xslt.XSLTEngineImpl.getSourceTreeFromInput(XSLTEngineImpl
 .j
 
 ava:852)
 at
 org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:552)
 at com.wutka.jox.test.TestSer.main(TestSer.java:82)
 
 This is the code, the red line is where the error occurs.
 
 public class TestSer
 {
 public static void main(String[] args)
 {
 try
 {
 TestBean b = new TestBean();
 b.setFoo(5);
 b.setBar(This is the bar value);
 b.setThingies(new String[] {
 Moe, Larry, Curly, Shemp, Curly Joe });
 TestSubbean sub = new TestSubbean();
 sub.setName(Mark);
 sub.setAge(35);
 b.setSub(sub);
 
 FileOutputStream fileOut = new
 FileOutputStream(f:/ProgramFiles/jox/source/com/wutka/jox/test/bean.xml)
 ;
 JOXBeanOutputStream joxOut = new JOXBeanOutputStream(fileOut);
 
 joxOut.writeObject(MarkTest, b);
 
 joxOut.close();
 
 ByteArrayOutputStream baos = new ByteArrayOutputStream();
 Reader stylesheet = null;
 
 // Get the XSLT processor
 XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
 
 // Create the input source
 Reader responseReader = new
 StringReader(f:/ProgramFiles/jox/source/com/wutka/jox/test/bean.xml);
 
 XSLTInputSource responseSource = new
 XSLTInputSource(responseReader);
 
 // Get the stylesheet
 String stylesheetPath = ;
 
 try {
 stylesheet = new FileReader(c:/stylesheet.css);
 }
 catch (FileNotFoundException fnfe) {}
 
 if (stylesheet == null) {
 stylesheet = new FileReader(c:/stylesheet.css);
 }
 
 XSLTInputSource stylesheetSource = new
 XSLTInputSource(stylesheet);
 
 // Get a target to contain the output
 Writer formWriter  = new StringWriter();
 XSLTResultTarget target = new XSLTResultTarget(formWriter);
 
 // Transform the XML response to fo format
 processor.process(responseSource, stylesheetSource, target);
 
 // Redirect the fo file from a Writer to a Reader
 Reader formReader = new StringReader(formWriter.toString());
 
 // Transform from fop to pdf
 XMLReader xmlReader = new SAXParser();
 Driver driver = new Driver();
 driver.setRenderer(new org.apache.fop.render.pdf.PDFRenderer
 ());
 
 driver.addElementMapping(org.apache.fop.fo.StandardElementMapping);
 
 driver.addElementMapping(org.apache.fop.svg.SVGElementMapping);
 
 driver.addPropertyList(org.apache.fop.fo.StandardPropertyListMapping);
 
 driver.addPropertyList(org.apache.fop.svg.SVGPropertyListMapping);
 driver.setOutputStream(new BufferedOutputStream(baos));
 driver.buildFOTree(xmlReader, new InputSource(formReader));
 driver.format();
 driver.render();
 
 // Clean up
 baos.close();
 stylesheet.close();
}
 catch (Exception exc)
 {
 exc.printStackTrace();
 }
 }
 }
 
 
 Any ideas would be appreciated.
 
 Scott Mitchell
 Experienced Software Developer
 
 Liberty Information Technology  Direct Line: ++44 (0) 28 9044 5582
 Clarendon House Fax:   ++44 (0) 28
 9044
 5511
 9-21 Adelaide StreetSwitchboard:   ++44 (0) 28 9044
 5500
 Belfast, Northern Ireland BT2 8DJ  Email:
 [EMAIL PROTECTED]
 
 

RE: Running fop from Java

2002-01-03 Thread Buchtík, Michal

You MUST use XSL-FO stylesheet to convert XML to PDF with FOP.

CSS stylesheet is used to display  XML in browser

Michal


-Original Message-
From: Mitchell, Scott(LIT) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 03, 2002 11:49 AM
To: [EMAIL PROTECTED]
Subject: RE: Running fop from Java


I do not have an xsl file.  I am using a .css file.  It does not do anything
at the minute, I am just trying to get it runnning initially.

 -Original Message-
 From: Claus Nielsen [SMTP:[EMAIL PROTECTED]]
 Sent: Thursday, January 03, 2002 10:58 AM
 To:   [EMAIL PROTECTED]
 Subject:  RE: Running fop from Java
 
 
 And your xsl ?
 
 Claus Nielsen
 
 
 
  
 
 Mitchell,
 
 Scott(LIT)   To:
 [EMAIL PROTECTED]
 S.Mitchell@Liberty   cc:
 
 -IT.co.ukSubject: RE: Running fop
 from Java
  
 
 03-01-2002 11:42
 
 Please respond to
 
 fop-dev
 
  
 
  
 
 
 
 
 
  bean.xml
 Any help is greatly appreciated, I have only been working on this
 technology
 for a few days now.
 
  -Original Message-
  From:   Claus Nielsen [SMTP:[EMAIL PROTECTED]]
  Sent:   Thursday, January 03, 2002 10:45 AM
  To: [EMAIL PROTECTED]
  Subject: Re: Running fop from Java
 
 
  How does your XML file look ?
 
  Claus Nielsen
 
 
 
 
 
  Mitchell,
 
  Scott(LIT)   To:
  [EMAIL PROTECTED]
  S.Mitchell@Liberty   cc:
 
  -IT.co.ukSubject: Running fop
  from Java
 
 
  03-01-2002 11:32
 
  Please respond to
 
  fop-dev
 
 
 
 
 
 
 
 
 
  Hi,
 
  I am trying to use jox to take a java bean and create an xml file.  With
  this file, I use fop to convert to a pdf.  I get the following error
 when
  running the code.
 
  Input XSL; Line 1; Column 1
  XSL Error: Could not parse Input XML document!
  XSL Error: SAX Exception
  org.apache.xalan.xslt.XSLProcessorException: The markup in the document
  preceding the root element must be well-formed.
  at
  org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1630)
  at
 
 org.apache.xalan.xslt.XSLTEngineImpl.getSourceTreeFromInput(XSLTEngineImpl
  .j
 
  ava:852)
  at
  org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:552)
  at com.wutka.jox.test.TestSer.main(TestSer.java:82)
 
  This is the code, the red line is where the error occurs.
 
  public class TestSer
  {
  public static void main(String[] args)
  {
  try
  {
  TestBean b = new TestBean();
  b.setFoo(5);
  b.setBar(This is the bar value);
  b.setThingies(new String[] {
  Moe, Larry, Curly, Shemp, Curly Joe });
  TestSubbean sub = new TestSubbean();
  sub.setName(Mark);
  sub.setAge(35);
  b.setSub(sub);
 
  FileOutputStream fileOut = new
  FileOutputStream
 (f:/ProgramFiles/jox/source/com/wutka/jox/test/bean.xml)
  ;
  JOXBeanOutputStream joxOut = new
 JOXBeanOutputStream(fileOut);
 
  joxOut.writeObject(MarkTest, b);
 
  joxOut.close();
 
  ByteArrayOutputStream baos = new ByteArrayOutputStream();
  Reader stylesheet = null;
 
  // Get the XSLT processor
  XSLTProcessor processor = XSLTProcessorFactory.getProcessor
 ();
 
  // Create the input source
  Reader responseReader = new
  StringReader(f:/ProgramFiles/jox/source/com/wutka/jox/test/bean.xml);
 
  XSLTInputSource responseSource = new
  XSLTInputSource(responseReader);
 
  // Get the stylesheet
  String stylesheetPath = ;
 
  try {
  stylesheet = new FileReader(c:/stylesheet.css);
  }
  catch (FileNotFoundException fnfe) {}
 
  if (stylesheet == null) {
  stylesheet = new FileReader(c:/stylesheet.css);
  }
 
  XSLTInputSource stylesheetSource = new
  XSLTInputSource(stylesheet);
 
  // Get a target to contain the output
  Writer formWriter  = new StringWriter();
  XSLTResultTarget target = new XSLTResultTarget(formWriter);
 
  // Transform the XML response to fo format
  processor.process(responseSource, stylesheetSource, target);
 
  // Redirect the fo file from a Writer to a Reader
  Reader formReader = new StringReader(formWriter.toString());
 
  // Transform from fop to pdf
  XMLReader xmlReader = new SAXParser();
  Driver driver = new Driver();
  

Re: image protocal in Fop on unix

2002-01-03 Thread Nicola Ken Barozzi


- Original Message -
From: Keiron Liddle [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 03, 2002 9:18 AM
Subject: Re: image protocal in Fop on unix


 On 2002.01.02 21:23 Savino, Matt C wrote:
  This works for me:
 
  fo:external-graphic
 
src=file:///usr/local/weblogic/config/isappdev/applications/RVWebApp1/WEB-I
  NF/lib/ClinTrialLogoGreenBig.gif /
 
  If you figure out how to use a relative path, PLEASE let me know.

 The example in docs/examples/fo/images.fo has relative urls for images
 (can't really have absolute urls for cvs and distributions!).
 The images are loaded properly.

 Of course if you are embedding fop then you will need to set the basedir
 via the config.

This is really interesting 4 me.
I would like to set it for the Cocoon FOP Serializer.
How do you set the basedir programmatically?
I'd be very grateful if you can indicate the relevant classes/parameters.

Thank you in advance.

Ken
--
Nicola Ken Barozzi [EMAIL PROTECTED]

These are the days of miracle and wonder...
  ...so don't cry baby, don't cry...
  Paul Simon



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




Re: image protocal in Fop on unix

2002-01-03 Thread Keiron Liddle

 This is really interesting 4 me.
 I would like to set it for the Cocoon FOP Serializer.
 How do you set the basedir programmatically?
 I'd be very grateful if you can indicate the relevant classes/parameters.

Coccon documentation on how to setup coccon:
http://xml.apache.org/cocoon/userdocs/serializers/pdf-serializer.html

FOP documentation on how to embed FOP:
http://xml.apache.org/fop/embedding.html


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




Re: image protocal in Fop on unix

2002-01-03 Thread Nicola Ken Barozzi


- Original Message -
From: Keiron Liddle [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 03, 2002 3:17 PM
Subject: Re: image protocal in Fop on unix


  This is really interesting 4 me.
  I would like to set it for the Cocoon FOP Serializer.
  How do you set the basedir programmatically?
  I'd be very grateful if you can indicate the relevant
classes/parameters.

 Coccon documentation on how to setup coccon:
 http://xml.apache.org/cocoon/userdocs/serializers/pdf-serializer.html

 FOP documentation on how to embed FOP:
 http://xml.apache.org/fop/embedding.html


Thank you, but in the docs you indicated there is no reference to base-dir
parameters.
Is it possible to specify it in Options?

I've looked in the code and in AbstractFopImage I have:
this.m_imageReader =
ImageReaderFactory.Make(this.m_href.toExternalForm(),
this.m_href.openStream());

Then I looked in FopImageFactory and found:
// maybe relative
URL context_url = null;
String base = Configuration.getStringValue(baseDir);
if(base == null) {
throw new FopImageException(Error with image URL: 
 + e.getMessage()
 +  and no base directory is
specified);
}
try {
absoluteURL = new
URL(Configuration.getStringValue(baseDir)
  + absoluteURL.getFile());
} catch (MalformedURLException e_context) {
// pb context url
throw new FopImageException(Invalid Image URL - error on
relative URL : 
+ e_context.getMessage());
}

In the code of the Ant task I found:

   org.apache.fop.configuration.Configuration.put(baseDir,
   task.getFofile().getParentFile().toURL().toExternalForm());

Configuration is static :-O
Should I use Configuration?

Ken
--
Nicola Ken Barozzi [EMAIL PROTECTED]

These are the days of miracle and wonder...
  ...so don't cry baby, don't cry...
  Paul Simon






smime.p7s
Description: application/pkcs7-signature


RE: image protocal in Fop on unix

2002-01-03 Thread Maneshi Tuli


thanks , it works , i changed something and it works .
i gave like this . i removed 'file ' prefix
my syntex is
 fo:external-graphic src
 =//home/opt/weblogic610/wlserver6.1/config/mydomain/app
 lications/DefaultWebApp/images/english/global_navbar/db_header.gif /

and it works
thanks





 Message History 



From: Savino, Matt C [EMAIL PROTECTED] on 01/02/2002 05:53 PM

Please respond to [EMAIL PROTECTED]

To:   '[EMAIL PROTECTED]' [EMAIL PROTECTED]
cc:
Subject:  RE: image protocal in Fop on unix


If you have the path or filename wrong (including case), it will still give
the same error. Try pasting your full path into a Unix cp command to make
sure you have no typos. Other than that, I don't know. Here is the driver
setup I use:

  org.apache.fop.apps.Driver driver = new org.apache.fop.apps.Driver();
  driver.setErrorDump(true);
  driver.setRenderer(driver.RENDER_PDF);
  driver.setupDefaultMappings() ;
  driver.setOutputStream(out);
  driver.render(foDoc);



 -Original Message-
 From: Maneshi Tuli [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 02, 2002 12:38 PM
 To: [EMAIL PROTECTED]
 Subject: RE: image protocal in Fop on unix



 I am giving in the same way
 but it gives
  error on relative URL : no protocol:
 null/home/opt/weblogic610/wlserver6.1/config/mydomain/applicat
 ions/DefaultWebApp/images/english/global_navbar/db_header.gif


 my syntex is
 fo:external-graphic src
 =file:///home/opt/weblogic610/wlserver6.1/config/mydomain/app
 lications/DefaultWebApp/images/english/global_navbar/db_header.gif /


 plz help me find out , what is the cause of this
 thanks




  Message History
 


 From: Savino, Matt C [EMAIL PROTECTED]
 on 01/02/2002 03:23 PM

 Please respond to [EMAIL PROTECTED]

 To:   '[EMAIL PROTECTED]' [EMAIL PROTECTED]
 cc:
 Subject:  RE: image protocal in Fop on unix


 This works for me:

 fo:external-graphic
 src=file:///usr/local/weblogic/config/isappdev/applications/R
 VWebApp1/WEB-I
 NF/lib/ClinTrialLogoGreenBig.gif /

 If you figure out how to use a relative path, PLEASE let me know.

 -Matt

  -Original Message-
  From: Maneshi Tuli [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, January 02, 2002 12:26 PM
  To: [EMAIL PROTECTED]
  Subject: image protocal in Fop on unix
 
 
 
 
  hi ,
  I want to give the image path on unix machine
  i give like this
  fo:external-graphic src
  =file:/home/opt/weblogic610/wlserver6.1/config/mydomain/appli
  cations/DefaultWebApp/images/english/global_navbar/db_header.gif /
 
  i tried with this also
  fo:external-graphic src
  =/home/opt/weblogic610/wlserver6.1/config/mydomain/applicatio
  ns/DefaultWebApp/images/english/global_navbar/db_header.gif /
 
  but it is not working , it says no protocal
  null/home/opt/weblogic610/wlserver6.1/config/mydomain/applica
  tions/DefaultWebApp/images/english/global_navbar/db_header.gif
  not found.
 
  plz help what shouild i give
 
  thanks
 
 
 
 
 
  --
 
  This e-mail may contain confidential and/or privileged
  information. If you are not the intended recipient (or have
  received this e-mail in error) please notify the sender
  immediately and destroy this e-mail. Any unauthorized
  copying, disclosure or distribution of the material in this
  e-mail is strictly forbidden.
 
 
 
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, email: [EMAIL PROTECTED]
 
 


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






 --

 This e-mail may contain confidential and/or privileged
 information. If you are not the intended recipient (or have
 received this e-mail in error) please notify the sender
 immediately and destroy this e-mail. Any unauthorized
 copying, disclosure or distribution of the material in this
 e-mail is strictly forbidden.



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




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






--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



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




xml-docs

2002-01-03 Thread Peter B. West

Keiron,

I went to cvs looking for examples of how to write the xml for 
multi-level menus like the new design menus, but could not see where 
it was happening.  I found this -

  external href=design/index.html  label=NEW DESIGN /

- in fop.xml, but not the source.  Where is it?

Peter


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




DO NOT REPLY [Bug 5674] New: - postscript generated by FOP is missing end commands

2002-01-03 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5674.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5674

postscript generated by FOP is missing end commands

   Summary: postscript generated by FOP is missing end commands
   Product: Fop
   Version: all
  Platform: All
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: general
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The postscript generated by FOP is missing FOPFonts end after showpage at
each page. This causes the postscript viewer/printer to use huge amounts of
memory for large documents.

We set PS as outdata (not PRINTER).

We user the following sed script to fix it after the transformation.
sed 's/showpage/showpage FOPFonts end/'
And then it works.

Out version of fop is 20.1

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




Haw to insert different text into headers.

2002-01-03 Thread Dariusz Grabowski


I try create  simple document with four pages. The document contains only text.

In the header I must put some texts. First page must contains different text
than rest of a pages.

I know haw to create different layouts using fo:page-sequence-master.
But I dont know haw to insert different text in header on first page
and another text in header in next pages?

Help me.

DarekG


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




Servlet called multiple times solved

2002-01-03 Thread Savino, Matt C

Thanks to David Frankson and the other members of this board, I have finally
fully solved the problem with IE calling FOP two or three times problem. The
first solution came from this:

http://support.microsoft.com/support/kb/articles/Q293/7/92.ASP

But if you read the fine print, you notice that IE only uses
user-agent=contype on the second hit. That still leaves the first and third
hits calling FOP. There are some clues to tell the difference betweent the
first and third hits, so I was trying to only return the full PDF on the
third hit. The problem is that IE sometimes decides to be content with only
one hit, and sometimes it decides to make all three. There is no apparent
rhyme or reason to this decision. If you only return the content-type on the
first call when IE has decided to only make one call it just sits there.
Anyway, the second part of the solution was to cache the PDF byte-array in
the user's session and return it on any subsequent hits on the first pass.
As a key to test that the PDFs are truly the same, I use a counter in the
query string which is the time in milliseconds. 

Anyway here's the code. As usual there's a bunch of extra stuff, but I
figure it may help. Please ask if you have any questions.

-Matt

 ReportGeneratorServlet.java 



ReportGeneratorServlet.java
Description: Binary data

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


AW: Haw to insert different text into headers.

2002-01-03 Thread sascha

Hello,
you can use different page sequences for example!
sako

-Ursprngliche Nachricht-
Von: Dariusz Grabowski [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 3. Januar 2001 17:08
An: [EMAIL PROTECTED]
Betreff: Haw to insert different text into headers.



I try create  simple document with four pages. The document contains only
text.

In the header I must put some texts. First page must contains different text
than rest of a pages.

I know haw to create different layouts using fo:page-sequence-master.
But I dont know haw to insert different text in header on first page
and another text in header in next pages?

Help me.

DarekG


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


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




Re: Haw to insert different text into headers.

2002-01-03 Thread Claus Nielsen


Try something like this:

 fo:layout-master-set
fo:simple-page-master
   master-name=first-page
   page-height=29.7cm
   page-width=21cm
   margin-top=1.0cm
   margin-left=1.76cm
   margin-right=4.0cm
   fo:region-before region-name=header-first extent=6.0cm/
   fo:region-body
 margin-top=6.1cm
 margin-bottom=3.1cm/
/fo:simple-page-master

fo:simple-page-master
   master-name=all-other-page
   page-height=29.7cm
   page-width=21cm
   margin-top=1.0cm
   margin-left=1.76cm
   margin-right=3.0cm
   fo:region-before region-name=header-rest extent=3.5cm/
   fo:region-body
 margin-top=3.6cm
 margin-bottom=3.1cm/
/fo:simple-page-master

fo:page-sequence-master master-name=content
fo:single-page-master-reference master-name=
first-page page-position=first initial-page-number=1/
fo:repeatable-page-master-alternatives
  fo:conditional-page-master-reference master-name
=all-other-page/
   /fo:repeatable-page-master-alternatives
/fo:page-sequence-master
  /fo:layout-master-set

  fo:page-sequence master-name=content
xsl:call-template name=firstheader/
xsl:call-template name=restheader/
fo:flow flow-name=xsl-region-body
   fo:block/fo:block
/fo:flow
  /fo:page-sequence

  xsl:template name=firstheader
fo:static-content flow-name=header-first
  fo:block/fo:block
/fo:static-content
  /xsl:template

  xsl:template name=restheader
fo:static-content flow-name=header-rest
  fo:block/fo:block
/fo:static-content
  /xsl:template


Hope it gives you a hint :)

Claus Nielsen
Denmark



   
  
Dariusz   
  
Grabowski To: [EMAIL PROTECTED]
  
dariusz.grabows   cc: 
  
[EMAIL PROTECTED] Subject: Haw to insert different text 
into headers.   
   
  
03-01-2001 17:08   
  
Please respond 
  
to fop-dev 
  
   
  
   
  





I try create  simple document with four pages. The document contains only
text.

In the header I must put some texts. First page must contains different
text
than rest of a pages.

I know haw to create different layouts using fo:page-sequence-master.
But I don't know haw to insert different text in header on first page
and another text in header in next pages?

Help me.

DarekG


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






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




RE: Servlet called multiple times solved

2002-01-03 Thread Michael Wenczel

Thanks for sharing this Matt. I was just going down this road (caching)
myself. This will save an afternoon or more. regards, mike


-Original Message-
From: Savino, Matt C [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 03, 2002 12:32 PM
To: '[EMAIL PROTECTED]'
Subject: Servlet called multiple times solved


Thanks to David Frankson and the other members of this board, I have
finally
fully solved the problem with IE calling FOP two or three times problem.
The
first solution came from this:

http://support.microsoft.com/support/kb/articles/Q293/7/92.ASP

But if you read the fine print, you notice that IE only uses
user-agent=contype on the second hit. That still leaves the first and
third
hits calling FOP. There are some clues to tell the difference betweent
the
first and third hits, so I was trying to only return the full PDF on the
third hit. The problem is that IE sometimes decides to be content with
only
one hit, and sometimes it decides to make all three. There is no
apparent
rhyme or reason to this decision. If you only return the content-type on
the
first call when IE has decided to only make one call it just sits there.
Anyway, the second part of the solution was to cache the PDF byte-array
in
the user's session and return it on any subsequent hits on the first
pass.
As a key to test that the PDFs are truly the same, I use a counter in
the
query string which is the time in milliseconds. 

Anyway here's the code. As usual there's a bunch of extra stuff, but I
figure it may help. Please ask if you have any questions.

-Matt

 ReportGeneratorServlet.java 

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




RE: Servlet called multiple times solved

2002-01-03 Thread Savino, Matt C

No problem. Just make sure you don't try to make isIE4 or the user session
into member variables like I did. I did that a day or so ago for convenience
and wasn't thinking.

-Matt

 -Original Message-
 From: Michael Wenczel [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 03, 2002 1:08 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Servlet called multiple times solved
 
 
 Thanks for sharing this Matt. I was just going down this road 
 (caching)
 myself. This will save an afternoon or more. regards, mike
 
 
 -Original Message-
 From: Savino, Matt C [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 03, 2002 12:32 PM
 To: '[EMAIL PROTECTED]'
 Subject: Servlet called multiple times solved
 
 
 Thanks to David Frankson and the other members of this board, I have
 finally
 fully solved the problem with IE calling FOP two or three 
 times problem.
 The
 first solution came from this:
 
 http://support.microsoft.com/support/kb/articles/Q293/7/92.ASP
 
 But if you read the fine print, you notice that IE only uses
 user-agent=contype on the second hit. That still leaves the first and
 third
 hits calling FOP. There are some clues to tell the difference betweent
 the
 first and third hits, so I was trying to only return the full 
 PDF on the
 third hit. The problem is that IE sometimes decides to be content with
 only
 one hit, and sometimes it decides to make all three. There is no
 apparent
 rhyme or reason to this decision. If you only return the 
 content-type on
 the
 first call when IE has decided to only make one call it just 
 sits there.
 Anyway, the second part of the solution was to cache the PDF 
 byte-array
 in
 the user's session and return it on any subsequent hits on the first
 pass.
 As a key to test that the PDFs are truly the same, I use a counter in
 the
 query string which is the time in milliseconds. 
 
 Anyway here's the code. As usual there's a bunch of extra stuff, but I
 figure it may help. Please ask if you have any questions.
 
 -Matt
 
  ReportGeneratorServlet.java 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]
 
 


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




Ann: Upcoming live, web/CDROM, and audio-over-IP XSLT/XPath/XSLFO training (fop-dev)

2002-01-03 Thread G. Ken Holman

Please read on if you are interested in XSLT/XPath or XSLFO training:

   (1) - live 3-day and 2-day hands-on courses the week of
 February 18-22, 2002 (at risk; please act soon)
   (2) - web- and CDROM-based 10-week courses starting in both
 February 2002 and March 2002
   (3) - real-time audio-over-IP 3-hour lectures held every month

Thanks!

.. Ken

(1) To Ottawa-area XML'ers (and those interested in travelling to Ottawa!):

We are again having a 5-day training blitz of two separate hands-on 
courses: 3 days of XSLT/XPath immediately followed by 2 days of XSLFO 
during the week of February 18-22, 2002.  These complementary courses 
provide comprehensive coverage over the week.

The course titles are Practical Transformation Using XSLT and XPath and 
Practical Formatting Using XSLFO.

Please follow the highlighted link from our home page below for details on 
early-bird/loyalty pricing and links to the course syllabi and other 
information.  The hands-on exercises use commercial and/or non-commercial 
tools listed in the syllabi.

These particular deliveries are at risk due to insufficient enrollment to 
date ... please let us know ASAP (in the next few days) if you or your 
colleagues are interested, or we may have to postpone the delivery for a 
number of months.  I suppose many travel budgets and training budgets have 
been poorly affected recently, which unfortunately puts these courses at 
risk for others.

(2) For those needing hands-on but are unable to travel:

The XSLT/XPath material is being offered over a ten week period in both 
web-based and CD-based formats through Online-Learning.com starting on each 
of February 11, 2002 and March 11, 2002 under the title Practical Guide to 
XSLT ... see our delivery calendars linked from our home page noted below

(3) For those needing introductory lectures:

We have four titles being offered every month through the Intellor Group 
for you to attend from the comfort of your own computer ... see our 
delivery calendars linked from our home page noted below.  These are 
three-hour live lectures being delivered with real-time audio-over-IP and 
interactive client software (see screen capture on our web site).

cc:
XSL List
XML-DEV
XML-L
XML-EDI
XSLFO
XSLFO-WWW
xalan-dev
fop-dev
comp.text.xml
microsoft.public.xml
microsoft.public.xsl
OASIS members
IDEA-ICC members

--
Training Blitz: 3-days XSLT/XPath, 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:   2002-01-10,11,16,18,02-11,12,13,15,18,21,
-03-11,14,15,18,19,04-08,09,10,12


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




RE: Servlet called multiple times solved

2002-01-03 Thread Michael Wenczel

Got it. 


-Original Message-
From: Savino, Matt C [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 03, 2002 4:04 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Servlet called multiple times solved


No problem. Just make sure you don't try to make isIE4 or the user
session
into member variables like I did. I did that a day or so ago for
convenience
and wasn't thinking.

-Matt

 -Original Message-
 From: Michael Wenczel [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 03, 2002 1:08 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Servlet called multiple times solved
 
 
 Thanks for sharing this Matt. I was just going down this road 
 (caching)
 myself. This will save an afternoon or more. regards, mike
 
 
 -Original Message-
 From: Savino, Matt C [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 03, 2002 12:32 PM
 To: '[EMAIL PROTECTED]'
 Subject: Servlet called multiple times solved
 
 
 Thanks to David Frankson and the other members of this board, I have
 finally
 fully solved the problem with IE calling FOP two or three 
 times problem.
 The
 first solution came from this:
 
 http://support.microsoft.com/support/kb/articles/Q293/7/92.ASP
 
 But if you read the fine print, you notice that IE only uses
 user-agent=contype on the second hit. That still leaves the first and
 third
 hits calling FOP. There are some clues to tell the difference betweent
 the
 first and third hits, so I was trying to only return the full 
 PDF on the
 third hit. The problem is that IE sometimes decides to be content with
 only
 one hit, and sometimes it decides to make all three. There is no
 apparent
 rhyme or reason to this decision. If you only return the 
 content-type on
 the
 first call when IE has decided to only make one call it just 
 sits there.
 Anyway, the second part of the solution was to cache the PDF 
 byte-array
 in
 the user's session and return it on any subsequent hits on the first
 pass.
 As a key to test that the PDFs are truly the same, I use a counter in
 the
 query string which is the time in milliseconds. 
 
 Anyway here's the code. As usual there's a bunch of extra stuff, but I
 figure it may help. Please ask if you have any questions.
 
 -Matt
 
  ReportGeneratorServlet.java 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]
 
 


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


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