XSLT pipeline and XSL usage

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

XSLT pipeline and XSL usage

cmarchand

 

 

Hello,

 

I've constructed a XSLT pipeline :

transformer1.setDestination(transformer2);

transformer2.setDestination(transformer3);

...

transformerN.setDestination(serializer);

 

As I have a lot of XSL, so I would like to log the progress :

[INFO] in transformer1

[INFO] in transformer2

[INFO] in transformer...

[INFO] in transformerN

 

Which listener should I use to produce such a log ?

 

Thanks in advance,

Christophe


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: XSLT pipeline and XSL usage

Michael Kay
You mean, you just want to log when each transformation starts?

Note that the API is designed with streaming in mind, the idea being that the output of one transformation can be streamed into the next, so the transformations are all active at once. Possibly even in different threads.

But the current implementation is rather simpler, typically the first transformation creates a result tree in memory and the second only starts when this is finished.

Tracing and debugging of pipelines can be complex, and people building pipeline processors such as Calabash or Orbeon have probably put a lot more effort into this than we have for these simple Java-based pipelines.

Meanwhile I would think your best bet for this is to use xsl:message within the stylesheets themselves.

Michael Kay
Saxonica


On 30 Jun 2015, at 10:20, [hidden email] wrote:

 
 

Hello,

 

I've constructed a XSLT pipeline :

transformer1.setDestination(transformer2);

transformer2.setDestination(transformer3);

...

transformerN.setDestination(serializer);

 

As I have a lot of XSL, so I would like to log the progress :

[INFO] in transformer1

[INFO] in transformer2

[INFO] in transformer...

[INFO] in transformerN

 

Which listener should I use to produce such a log ?

 

Thanks in advance,

Christophe

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: XSLT pipeline and XSL usage

cmarchand

 

 

Ok, thanks. I'm gonna try this, with a special MessageListener to isolate the "trace" messages.

May I share the same MessageListener instance through all the transformers ?

 

Thanks again, Michael,

Christophe

Le 2015-06-30 13:26, Michael Kay a écrit :

You mean, you just want to log when each transformation starts?
 
Note that the API is designed with streaming in mind, the idea being that the output of one transformation can be streamed into the next, so the transformations are all active at once. Possibly even in different threads.
 
But the current implementation is rather simpler, typically the first transformation creates a result tree in memory and the second only starts when this is finished.
 
Tracing and debugging of pipelines can be complex, and people building pipeline processors such as Calabash or Orbeon have probably put a lot more effort into this than we have for these simple Java-based pipelines.
 
Meanwhile I would think your best bet for this is to use xsl:message within the stylesheets themselves.
 
Michael Kay
Saxonica
 

On 30 Jun 2015, at 10:20, [hidden email] wrote:
 
 

Hello,

 

I've constructed a XSLT pipeline :

transformer1.setDestination(transformer2);

transformer2.setDestination(transformer3);

...

transformerN.setDestination(serializer);

 

As I have a lot of XSL, so I would like to log the progress :

[INFO] in transformer1

[INFO] in transformer2

[INFO] in transformer...

[INFO] in transformerN

 

Which listener should I use to produce such a log ?

 

Thanks in advance,

Christophe

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/

_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: XSLT pipeline and XSL usage

Michael Kay

Ok, thanks. I'm gonna try this, with a special MessageListener to isolate the "trace" messages.

May I share the same MessageListener instance through all the transformers ?



You can, but you may find it’s better if you don’t. If you use different MessageListeners, that makes it easy, for example, to flag which transformation each message comes from. (They can of course be different instances of the same class, differing only in some label/name.)

Michael Kay
Saxonica


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help