Hi all,
I'm working on some tests for issue 377
(http://restlet.tigris.org/issues/show_bug.cgi?id=377)
During that work I'm encountering some side-wise stuff that I hope some
of you might have an answer/opinion on:
(or can refer me to docs or known issues)
*1* TransformRepresentation doesn't seem to have a way to inject xslt
parameters. Am I missing it? Is there someone having a patch or opinion
on how to do it? (ideas welcomed both on implementation and usage level)
*2* Sax-readyness:
- TransformRepresentation should be able to send output to sax.
- Equally it should be ready to get xml and xsl input from sax
- And finally the provided context-resolver should be (configurable?)
providing SAXSources rather then the current StreamSources
*3* bogus write() to Writer:
- Just had my test write the output of the transform to a write to
get an IOException.
Chain of events at the cause:
1. TransformRepresentation
extends OutputRepresentation
extends StreamRepresentation
2. StreamRepresentation#write(Writer) looks like this:
@Override
public void write(Writer writer) throws IOException {
write(ByteUtils.getStream(writer));
}
3. while ByteUtils#getStream(Writer) does less then it's javadoc is
promising:
public static OutputStream getStream(Writer writer) throws
IOException {
return null;
}
regards,
-marc=