> You can do this by compiling the stylesheet and querying that information.
> The only caveat is that if there is no output method specified in the
> stylesheet, and the initial element generated is "html", the
> processor will
> use the html method, rather than the xml method.  So, perhaps we
> can do the
> same enhancement for the output method.
>
Ah, missed that, thanks! Since I compile the stylesheets anyway, then I've
got enough information from them now to be right most of the time, with the
exception of:

1. When no output method specified, the method depends on the initial output
element
2. If an invalid/unsupported output encoding is specified then UTF-8 is used

So to be absolutely right, you still need to have a
getLastOutputEncoding()/Method(), because this information is only really
available after the transformation has taken place.

The information from the stylesheet is good enough for me, unless you think
this has enough general utility -- if so, I'll have a go at implementing it.

Thanks,

Mark

Reply via email to