RE: XSLTInputHandler not doing its job??: beers

2001-07-10 Thread Wolf Gustavo (SGC-EXT)
Title: RE: XSLTInputHandler not doing its job??



ah!! 
finally I got it!! it was not a problem of my XML, but just the way to 
display in frigging IE!!
 
BTW, I 
have not yet solved my problem with the parser but had to move along to other 
parallel problems with the XSLT.
 
Anyway, more than a few are entitled to free beers when they pass by 
Geneva (CH) (oder rotwein), mainly Karen, Jens and Erik.
 
Thanks 
to all, 
 
    
Gustavo

  -Message d'origine-De : James Telfer 
  [mailto:[EMAIL PROTECTED]]Envoyé : mardi, 10. juillet 2001 
  11:02À : '[EMAIL PROTECTED]'Objet : RE: 
  XSLTInputHandler not doing its job??
  erm - did you look at the source? When you view an XML doc in iexplore, 
  it doesn't display the DTD. I had a quick peek at the DTD in the source and it 
  looks ok. Try right-clicking and choosing "view source".
  
-Original Message-From: Williamson, James 
[mailto:[EMAIL PROTECTED]]Sent: Monday, July 09, 
2001 10:28 PMTo: '[EMAIL PROTECTED]'Subject: RE: 
XSLTInputHandler not doing its job??
Gustavo, 
 
The point I was trying to make 
is that this isn't valid (in the xml file you 
posted): 
 
  (View Source for full 
doctype...)> 
 
And the fact that 
you're getting error messages with this in it might be the 
problem?!
 
And why are youd 
eclaring the fo namespace twice in your xsl file?
 
Regards, 

 
James

  -Original Message-From: Wolf Gustavo (SGC-EXT) 
  [mailto:[EMAIL PROTECTED]]Sent: 06 July 2001 
  10:04To: '[EMAIL PROTECTED]'Subject: RE: 
  XSLTInputHandler not doing its job??
  James,
     
  I am sorry but I don't understand your answer. Do you mean that writing 
  the word periodic in the !DOCTYPE is wrong? As far as I see in examples it 
  is not (cf: www.xml101.com/dtd/dtd_intro.asp 
  ).
   
  Anyway, as a line command Fop gives the same answer with or without 
  the DTD within the XML file, so I still have that 
  problem.
   
  If I did not get the point at all, would you please mind explaining 
  me again?
   
  Thanks a lot,
   
  Gustavo
  
-Message d'origine-De : Williamson, James 
[mailto:[EMAIL PROTECTED]]Envoyé : jeudi, 
5. juillet 2001 18:15À : 
        '[EMAIL PROTECTED]'Objet : RE: XSLTInputHandler not 
doing its job??
Wolf, 
That's not valid XML, when it says view source for full 
doctype it doesn't expect you to take that literally. DOCTYPE's generally take these form: 
 

or 
 
or (embedded) 
 
    your 
embedded DTD ]> 
I'm no FOP expert but I'm sure I remember being able to 
configure FOP to tolerate XML (i.e. HTML) perhaps you could have a look 
at the source code for the FOP app.
Regards, 
James 
-Original Message- From: 
Wolf Gustavo (SGC-EXT) [mailto:[EMAIL PROTECTED]] 
Sent: 05 July 2001 16:50 To: 
Fop (E-mail) Subject: XSLTInputHandler not doing 
its job?? 
Hi,   as I said a few hours ago, I have 
the following code: 
    InputHandler 
inputHandler = new XSLTInputHandler(xmlInputSource,xslInputSource);     InputSource 
inputSource = inputHandler.getInputSource();     XMLReader  parser 
= (XMLReader) Class.forName(this.parserClass).newInstance();   parser.setFeature("http://xml.org/sax/features/namespace-prefixes",true); 
/** * Creates the driver 
telling it to write the output to a file. */     Driver driver = new 
Driver();     
driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer"); 
//  ERROR IN THE FOLLOWING LINE     
driver.buildFOTree(parser, inputSource);     File test = new 
File("test.pdf");     
driver.setOutputStream(new java.io.FileOutputStream(test)); 
    
driver.format();     
driver.render(); 
In the second line, InputSource inputSource is suppossed 
to be the .fo file after the processing of 
xmlInputSource by xslInputSource. 
I am using as xmlInputSource and xslInputSource two 
files that I took from the chap 15 of the 
XMLbible (attached). 
Now, when the program tries to execute 
"driver.buildFOTree(parser, inputSource);", I 
get the following msg and Exception: 
"building formatting object tree  WARNING: Unknown formatting object ^PERIODIC_TABLE 
 FOPException: org.xml.sax.SAXException (msg: 
null)" 
It seems 

