RE: Want to know the normal practice

2005-02-08 Thread Manisha Sathe
1) I am just trying with one sample xml and xls (got from web). 
2) Using FopServlet (came with fop- from servlet example)
3) But continuously getting NullPointer Exception at following 

driver.render(input.getParser(), input.getInputSource());

I am attaching the xml and xsl for the info

XML File - data.xml
-
?xml version="1.0" encoding="UTF-8"?CatalogueBook TitleMastering EJB/Title AuthorEd Roman/Author Price$45.00/Price/BookBook TitleDesign Patterns/Title AuthorErich Gamma/Author Price$50.00/Price/BookBook TitleEffective Java/Title AuthorJosch Bloch/Author Price$30.00/Price/Book/Catalogue--


XSL File - format.xsl
---

?xml version="1.0" encoding="UTF-8"?xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:java="java" exclude-result-prefixes="fo"xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes"/!-- = --!-- root element: Catalogue --!-- = --xsl:template match="Catalog"fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
fo:layout-master-set!-- (1. Define the page margins) --fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm" margin-top="2cm" margin-bottom="2cm" margin-left="2cm" margin-right="2cm"fo:region-body//fo:simple-page-master/fo:layout-master-set!-- (2. For the page layout refer to the master layout)--fo:page-sequence master-reference="simpleA4"fo:flow flow-name="xsl-region-body"fo:block font-size="16pt" font-weight="bold" space-after="5mm"Catalog Information/fo:block!-- (3. Defining the block with table definition to display data --
fo:block font-size="10pt"fo:table table-layout="fixed"fo:table-column column-width="8cm"/fo:table-column column-width="8cm"/fo:table-column column-width="8cm"/fo:table-bodyxsl:apply-templates//fo:table-body/fo:table/fo:block/fo:flow/fo:page-sequence/fo:root/xsl:template!-- = --!-- Book
 Information --!-- = --xsl:template match="Book" fo:table-rowfo:table-cellfo:block xsl:value-of select="Title"//fo:block/fo:table-cellfo:table-cellfo:block  xsl:value-of select="Author"//fo:block/fo:table-cell fo:table-cellfo:block  xsl:value-of
 select="Price"//fo:block/fo:table-cell/fo:table-row/xsl:template/xsl:stylesheet
-

Pls tell mewhat am i missing now ? If possible whether anybody can provide me the sample xml / xsl files so that i can test it out ?

regards
Manisha

Arun Sinha [EMAIL PROTECTED] wrote:
Hi Manisha,Once you have your XML, you can directly use :-fop -xml myxml.xml -xsl myxsl.xsl -pdf mydoc.pdfHope the above helps.Cheers.ArunFrom: Manisha Sathe <[EMAIL PROTECTED]>Reply-To: [EMAIL PROTECTED]To: [EMAIL PROTECTED]Subject: Want to know the normal practiceDate: Sun, 6 Feb 2005 23:14:52 -0800 (PST)I need to pull some data from database and want to show it inside pdf in a tabular form. What is the best way to do it ?1)First create XML and convert it to FO2)Take FO and convert it into PDFIs there any other direct way ? My environment is java / JSP / Struts framework with MSSQL as backend. Is there any example for FOP with Database ?btw, the examples given seems to be using
 deprecated methods, where can i find latest examples ? (using j2sdk 1.4.2_03)regardsManisha-Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term'_MSN Spaces! Your space, your time. http://www.msn.co.in/spaces Your personal haven online.-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]
		Do you Yahoo!? 
Yahoo! Search presents - Jib Jab's 'Second Term'

RE: Want to know the normal practice

2005-02-08 Thread Manisha Sathe
btw i also tried from command line

fop -xml data.xml -xsl format.xsl -pdf mydoc.pdf

I am getting following

[INFO] using SAX2 Parser
[INFO]FOP 0.20.5

[INFO] using SAX2 Parser[INFO] building formatting object tree
[INFO] setting up fonts
[ERROR] java.lang.NullPointerException

So same thing for both, pls any body has working xml/xsl sample so that at least i start with that ?

regards
Manisha

Manisha Sathe [EMAIL PROTECTED] wrote:

1) I am just trying with one sample xml and xls (got from web). 
2) Using FopServlet (came with fop- from servlet example)
3) But continuously getting NullPointer Exception at following 

driver.render(input.getParser(), input.getInputSource());

I am attaching the xml and xsl for the info

XML File - data.xml
-
?xml version="1.0" encoding="UTF-8"?CatalogueBook TitleMastering EJB/Title AuthorEd Roman/Author Price$45.00/Price/BookBook TitleDesign Patterns/Title AuthorErich Gamma/Author Price$50.00/Price/BookBook TitleEffective Java/Title AuthorJosch Bloch/Author Price$30.00/Price/Book/Catalogue--


