| Subject: Re: [xsl] Identify transform with disabled output escaping From: Peter Szinek <peter@xxxxxxxxxxxxxxxx> Date: Wed, 15 Nov 2006 20:24:32 +0100 | 
Hello Michael,
> You must be doing something very strange to get that. But without seeing
what you're doing, I'm guessing.
OK, instead of showing you what I am doing, I will tell you what would I
like to do:
I have an org.w3c.dom.Node, and I would like to serialize it to a
String. To achieve this, I have been using this code:
void writeDOMToSourceNode(Node n, StreamResult sr)
{
    TransformerFactory trf = TransformerFactory.newInstance();
    Transformer tr = trf.newTransformer();
    tr.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
    tr.transform(new DOMSource(n), sr);
    //exception handling and turning the sr into a String omitted
}
i.e. transform the Node with an empty stylesheet. Now this code gives me
the strange stuff with all the >s et al.
So my next try was to actually use a stylesheet - an identity stylesheet
with DOE 'on'. However I bumped into the problem that it is not so
trivial to 'turn on' DOE and that was the time when I have sent my first
mail to the ML.
However, after your reply I am wondering if the problem could be
elsewhere - the weird result was copied from the GUI, so maybe there is
an extra escaping step before the string get's written to the GUI? I
have to check.
Thanks for your replies,
Peter
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| RE: [xsl] Identify transform with d, Michael Kay | Thread | RE: [xsl] Identify transform with d, Michael Kay | 
| [xsl] Creating newspaper columns wi, Jacqueline Radebaugh | Date | Re: [xsl] Creating newspaper column, Jost Klopfstein | 
| Month |