|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: [saxon - Help] SystemID always empty String
Johannes Neubauer wrote:
Hi
> source = new StreamSource(new
ByteArrayInputStream(out.toByteArray()));
> Templates secondTemplates = saxFactory.newTemplates(source);
So if I am right, you are generating a stylesheet in the first
transform, and you want to compile this generated stylesheet. In
general, passing by byte buffers is not a good idea. It involves
serializing and deserializing for nothing. Usually piping SAX events
is better.
JAXP has TemplatesHandler that compiles SAX events representing a
stylesheet. From the top of my head, the idea is as following:
// you need a SAX factory
SAXTransformerFactory factory = ...;
// this is a ContentHandler
TemplatesHandler compiler = factory.newTemplatesHandler();
// the transform
Transformer trans = ...;
trans.transform(..., new SAXResult(compiler));
// get the compiled stylesheet generated by the transform
Templates generated = compiler.getTemplates();
Regards,
--drkm
_____________________________________________________________________________
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail http://mail.yahoo.fr
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

![Re: [saxon - Help] SystemID always empty String](/images/get_stylus.gif)




