Jerome -- thanks for the info and the exposing of some of those properties.

I've been away from my computer for a couple of days, and I didn't get a chance to post that I did some more testing and I do get the same result straight from the transformer (using that same engine). So I ended up switching this code to be templated via velocity instead of xsl.

One comment following that -- I couldn't use the built-in velocity transform either, since it seems to require its template to be in a file, and we're pulling ours from a database. So I just did the transform myself and then delivered the output with a StringRepresentation.

Thanks,

dwh


Jerome Louvel wrote:
Hi Denis,

The TransformRepresentation relies on the JDK's bundled XSLT engine, based
on javax.xml.transform API.

There are some properties that can be set of the created Transformer that
you might want to tweak, so I've added a public "getTransformer" method on
the TransformRepresentation class. Change in SVN already.

You might also want to check that you have an <xslt:output> element in your
stylesheet, mentionning "text" as the output format.
http://www.w3.org/TR/xslt#output

Best regards,
Jerome
-----Message d'origine-----
De : Denis Haskin [mailto:[EMAIL PROTECTED] Envoyé : lundi 19 février 2007 03:50
À : [email protected]
Objet : whitespace in TransformRepresentation text output

I have a Resource which is returning a TransformRepresentation; it works fine when the output is HTML.

However, I need to also be able to return text, for which I use an alternate stylesheet. The text is fine except I am unable to use <xsl:text> to get just a newline in certain places, which I need. The stylesheet works as expected in other contexts, but not via restlet. Any thoughts? Any way I can get to the underlying xsl engine being used for the transform?

Thanks,

dwh

Reply via email to