Page 1 of 1

html embedded in xml solution!? output to xsl-fo

Posted: Wed Nov 08, 2006 11:12 am
by xml_love_child_2007
so i have this bit of xml

<people>
<females> <h3>Jane<p>Clare</p> Mirna </h3> </females>
</people


and I want to extract the text and apply templates to the "h3" and "p" tags, that is i would like to replace the h3 tags with <fo:inline> elements and p with <fo:block>

Now I know that there is a saxon:parse() function but that will only work with well formed xml documents. I need to be able to generate a result tree frag or a nodeset?

Not sure about all of this, if anyone knows a goog tut then I would be very grateful, I must say that this forum is way more tech savy than stylus studio nobs

Posted: Wed Nov 08, 2006 2:25 pm
by xml_love_child_2007
i figured out this basic example

now does anyone know how to make sure that the xml is well formed?

I have a complex piece of html the is embedded in the xml and when i try to apply the transformation scenario, it falls over and says that the document is not well formed,

fix one problem create 2 more doh!

any ideas!?

Posted: Thu Nov 09, 2006 12:48 am
by george
Hi,

If a document is not wellformed then it is actually not XML. You need to make sure you place XML content in the element whose text content you enter in the parse function otherwise you will get an error as you described.

One way to check manually that the content is wellformed is to use select the escaped value and use the Source->Unescape selection action from the oXygen contextual menu (right click on Windows, CTRL+Click on Mac), then perform a wellformed check in oXygen.

Best Regards,
George