RE: XSLTInputHandler not doing its job??

2001-07-10 Thread James Telfer
Title: RE: XSLTInputHandler not doing its job??



erm 
- did you look at the source? When you view an XML doc in iexplore, it doesn't 
display the DTD. I had a quick peek at the DTD in the source and it looks ok. 
Try right-clicking and choosing "view source".

  -Original Message-From: Williamson, James 
  [mailto:[EMAIL PROTECTED]]Sent: Monday, July 09, 2001 
  10:28 PMTo: '[EMAIL PROTECTED]'Subject: RE: 
  XSLTInputHandler not doing its job??
  Gustavo, 
   
  The point I was trying to make is 
  that this isn't valid (in the xml file you 
  posted): 
   
    (View Source for full 
  doctype...)> 
   
  And the fact that 
  you're getting error messages with this in it might be the 
  problem?!
   
  And why are youd 
  eclaring the fo namespace twice in your xsl file?
   
  Regards, 
  
   
  James
  
-Original Message-From: Wolf Gustavo (SGC-EXT) 
[mailto:[EMAIL PROTECTED]]Sent: 06 July 2001 
10:04To: '[EMAIL PROTECTED]'Subject: RE: 
XSLTInputHandler not doing its job??
James,
   
I am sorry but I don't understand your answer. Do you mean that writing the 
word periodic in the !DOCTYPE is wrong? As far as I see in examples it is 
not (cf: www.xml101.com/dtd/dtd_intro.asp 
).
 
Anyway, as a line command Fop gives the same answer with or without 
the DTD within the XML file, so I still have that 
problem.
 
If 
I did not get the point at all, would you please mind explaining me 
again?
 
Thanks a lot,
 
Gustavo

  -Message d'origine-De : Williamson, James 
  [mailto:[EMAIL PROTECTED]]Envoyé : jeudi, 5. 
  juillet 2001 18:15À : 
  '[EMAIL PROTECTED]'Objet : RE: XSLTInputHandler not 
  doing its job??
  Wolf, 
  That's not valid XML, when it says view source for full 
  doctype it doesn't expect you to take that literally. DOCTYPE's generally take these form: 
   
  or 
   
  or (embedded) 
   
      your embedded 
  DTD ]> 
  I'm no FOP expert but I'm sure I remember being able to 
  configure FOP to tolerate XML (i.e. HTML) perhaps you could have a look at 
  the source code for the FOP app.
  Regards, 
  James 
  -Original Message- From: 
  Wolf Gustavo (SGC-EXT) [mailto:[EMAIL PROTECTED]] 
  Sent: 05 July 2001 16:50 To: Fop 
  (E-mail) Subject: XSLTInputHandler not doing its 
  job?? 
  Hi,   
  as I said a few hours ago, I have the following code: 
      InputHandler 
  inputHandler = new XSLTInputHandler(xmlInputSource,xslInputSource);     InputSource inputSource 
  = inputHandler.getInputSource();     XMLReader  parser = 
  (XMLReader) Class.forName(this.parserClass).newInstance();   parser.setFeature("http://xml.org/sax/features/namespace-prefixes",true); 
  /** * Creates the driver telling 
  it to write the output to a file. */ 
      Driver driver 
  = new Driver();     
  driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer"); 
  //  ERROR IN THE FOLLOWING LINE     
  driver.buildFOTree(parser, inputSource);     File test = new 
  File("test.pdf");     
  driver.setOutputStream(new java.io.FileOutputStream(test)); 
      
  driver.format();     driver.render(); 
  
  In the second line, InputSource inputSource is suppossed 
  to be the .fo file after the processing of 
  xmlInputSource by xslInputSource. 
  I am using as xmlInputSource and xslInputSource two files 
  that I took from the chap 15 of the XMLbible 
  (attached). 
  Now, when the program tries to execute 
  "driver.buildFOTree(parser, inputSource);", I get 
  the following msg and Exception: 
  "building formatting object tree  WARNING: Unknown formatting object ^PERIODIC_TABLE 
   FOPException: org.xml.sax.SAXException (msg: 
  null)" 
  It seems to me that XSLTInputHandler is not doing its job 
  properly, because of the WARNING. 
  Again, if I run a line command with Fop -xml xmlInputSource -xsl xslInputSource -pdf test.pdf 
  everything is OK, which tells me that there 
  shouldn't be a problem with the input 
  files. 
  Does anyone knows how to cure this? 
  Thanks a lot,     
  Gustavo 
   <>  
  <> **This 
  e-mail (including any documents which may accompany it) 
  containsinformation which is confidential and may also be 
  privileged.It is for the exclusive use of the intended 
  recipient(s).If you are not the intended recipient(s) please note that 
  any form ofdistrib

