[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

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 13:28:50 +0100

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael Kay schrieb:
| You need to
| ensure that setSystemId() has been called on the Source representing the
| stylesheet file.

That saved the day ;). Thanks! To Florent Georges, too! It was my fault.
I had a transformation pipe like this:

[code]
InputSource isource = new InputSource(href); //<-- the system id
Source source = new SAXSource(anXMLReader, isource);
ByteArrayOutputStream out = new ByteArrayOutputStream();
Result result = new StreamResult(out);
Transformer transform = firstTemplates.newTransformer();
transform.transform(source, result);
source = new StreamSource(new ByteArrayInputStream(out.toByteArray()));
//<-- Here I forgot source.setSystemID()
Templates secondTemplates = saxFactory.newTemplates(source); //<-- here
// the errors occured and of course I had no system id.
// ...
[/code]

By the way: Is that the "preferable" way of piping a transformation
(Using ByteArryOut- and -InputStreams)?

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

iD8DBQFHuXoCGaEJacf6i/cRAk65AJ0bTGWdG66CXgX8Bzk1xv9hskNROwCeODyc
zNkw/TmiFIcc96+WsVba5Lc=
=oJ03
-----END PGP SIGNATURE-----


Current Thread