View Single Post
  #4 (permalink)  
Old September 26th, 2012, 03:43 PM
mhkay's Avatar
mhkay mhkay is offline
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

It's a while since I did this, but I think you're trying to set up a pipe with four components:

reader -> pipeline -> filter -> serialiser

but then you do this

Code:
        pipeline.setContentHandler(serialiser) ;
	pipeline.parse(source.getSystemId()) ;
which means the pipeline talks directly to the serializer without going via the filter. I think both these two methods should be applied to the filter rather than the pipeline.

But I'm also confused because you're doing this

Code:
Source styleSource = factory.getAssociatedStylesheet(source, null, format, null) ;
and this stylesheet is never used in the pipeline (the filter is using some other stylesheet). Are you applying the XSLT that you think you are?
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
The Following User Says Thank You to mhkay For This Useful Post:
WilliamYou (September 27th, 2012)