Subject:How to apply style to tags Author:Marco Wayop Date:19 Apr 2007 05:35 AM Originally Posted: 19 Apr 2007 05:34 AM
Hi Ivan,
Thanks for replying,
> Do you have any control on the input XML?
Yes, but I use JDOM and it doesn't handle mixed content like <text>this <bold>word</bold> ...</text> in a convenient way.
I hoped there was a convenient XSLT method to accomplish this.
There should be ways of creating XML nodes dynamically?
Subject:How to apply style to tags Author:(Deleted User) Date:23 Apr 2007 12:44 PM
Hi Marco,
trying to manipulate that string from within XSLT is going to be hard (even if XSLT 2.0 has some string processing built-in functions); it would be better if you generated a standard XML file, maybe replacing JDOM with another DOM-based technology that suits better your data structure.
Subject:How to apply style to tags Author:Marco Wayop Date:24 Apr 2007 03:57 AM
Hi Alberto,
Thanks for your answer.
Dynamicaly generating the XML nodes seemed a little discursive.
Fortunately I managed to find a temporary work around in JDOM.
I now just simply:
- write the document to a string
- replace the <style> </style> tags (only when they are in balance)
- reparse the document to contain mixed content.
It takes a little more cpu power and I will certainly try to find a better solution when I have some time.