[[ the mailing list doesn't support attachment, I open a new feature request to upload the file ]]
--- copy of the email sent to the list ---
I did some tests with highlighting Saxon's output in a
JTextPane. You can see in attachment a complete application
that does the job from a transform done by Saxon.
Just copy the files in a package "styled" in any project
in NB (I have a special project "Drafts" for this purpose).
The project must be linked to the libraries "Saxon8902B" and
"CommonsLang". The commons-lang JAR from Apache can be
Then just run the class ColouredJAXPResult (S-F6 or
There is a little bug: when the total length of the
attributes of an element is too long, Saxon outputs them on
several lines. This is no longer the case here. I don't
know if I'm doing something wrong or if it is Saxon (but the
simple example I've just sent to the Saxon ML suggests this
would be Saxon...)
There are a few comments in the source files. Please do
ask me if your have any question.
What do you think? Do you agree on the principle? If you
do, I will begin to think about the way to integrate it into
Kernow. IMHO the harder part will be to tell the
SerializerFactory when to output to the text pane, and when
to just let Saxon output to a file or whatever. I have some
ideas, but I need to check the lifecycle of the objects