XSL File - format.xsl
---

?xml version="1.0" encoding="UTF-8"?xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:java="java" exclude-result-prefixes="fo"xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes"/!-- = --!-- root element: Catalogue --!-- = --xsl:template match="Catalog"fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
fo:layout-master-set!-- (1. Define the page margins) --fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm" margin-top="2cm" margin-bottom="2cm" margin-left="2cm" margin-right="2cm"fo:region-body//fo:simple-page-master/fo:layout-master-set!-- (2. For the page layout refer to the master layout)--fo:page-sequence master-reference="simpleA4"fo:flow flow-name="xsl-region-body"fo:block font-size="16pt" font-weight="bold" space-after="5mm"Catalog Information/fo:block!-- (3. Defining the block with table definition to display data --
fo:block font-size="10pt"fo:table table-layout="fixed"fo:table-column column-width="8cm"/fo:table-column column-width="8cm"/fo:table-column column-width="8cm"/fo:table-bodyxsl:apply-templates//fo:table-body/fo:table/fo:block/fo:flow/fo:page-sequence/fo:root/xsl:template!-- = --!-- Book
 Information --!-- = --xsl:template match="Book" fo:table-rowfo:table-cellfo:block xsl:value-of select="Title"//fo:block/fo:table-cellfo:table-cellfo:block  xsl:value-of select="Author"//fo:block/fo:table-cell fo:table-cellfo:block  xsl:value-of
 select="Price"//fo:block/fo:table-cell/fo:table-row/xsl:template/xsl:stylesheet
-

Pls tell mewhat am i missing now ? If possible whether anybody can provide me the sample xml / xsl files so that i can test it out ?

regards
Manisha

Arun Sinha [EMAIL PROTECTED] wrote:
Hi Manisha,Once you have your XML, you can directly use :-fop -xml myxml.xml -xsl myxsl.xsl -pdf mydoc.pdfHope the above helps.Cheers.ArunFrom: Manisha Sathe <[EMAIL PROTECTED]>Reply-To: [EMAIL PROTECTED]To: [EMAIL PROTECTED]Subject: Want to know the normal practiceDate: Sun, 6 Feb 2005 23:14:52 -0800 (PST)I need to pull some data from database and want to show it inside pdf in a tabular form. What is the best way to do it ?1)First create XML and convert it to FO2)Take FO and convert it into PDFIs there any other direct way ? My environment is java / JSP / Struts framework with MSSQL as backend. Is there any example for FOP with Database ?btw, the examples given seems to be using
 deprecated methods, where can i find latest examples ? (using j2sdk 1.4.2_03)regardsManisha-Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term'_MSN Spaces! Your space, your time. http://www.msn.co.in/spaces Your personal haven online.-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]


Do you Yahoo!?Yahoo! Search presents - Jib Jab's 'Second Term'
		Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard.

Re: Want to know the normal practice

2005-02-08 Thread john farrow



You data has "Catalog", but you stylesheet matches 
on "Catalogue" - the spelling is different.

Regards

John Farrow