RE: XSLTInputHandler not doing its job??

2001-07-09 Thread Williamson, James
Title: RE: XSLTInputHandler not doing its job??



Gustavo, 
 
The point I was trying to make is that this isn't valid (in 
the xml file you posted): 
 
  (View Source for full 
doctype...)> 
 
And the fact that you're 
getting error messages with this in it might be the 
problem?!
 
And why are youd
 eclaring the fo namespace twice in your xsl file?
 
Regards, 

 
James

  -Original Message-From: Wolf Gustavo (SGC-EXT) 
  [mailto:[EMAIL PROTECTED]]Sent: 06 July 2001 
  10:04To: '[EMAIL PROTECTED]'Subject: RE: 
  XSLTInputHandler not doing its job??
  James,
     
  I am sorry but I don't understand your answer. Do you mean that writing the 
  word periodic in the !DOCTYPE is wrong? As far as I see in examples it is not 
  (cf: www.xml101.com/dtd/dtd_intro.asp 
  ).
   
  Anyway, as a line command Fop gives the same answer with or without the 
  DTD within the XML file, so I still have that problem.
   
  If I 
  did not get the point at all, would you please mind explaining me 
  again?
   
  Thanks a lot,
   
  Gustavo
  
-Message d'origine-De : Williamson, James 
[mailto:[EMAIL PROTECTED]]Envoyé : jeudi, 5. 
juillet 2001 18:15À : 
    '[EMAIL PROTECTED]'Objet : RE: XSLTInputHandler not 
doing its job??
Wolf, 
That's not valid XML, when it says view source for full 
doctype it doesn't expect you to take that literally. DOCTYPE's generally take these form: 
 
or 
 
or (embedded) 
 
    your embedded 
DTD ]> 
I'm no FOP expert but I'm sure I remember being able to 
configure FOP to tolerate XML (i.e. HTML) perhaps you could have a look at 
the source code for the FOP app.
Regards, 
James 
-Original Message- From: 
Wolf Gustavo (SGC-EXT) [mailto:[EMAIL PROTECTED]] 
Sent: 05 July 2001 16:50 To: Fop 
(E-mail) Subject: XSLTInputHandler not doing its 
job?? 
Hi,   
as I said a few hours ago, I have the following code: 
    InputHandler 
inputHandler = new XSLTInputHandler(xmlInputSource,xslInputSource);     InputSource inputSource = 
inputHandler.getInputSource();     XMLReader  parser = 
(XMLReader) Class.forName(this.parserClass).newInstance();   parser.setFeature("http://xml.org/sax/features/namespace-prefixes",true); 
/** * Creates the driver telling it 
to write the output to a file. */     Driver driver = new 
Driver();     
driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer"); 
//  ERROR IN THE FOLLOWING LINE     driver.buildFOTree(parser, 
inputSource);     File test = new
File("test.pdf");     driver.setOutputStream(new 
java.io.FileOutputStream(test));     driver.format(); 
    
driver.render(); 
In the second line, InputSource inputSource is suppossed to 
be the .fo file after the processing of 
xmlInputSource by xslInputSource. 
I am using as xmlInputSource and xslInputSource two files 
that I took from the chap 15 of the XMLbible
(attached). 
Now, when the program tries to execute 
"driver.buildFOTree(parser, inputSource);", I get 
the following msg and Exception: 
"building formatting object tree  WARNING: Unknown formatting object ^PERIODIC_TABLE 
 FOPException: org.xml.sax.SAXException (msg:
null)" 
It seems to me that XSLTInputHandler is not doing its job 
properly, because of the WARNING. 
Again, if I run a line command with Fop -xml xmlInputSource -xsl xslInputSource -pdf test.pdf 
everything is OK, which tells me that there
shouldn't be a problem with the input files. 

Does anyone knows how to cure this? 
Thanks a lot,     
Gustavo 
 <>  
<> **This 
e-mail (including any documents which may accompany it) 
containsinformation which is confidential and may also be 
privileged.It is for the exclusive use of the intended 
recipient(s).If you are not the intended recipient(s) please note that 
any form ofdistribution, copying or use of this e-mail or the 
information in itor attached to it is strictly prohibited and may be 
unlawful.If you have received this e-mail in error please notify us
immediatelyby e-mail to [EMAIL PROTECTED] or telephone +44 (0)207 940 
1200 anddelete the e-mail.Please advise immediately if you or your 
employer do not consent toInternet E-Mail for messages of this 
type.Information or opinions in this message that do not relate to
thebusiness of Windsor plc and/or subsidiary and/or associated 
companiesshall be treated as neither given or endorsed by 
it.

