Re: [xsl] [saxon - Help] SystemID always empty String

Subject: Re: [xsl] [saxon - Help] SystemID always empty String
From: Johannes Neubauer <johannes.neubauer@xxxxxxxxxxxxxxxxx>
Date: Mon, 18 Feb 2008 23:36:30 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi again,

Florent Georges schrieb:
|     // 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();
|

You're right that's a lot better. I was used to know that, but ...
BUT the old problem is back. I used it the way you mentioned ( I've read
the part in a book before implementing) and there's no systemId again:

[code]
// My original source
Source source = new SAXSource(reader, sysId);
// My stylesheet transforming original source to a stylesheet
Transformer trans = templates.newTransformer();
// the ContentHandler
TransformerHandler compiler = saxFactory.newTransformerHandler();
// Set id for compiler!!!
compiler.setId(someId);
Result result = new SAXResult(compiler);
trans.transform(source, result);
// My resulting stylesheet
Templates style = compiler.getTemplates();
[/code]

Although I set an Id for the TransformerHandler 'compiler' my error
message (ErrorListener#fatalError), evoked when the "real" stylesheet is
compiled does not return an Id. With my Output- and InputStreams that
worked at all, but I would really appreciate, not to use that dirty way
again.

Any Idea what I did wrong?

wfg,
Jonny.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHughuGaEJacf6i/cRAknfAJ9tUSCEPwPTzyKH5qZPubeBO/l2awCffLOA
Lvu2UjC1okR6mNHYLKZunkI=
=CBnb
-----END PGP SIGNATURE-----

Current Thread