xsl-list
[Top] [All Lists]

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

2008-02-18 05:29:26
-----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-----

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>