Re: XSLTInputHandler not doing its job??

2001-07-06 Thread Abdul Wahab

Hi Gustavo, Karen and All!

I am also using the same coding as how u code(below) to covert from XML to
PDF using XSL.
But I am getting "No Such MethodError" exception eventhough the method is
existed in class file.
Could u please help me to solve this problem.

java.lang.NoSuchMethodError
at
org.apache.xpath.DOM2Helper.getNamespaceOfNode(DOM2Helper.java:348)
at org.apache.xpath.patterns.NodeTest.execute(NodeTest.java:471)

Thanks,
Wahab.

- Original Message -
From: "Wolf Gustavo (SGC-EXT)" <[EMAIL PROTECTED]>
To: "Fop (E-mail)" <[EMAIL PROTECTED]>
Sent: Thursday, July 05, 2001 11:49 PM
Subject: XSLTInputHandler not doing its job??


> Hi,
>   as I said a few hours ago, I have the following code:
>
> InputHandler inputHandler = new
> XSLTInputHandler(xmlInputSource,xslInputSource);
> InputSource inputSource = inputHandler.getInputSource();
> XMLReader  parser = (XMLReader)
> Class.forName(this.parserClass).newInstance();
>
> parser.setFeature("http://xml.org/sax/features/namespace-prefixes",true);
> /**
> * Creates the driver telling it to write the output to a file.
> */
> Driver driver = new Driver();
> driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer");
> //  ERROR IN THE FOLLOWING LINE
> driver.buildFOTree(parser, inputSource);
> File test = new File("test.pdf");
> driver.setOutputStream(new java.io.FileOutputStream(test));
> driver.format();
> driver.render();
>
> In the second line, InputSource inputSource is suppossed to be the .fo
file
> after the processing of xmlInputSource by xslInputSource.
>
> I am using as xmlInputSource and xslInputSource two files that I took from
> the chap 15 of the XMLbible (attached).
>
> Now, when the program tries to execute "driver.buildFOTree(parser,
> inputSource);", I get the following msg and Exception:
>
> "building formatting object tree
>  WARNING: Unknown formatting object ^PERIODIC_TABLE
>  FOPException: org.xml.sax.SAXException (msg: null)"
>
> It seems to me that XSLTInputHandler is not doing its job properly,
because
> of the WARNING.
>
> Again, if I run a line command with
> Fop -xml xmlInputSource -xsl xslInputSource -pdf test.pdf
> everything is OK, which tells me that there shouldn't be a problem with
the
> input files.
>
> Does anyone knows how to cure this?
>
> Thanks a lot,
> Gustavo
>
>
>
>
>
>  <>  <>
>
>
>






> -
> 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: XSLTInputHandler not doing its job??

2001-07-06 Thread Wolf Gustavo (SGC-EXT)
Title: RE: XSLTInputHandler not doing its job??



James,
   
I am sorry but I don't understand your answer. Do you mean that writing the word 
periodic in the !DOCTYPE is wrong? As far as I see in examples it is not (cf: www.xml101.com/dtd/dtd_intro.asp 
).
 
Anyway, as a line command Fop gives the same answer with or without the 
DTD within the XML file, so I still have that problem.
 
If I 
did not get the point at all, would you please mind explaining me 
again?
 
Thanks 
a lot,
 
