In my DOM (Document) object, I have an element called bodyHeader1 and its value is <b><i>Overview</i></b>. In my XSL, I am formatting HTML tags into FO thru <xsl:apply-templates select="bodyHeader1" />
For example If the node is b, then call b matching template as below.
But what is happening is transformer transforms these angle brackets (<,>) into (< >) which leads to not matching the respective template and apply formatting objects. I came to know this is happening by producing FO file.
I have used HTML to Formatting Objects (FO) conversion guide
How would I accomplish matching the respective template and apply formatting objects?
ramkumar rengarajan wrote:In my DOM (Document) object, I have an element called bodyHeader1 and its value is <b><i>Overview</i></b>.
But what is happening is transformer transforms these angle brackets (<,>) into (< >)...
I'm not sure what you mean by "its value is...". Elements don't have values in XML. But a lot of people seem to use that terminology to mean "It has a single text node as a child and the value of that text node is..."
If that's what you mean, then the transformer is not converting those angle brackets to XML escapes. They were that way already before the parser got them. Either that, or they were in a CDATA section.
If you want that string to be treated as XML markup, then you should put it in the document as markup. If you put it in the document as text (which is what you might be saying) then the parser and transformer will treat it as text. The only way to make it look like markup is to use the disable-output-escaping attribute which occurs on some of the XSLT elements, but even that just writes it to the output as markup instead of escaping it as text. You still can't deal with it inside your XSLT as markup.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com