Visual 
Programming Ltd mail 
PO Box 22-222, 
Khandallah, Wellington, New Zealand site 
Level 2, 2 Ganges 
Road, Khandallah, Wellington, New Zealand phone 
+64 4 479 1738 
fax 
+64 4 479 1294 
web 
http://www.xmlpdf.com 


  - Original Message - 
  From: 
  Manisha Sathe 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, February 08, 2005 1:36 
  PM
  Subject: RE: Want to know the normal 
  practice
  
  1) I am just trying with one sample xml and xls (got from web). 
  2) Using FopServlet (came with fop- from servlet example)
  3) But continuously getting NullPointer Exception at following 
  
  driver.render(input.getParser(), input.getInputSource());
  
  I am attaching the xml and xsl for the info
  
  XML File - data.xml
  -
  ?xml version="1.0" 
  encoding="UTF-8"?CatalogueBook 
  TitleMastering EJB/Title AuthorEd 
  Roman/Author 
  Price$45.00/Price/BookBook 
  TitleDesign Patterns/Title AuthorErich 
  Gamma/Author 
  Price$50.00/Price/BookBook 
  TitleEffective Java/Title AuthorJosch 
  Bloch/Author 
  Price$30.00/Price/Book/Catalogue--
  
  
  XSL File - format.xsl
  ---
  
  ?xml version="1.0" encoding="UTF-8"?xsl:stylesheet 
  version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  xmlns:fo="http://www.w3.org/1999/XSL/Format" 
  xmlns:java="java" 
  exclude-result-prefixes="fo"xsl:output method="xml" 
  version="1.0" omit-xml-declaration="no" indent="yes"/!-- 
  = --!-- root element: Catalogue 
  --!-- = 
  --xsl:template 
  match="Catalog"fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
  fo:layout-master-set!-- (1. Define the 
  page margins) --fo:simple-page-master 
  master-name="simpleA4" page-height="29.7cm" page-width="21cm" 
  margin-top="2cm" margin-bottom="2cm" margin-left="2cm" 
  margin-right="2cm"fo:region-body//fo:simple-page-master/fo:layout-master-set!-- 
  (2. For the page layout refer to the master 
  layout)--fo:page-sequence 
  master-reference="simpleA4"fo:flow 
  flow-name="xsl-region-body"fo:block 
  font-size="16pt" font-weight="bold" space-after="5mm"Catalog 
  Information/fo:block!-- 
  (3. Defining the block with table definition to display data --
  fo:block 
  font-size="10pt"fo:table 
  table-layout="fixed"fo:table-column 
  column-width="8cm"/fo:table-column 
  column-width="8cm"/fo:table-column 
  column-width="8cm"/fo:table-bodyxsl:apply-templates//fo:table-body/fo:table/fo:block/fo:flow/fo:page-sequence/fo:root/xsl:template!-- 
  = --!-- Book 
  Information --!-- 
  = --xsl:template 
  match="Book" 
  fo:table-rowfo:table-cellfo:block 
  xsl:value-of 
  select="Title"//fo:block/fo:table-cellfo:table-cellfo:block 
   xsl:value-of 
  select="Author"//fo:block/fo:table-cell 
  fo:table-cellfo:block 
   xsl:value-of 
  select="Price"//fo:block/fo:table-cell/fo:table-row/xsl:template/xsl:stylesheet
  -
  
  Pls tell mewhat am i missing now ? If possible whether 
  anybody can provide me the sample xml / xsl files so that i can test it out 
  ?
  
  regards
  Manisha
  
  Arun Sinha [EMAIL PROTECTED] 
  wrote:
  Hi 
Manisha,Once you have your XML, you can directly use :-fop 
-xml myxml.xml -xsl myxsl.xsl -pdf mydoc.pdfHope the above 
helps.Cheers.ArunFrom: Manisha Sathe 
<[EMAIL PROTECTED]>Reply-To: 
[EMAIL PROTECTED]To: [EMAIL PROTECTED]Subject: 
Want to know the normal practiceDate: Sun, 6 Feb 2005 23:14:52 -0800 
(PST)I need to pull some data from database and want to show 
it inside pdf in a tabular form. What is the best way to do it 
?1)First create XML and convert it to FO2)Take FO 
and convert it into PDFIs there any other direct way ? My 
environment is java / JSP / Struts framework with MSSQL as backend. 
Is there any example for FOP with Database ?btw, the 
examples given seems to be using deprecated methods, where can i 
find latest examples ? (using j2sdk 
1.4.2_03)regardsManisha-Do 
you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second 
Term'_MSN 
Spaces! Your space, your time. http://www.msn.co.in/spaces Your personal 
haven 
online.-To 
unsubscribe, e-mail: [EMAIL PROTECTED]For additional 
commands, e-mail: [EMAIL PROTECTED]
  
  
  Do you Yahoo!?Yahoo! Search presents - Jib 
  Jab's 'Second Term'


RE: Want to know the normal practice

2005-02-07 Thread Arun Sinha
Hi Manisha,
Once you have your XML, you can directly use :-
fop -xml myxml.xml -xsl myxsl.xsl -pdf mydoc.pdf
Hope the above helps.
Cheers.
Arun

From: Manisha Sathe [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Want to know the normal practice
Date: Sun, 6 Feb 2005 23:14:52 -0800 (PST)
I need to pull some data from database and want to show it inside pdf in a 
tabular form. What is the best way to do it ?

1)First create XML and convert it to FO
2)Take FO and convert it into PDF
Is there any other direct way ? My environment is java / JSP / Struts 
framework with MSSQL as backend. Is there any example for FOP with Database 
?

btw, the examples given seems to be using deprecated methods, where can i 
find latest examples ? (using j2sdk 1.4.2_03)

regards
Manisha



-
Do you Yahoo!?
 Yahoo! Search presents - Jib Jab's 'Second Term'
_
MSN Spaces! Your space, your time. http://www.msn.co.in/spaces Your personal 
haven online.

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