Gustavo

  -Message d'origine-De : Williamson, James 
  [mailto:[EMAIL PROTECTED]]Envoyé : jeudi, 5. 
  juillet 2001 18:15À : 
  '[EMAIL PROTECTED]'Objet : RE: XSLTInputHandler not doing 
  its job??
  Wolf, 
  That's not valid XML, when it says view source for full 
  doctype it doesn't expect you to take that literally. DOCTYPE's generally take these form: 
   
  or 
   
  or (embedded) 
   
      your embedded 
  DTD ]> 
  I'm no FOP expert but I'm sure I remember being able to 
  configure FOP to tolerate XML (i.e. HTML) perhaps you could have a look at the 
  source code for the FOP app.
  Regards, 
  James 
  -Original Message- From: Wolf 
  Gustavo (SGC-EXT) [mailto:[EMAIL PROTECTED]] 
  Sent: 05 July 2001 16:50 To: Fop 
  (E-mail) Subject: XSLTInputHandler not doing its 
  job?? 
  Hi,   as 
  I said a few hours ago, I have the following code: 
      InputHandler 
  inputHandler = new XSLTInputHandler(xmlInputSource,xslInputSource);     InputSource inputSource = 
  inputHandler.getInputSource();     XMLReader  parser = 
  (XMLReader) Class.forName(this.parserClass).newInstance();   parser.setFeature("http://xml.org/sax/features/namespace-prefixes",true); 
  /** * Creates the driver telling it 
  to write the output to a file. */     Driver driver = new 
  Driver();     
  driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer"); //  ERROR IN THE FOLLOWING LINE     driver.buildFOTree(parser, 
  inputSource);     File test = new 
  File("test.pdf");     driver.setOutputStream(new 
  java.io.FileOutputStream(test));     driver.format(); 
      
  driver.render(); 
  In the second line, InputSource inputSource is suppossed to be 
  the .fo file after the processing of xmlInputSource by 
  xslInputSource. 
  I am using as xmlInputSource and xslInputSource two files that 
  I took from the chap 15 of the XMLbible 
  (attached). 
  Now, when the program tries to execute 
  "driver.buildFOTree(parser, inputSource);", I get the 
  following msg and Exception: 
  "building formatting object tree  WARNING: Unknown formatting object ^PERIODIC_TABLE 
   FOPException: org.xml.sax.SAXException (msg: 
  null)" 
  It seems to me that XSLTInputHandler is not doing its job 
  properly, because of the WARNING. 
  Again, if I run a line command with Fop -xml xmlInputSource -xsl xslInputSource -pdf test.pdf 
  everything is OK, which tells me that there shouldn't 
  be a problem with the input files. 
  Does anyone knows how to cure this? 
  Thanks a lot,     
  Gustavo 
   <>  
  <> **This 
  e-mail (including any documents which may accompany it) 
  containsinformation which is confidential and may also be 
  privileged.It is for the exclusive use of the intended recipient(s).If 
  you are not the intended recipient(s) please note that any form 
  ofdistribution, copying or use of this e-mail or the information in 
  itor attached to it is strictly prohibited and may be unlawful.If you 
  have received this e-mail in error please notify us immediatelyby e-mail 
  to [EMAIL PROTECTED] or telephone +44 (0)207 940 1200 anddelete the 
  e-mail.Please advise immediately if you or your employer do not consent 
  toInternet E-Mail for messages of this type.Information or opinions in 
  this message that do not relate to thebusiness of Windsor plc and/or 
  subsidiary and/or associated companiesshall be treated as neither given or 
  endorsed by 
  it.**


Re:RE: XSLTInputHandler not doing its job??

2001-07-06 Thread Wolf Gustavo (SGC-EXT)

Hello Karen and the others,
   the truth is that I had initially tried to
use 
XMLReader parser = inputHandler.getParser();
at the beginning, and it gave me the following error:

javax.xml.transform.TransformerConfigurationException: Namespace not
supported by SAXParser.

Then Keiron Liddle suggested me to introduce the parser in a different
manner, which was what I used. It may have made the second problem appear
when I call the builFOTree:

WARNING: Unknown formatting object ^PERIODIC_TABLE
FOPException: org.xml.sax.SAXException (msg: null)"

since as you explained 

InputSource inputSource = inputHandler.getInputSource();

seems to be bringing back the original XML, and not as I thought the .fo
file.

So, back to square zero:

How can I solve the problem of  XMLReader parser = inputHandler.getParser();
??

I attach the xml and xsl files just in case.

Thanks a lot once more,
   Gustavo




-Message d'origine-
De : Karen Lease [mailto:[EMAIL PROTECTED]]
Envoye : jeudi, 5. juillet 2001 22:56
A : [EMAIL PROTECTED]
Objet : Re: XSLTInputHandler not doing its job??


Hi Gustavo,

I'm not 100% sure, but it looks to me as if you get the parser from the
inputHandler instead of using newInstance, it will work. That's what FOP
does when you pass it the xml and xsl in the command line.

InputHandler inputHandler = new
XSLTInputHandler(xmlInputSource,xslInputSource);
XMLReader parser = inputHandler.getParser();
InputSource inputSource = inputHandler.getInputSource();

Then pass that to the driver.

What is happening is that the inputSource you're getting back now is
just returning your original XML file. When you call getParser() on the
XSLTInputHandler, it's actually going to "parse" the FO file which
results from transforming your xml with the xsl.

Hope that helps,
Karen Lease


