RE: JAXP question

2004-02-15 Thread Andreas L. Delmelle
 -Original Message-
 From: Glen Mazza [mailto:[EMAIL PROTECTED]

 I tried a little bit more, but was unsuccessful.  XMLFilter +
 setParameter()
 unfortunately isn't currently available with JAXP, and I suspect the
 just-use-a-transformer alternative proposed by Michael Kay here:
 http://www.xslt.com/xsl-list/2002-08/msg00312.html will slow
 things down for
 non-parameter using people.  (I'm also not sure if your suggestion would
 work, as the getContentHandler() is set later, in apps.Driver.)


Well, I wouldn't stare myself too blind on it for the moment... Could well
be that my suggestion won't work --as it was more based on vague ideas than
on actual experiments (maybe should've tried out first, sorry for that)

 I modified the JAXP example to show the setting of a parameter,
 so FOP users
 will be OK for embedded usage, at least.


Getting this right *was* the more important of the two IMHO. When using
XML/XSLT input via the command-line, one can indeed easily break up the
transformation, supply the params to the XSL processor in question, and run
the resulting FO through FOP.

Thanks for the effort!


Cheers,

Andreas



Re: JAXP question

2004-02-14 Thread Glen Mazza
  -Original Message-
  From: Glen Mazza [mailto:[EMAIL PROTECTED]
 
  --- Andreas L. Delmelle [EMAIL PROTECTED]
  wrote:
  
   AFAICT SAXTransformerFactory has its own
   getTransformerHandler() method.
   Maybe you can use this to set up a Handler, then
   manipulate the related
   Transformer ( setParams() ) through
   TransformerHandler.getTransformer().
   After that, you can pass the TransformerHandler as
   ContentHandler to an
   XMLReader/Filter.
  
 
  Thanks--that may work--I'll look into this.
 

 Re-reading that, I had a specific piece of code before me on which I based
 the analogy, and for which I forgot to add the link:
 http://xml.apache.org/xalan-j/usagepatterns.html#sax

 If it can be of help...

 Cheers,

 Andreas

I tried a little bit more, but was unsuccessful.  XMLFilter + setParameter()
unfortunately isn't currently available with JAXP, and I suspect the
just-use-a-transformer alternative proposed by Michael Kay here:
http://www.xslt.com/xsl-list/2002-08/msg00312.html will slow things down for
non-parameter using people.  (I'm also not sure if your suggestion would
work, as the getContentHandler() is set later, in apps.Driver.)

I modified the JAXP example to show the setting of a parameter, so FOP users
will be OK for embedded usage, at least.

Glen



RE: JAXP question

2004-02-11 Thread Andreas L. Delmelle
 -Original Message-
 From: Glen Mazza [mailto:[EMAIL PROTECTED]


Hi Glen,

 Also, big issue--I'm trying to implement command-line
 XSLT param handling.  Most of the code came from
 Xalan--quite simple to add.  The only problem is that
 I'm unsure how to configure the XMLFilter (line
 175-176 below) with the xslt parameters.


Glad to see this is being addressed, the community's going to love this one,
I'm sure.

 If I had a Transformer or TransformerHandler object,
 it would be simple setParameter() calls.  But such
 methods don't exist with XMLFilter or XMLReader.
 Anyone have an idea what to do?  The code in question
 is at line 175-188 in the link below.


AFAICT SAXTransformerFactory has its own getTransformerHandler() method.
Maybe you can use this to set up a Handler, then manipulate the related
Transformer ( setParams() ) through TransformerHandler.getTransformer().
After that, you can pass the TransformerHandler as ContentHandler to an
XMLReader/Filter.


Cheers,

Andreas



RE: JAXP question

2004-02-11 Thread Glen Mazza
--- Andreas L. Delmelle [EMAIL PROTECTED]
wrote:
 
 AFAICT SAXTransformerFactory has its own
 getTransformerHandler() method.
 Maybe you can use this to set up a Handler, then
 manipulate the related
 Transformer ( setParams() ) through
 TransformerHandler.getTransformer().
 After that, you can pass the TransformerHandler as
 ContentHandler to an
 XMLReader/Filter.
 

Thanks--that may work--I'll look into this.  

Glen



RE: JAXP question

2004-02-11 Thread Andreas L. Delmelle
 -Original Message-
 From: Glen Mazza [mailto:[EMAIL PROTECTED]

 --- Andreas L. Delmelle [EMAIL PROTECTED]
 wrote:
 
  AFAICT SAXTransformerFactory has its own
  getTransformerHandler() method.
  Maybe you can use this to set up a Handler, then
  manipulate the related
  Transformer ( setParams() ) through
  TransformerHandler.getTransformer().
  After that, you can pass the TransformerHandler as
  ContentHandler to an
  XMLReader/Filter.
 

 Thanks--that may work--I'll look into this.


Re-reading that, I had a specific piece of code before me on which I based
the analogy, and for which I forgot to add the link:
http://xml.apache.org/xalan-j/usagepatterns.html#sax

If it can be of help...

Cheers,

Andreas