"Wolf Gustavo (SGC-EXT)" wrote:
> 
> Hi,
>   as I said a few hours ago, I have the following code:
> 
> InputHandler inputHandler = new
> XSLTInputHandler(xmlInputSource,xslInputSource);
> InputSource inputSource = inputHandler.getInputSource();
> XMLReader  parser = (XMLReader)
> Class.forName(this.parserClass).newInstance();
> 
> parser.setFeature("http://xml.org/sax/features/namespace-prefixes",true);
> /**
> * Creates the driver telling it to write the output to a file.
> */
> Driver driver = new Driver();
> driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer");
> //  ERROR IN THE FOLLOWING LINE
> driver.buildFOTree(parser, inputSource);
> File test = new File("test.pdf");
> driver.setOutputStream(new java.io.FileOutputStream(test));
> driver.format();
> driver.render();
> 
> In the second line, InputSource inputSource is suppossed to be the .fo
file
> after the processing of xmlInputSource by xslInputSource.
> 
> I am using as xmlInputSource and xslInputSource two files that I took from
> the chap 15 of the XMLbible (attached).
> 
> Now, when the program tries to execute "driver.buildFOTree(parser,
> inputSource);", I get the following msg and Exception:
> 
> "building formatting object tree
>  WARNING: Unknown formatting object ^PERIODIC_TABLE
>  FOPException: org.xml.sax.SAXException (msg: null)"
> 
> It seems to me that XSLTInputHandler is not doing its job properly,
because
> of the WARNING.
> 
> Again, if I run a line command with
> Fop -xml xmlInputSource -xsl xslInputSource -pdf test.pdf
> everything is OK, which tells me that there shouldn't be a problem with
the
> input files.
> 
> Does anyone knows how to cure this?
> 
> Thanks a lot,
> Gustavo
> 
>  <>  <>
> 
>   
>  Name: prueba.xml
>prueba.xmlType: unspecified type (application/octet-stream)
>  Encoding: quoted-printable
> 
>prueba.xslName: prueba.xsl
>  Type: unspecified type (application/octet-stream)
> 
>   
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


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



 prueba.xml
 prueba.xsl

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


Re: XSLTInputHandler not doing its job??

2001-07-05 Thread Karen Lease

Hi Gustavo,

I'm not 100% sure, but it looks to me as if you get the parser from the
inputHandler instead of using newInstance, it will work. That's what FOP
does when you pass it the xml and xsl in the command line.

InputHandler inputHandler = new
XSLTInputHandler(xmlInputSource,xslInputSource);
XMLReader parser = inputHandler.getParser();
InputSource inputSource = inputHandler.getInputSource();

Then pass that to the driver.

What is happening is that the inputSource you're getting back now is
just returning your original XML file. When you call getParser() on the
XSLTInputHandler, it's actually going to "parse" the FO file which
results from transforming your xml with the xsl.

Hope that helps,
Karen Lease


"Wolf Gustavo (SGC-EXT)" wrote:
> 
> Hi,
>   as I said a few hours ago, I have the following code:
> 
> InputHandler inputHandler = new
> XSLTInputHandler(xmlInputSource,xslInputSource);
> InputSource inputSource = inputHandler.getInputSource();
> XMLReader  parser = (XMLReader)
> Class.forName(this.parserClass).newInstance();
> 
> parser.setFeature("http://xml.org/sax/features/namespace-prefixes",true);
> /**
> * Creates the driver telling it to write the output to a file.
> */
> Driver driver = new Driver();
> driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer");
> //  ERROR IN THE FOLLOWING LINE
> driver.buildFOTree(parser, inputSource);
> File test = new File("test.pdf");
> driver.setOutputStream(new java.io.FileOutputStream(test));
> driver.format();
> driver.render();
> 
> In the second line, InputSource inputSource is suppossed to be the .fo file
> after the processing of xmlInputSource by xslInputSource.
> 
> I am using as xmlInputSource and xslInputSource two files that I took from
> the chap 15 of the XMLbible (attached).
> 
> Now, when the program tries to execute "driver.buildFOTree(parser,
> inputSource);", I get the following msg and Exception:
> 
> "building formatting object tree
>  WARNING: Unknown formatting object ^PERIODIC_TABLE
>  FOPException: org.xml.sax.SAXException (msg: null)"
> 
> It seems to me that XSLTInputHandler is not doing its job properly, because
> of the WARNING.
> 
> Again, if I run a line command with
> Fop -xml xmlInputSource -xsl xslInputSource -pdf test.pdf
> everything is OK, which tells me that there shouldn't be a problem with the
> input files.
> 
> Does anyone knows how to cure this?
> 
> Thanks a lot,
> Gustavo
> 
>  <>  <>
> 
>   
>  Name: prueba.xml
>prueba.xmlType: unspecified type (application/octet-stream)
>  Encoding: quoted-printable
> 
>prueba.xslName: prueba.xsl
>  Type: unspecified type (application/octet-stream)
> 
>   
> -
> 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: XSLTInputHandler not doing its job??

2001-07-05 Thread Williamson, James
Title: RE: XSLTInputHandler not doing its job??



Typo, 
I think FOP can be configured to tolerate *sloppy* XML.

  -Original Message-From: Williamson, James 
  [mailto:[EMAIL PROTECTED]]Sent: 05 July 2001 
  17:15To: '[EMAIL PROTECTED]'Subject: RE: 
  XSLTInputHandler not doing its job??
  Wolf, 
  That's not valid XML, when it says view source for full 
  doctype it doesn't expect you to take that literally. DOCTYPE's generally take these form: 
   
  or 
   
  or (embedded) 
   
      your embedded 
  DTD ]> 
  I'm no FOP expert but I'm sure I remember being able to 
  configure FOP to tolerate XML (i.e. HTML) perhaps you could have a look at the 
  source code for the FOP app.
  Regards, 
  James 
  -Original Message- From: Wolf 
  Gustavo (SGC-EXT) [mailto:[EMAIL PROTECTED]] 
  Sent: 05 July 2001 16:50 To: Fop 
  (E-mail) Subject: XSLTInputHandler not doing its 
  job?? 
  Hi,   as 
  I said a few hours ago, I have the following code: 
      InputHandler 
  inputHandler = new XSLTInputHandler(xmlInputSource,xslInputSource);     InputSource inputSource = 
  inputHandler.getInputSource();     XMLReader  parser = 
  (XMLReader) Class.forName(this.parserClass).newInstance();   parser.setFeature("http://xml.org/sax/features/namespace-prefixes",true); 
  /** * Creates the driver telling it 
  to write the output to a file. */     Driver driver = new 
  Driver();     
  driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer"); //  ERROR IN THE FOLLOWING LINE     driver.buildFOTree(parser, 
  inputSource);     File test = new 
  File("test.pdf");     driver.setOutputStream(new 
  java.io.FileOutputStream(test));     driver.format(); 
      
  driver.render(); 
  In the second line, InputSource inputSource is suppossed to be 
  the .fo file after the processing of xmlInputSource by 
  xslInputSource. 
  I am using as xmlInputSource and xslInputSource two files that 
  I took from the chap 15 of the XMLbible 
  (attached). 
  Now, when the program tries to execute 
  "driver.buildFOTree(parser, inputSource);", I get the 
  following msg and Exception: 
  "building formatting object tree  WARNING: Unknown formatting object ^PERIODIC_TABLE 
   FOPException: org.xml.sax.SAXException (msg: 
  null)" 
  It seems to me that XSLTInputHandler is not doing its job 
  properly, because of the WARNING. 
  Again, if I run a line command with Fop -xml xmlInputSource -xsl xslInputSource -pdf test.pdf 
  everything is OK, which tells me that there shouldn't 
  be a problem with the input files. 
  Does anyone knows how to cure this? 
  Thanks a lot,     
  Gustavo 
   <>  
  <> **This 
  e-mail (including any documents which may accompany it) 
  containsinformation which is confidential and may also be 
  privileged.It is for the exclusive use of the intended recipient(s).If 
  you are not the intended recipient(s) please note that any form 
  ofdistribution, copying or use of this e-mail or the information in 
  itor attached to it is strictly prohibited and may be unlawful.If you 
  have received this e-mail in error please notify us immediatelyby e-mail 
  to [EMAIL PROTECTED] or telephone +44 (0)207 940 1200 anddelete the 
  e-mail.Please advise immediately if you or your employer do not consent 
  toInternet E-Mail for messages of this type.Information or opinions in 
  this message that do not relate to thebusiness of Windsor plc and/or 
  subsidiary and/or associated companiesshall be treated as neither given or 
  endorsed by 
  it.**

**
This e-mail (including any documents which may accompany it) contains
information which is confidential and may also be privileged.
It is for the exclusive use of the intended recipient(s).
If you are not the intended recipient(s) please note that any form of
distribution, copying or use of this e-mail or the information in it
or attached to it is strictly prohibited and may be unlawful.
If you have received this e-mail in error please notify us immediately
by e-mail to [EMAIL PROTECTED] or telephone +44 (0)207 940 1200 and
delete the e-mail.
Please advise immediately if you or your employer do not consent to
Internet E-Mail for messages of this type.
Information or opinions in this message that do not relate to the
business of Windsor plc and/or subsidiary and/or associated companies
shall be treated as neither given or endorsed by it.
**



RE: XSLTInputHandler not doing its job??

2001-07-05 Thread Williamson, James
Title: RE: XSLTInputHandler not doing its job??





Wolf, 


That's not valid XML, when it says view source for full doctype it doesn't expect you to take that literally.
DOCTYPE's generally take these form:





or 





or (embedded)



    your embedded DTD
]>


I'm no FOP expert but I'm sure I remember being able to configure FOP to tolerate XML (i.e. HTML) perhaps you could have a look at the source code for the FOP app.

Regards, 


James



-Original Message-
From: Wolf Gustavo (SGC-EXT) [mailto:[EMAIL PROTECTED]]
Sent: 05 July 2001 16:50
To: Fop (E-mail)
Subject: XSLTInputHandler not doing its job??



Hi,
  as I said a few hours ago, I have the following code:


    InputHandler inputHandler = new
XSLTInputHandler(xmlInputSource,xslInputSource);
    InputSource inputSource = inputHandler.getInputSource();
    XMLReader  parser = (XMLReader)
Class.forName(this.parserClass).newInstance();
 
parser.setFeature("http://xml.org/sax/features/namespace-prefixes",true);
/**
* Creates the driver telling it to write the output to a file.
*/
    Driver driver = new Driver();
    driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer");
//  ERROR IN THE FOLLOWING LINE
    driver.buildFOTree(parser, inputSource);
    File test = new File("test.pdf");
    driver.setOutputStream(new java.io.FileOutputStream(test));
    driver.format();
    driver.render();


In the second line, InputSource inputSource is suppossed to be the .fo file
after the processing of xmlInputSource by xslInputSource.


I am using as xmlInputSource and xslInputSource two files that I took from
the chap 15 of the XMLbible (attached).


Now, when the program tries to execute "driver.buildFOTree(parser,
inputSource);", I get the following msg and Exception:


"building formatting object tree
 WARNING: Unknown formatting object ^PERIODIC_TABLE
 FOPException: org.xml.sax.SAXException (msg: null)"


It seems to me that XSLTInputHandler is not doing its job properly, because
of the WARNING.


Again, if I run a line command with 
Fop -xml xmlInputSource -xsl xslInputSource -pdf test.pdf 
everything is OK, which tells me that there shouldn't be a problem with the
input files.


Does anyone knows how to cure this? 


Thanks a lot,
    Gustavo






 <>  <> 





**
This e-mail (including any documents which may accompany it) contains
information which is confidential and may also be privileged.
It is for the exclusive use of the intended recipient(s).
If you are not the intended recipient(s) please note that any form of
distribution, copying or use of this e-mail or the information in it
or attached to it is strictly prohibited and may be unlawful.
If you have received this e-mail in error please notify us immediately
by e-mail to [EMAIL PROTECTED] or telephone +44 (0)207 940 1200 and
delete the e-mail.
Please advise immediately if you or your employer do not consent to
Internet E-Mail for messages of this type.
Information or opinions in this message that do not relate to the
business of Windsor plc and/or subsidiary and/or associated companies
shall be treated as neither given or endorsed by it.
**



XSLTInputHandler not doing its job??

2001-07-05 Thread Wolf Gustavo (SGC-EXT)

Hi,
  as I said a few hours ago, I have the following code:

InputHandler inputHandler = new
XSLTInputHandler(xmlInputSource,xslInputSource);
InputSource inputSource = inputHandler.getInputSource();
XMLReader  parser = (XMLReader)
Class.forName(this.parserClass).newInstance();
 
parser.setFeature("http://xml.org/sax/features/namespace-prefixes",true);
/**
* Creates the driver telling it to write the output to a file.
*/
Driver driver = new Driver();
driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer");
//  ERROR IN THE FOLLOWING LINE
driver.buildFOTree(parser, inputSource);
File test = new File("test.pdf");
driver.setOutputStream(new java.io.FileOutputStream(test));
driver.format();
driver.render();

In the second line, InputSource inputSource is suppossed to be the .fo file
after the processing of xmlInputSource by xslInputSource.

I am using as xmlInputSource and xslInputSource two files that I took from
the chap 15 of the XMLbible (attached).

Now, when the program tries to execute "driver.buildFOTree(parser,
inputSource);", I get the following msg and Exception:

"building formatting object tree
 WARNING: Unknown formatting object ^PERIODIC_TABLE
 FOPException: org.xml.sax.SAXException (msg: null)"

It seems to me that XSLTInputHandler is not doing its job properly, because
of the WARNING.

Again, if I run a line command with 
Fop -xml xmlInputSource -xsl xslInputSource -pdf test.pdf 
everything is OK, which tells me that there shouldn't be a problem with the
input files.

Does anyone knows how to cure this? 

Thanks a lot,
Gustavo





 <>  <> 



 prueba.xml
 prueba.xsl

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