Re: [xsl] Problem with embeded XHTML in an XML file and transformation to XSL:FO

Subject: Re: [xsl] Problem with embeded XHTML in an XML file and transformation to XSL:FO
From: "andrew welch" <andrew.j.welch@xxxxxxxxx>
Date: Sat, 12 Aug 2006 18:53:17 +0100
I understand the logic, just a practical question.
I wrote the application with the javax.xml.transform. Is there a similar
function as saxon:parse() which I can use with my excising code or and
easy way to sue it without having to rewrite and retest the whole
application?

Once you use a Saxon specific extension you won't be able to substitute in a different JAXP compliant processor - if thats important to you then don't use the processor specific extension.

I'm not sure why you would need to "rewrite" or retest the whole
application just for using an extension in your stylesheet... (plus
you should have written your tests first :)


An other small side problem is that the transformation crashes with a
variable in the apply-templates (??). I tried as I hoped that that would
do the job, but it crashes.

This is almost certainly because of an endless loop - applying templates to the variable will apply your root matching template, which in turn calls apply-templates on the variable... the way around this is to use a mode or select the root element explicitly:

<xsl:apply-templates select="$htmlContent/html"/>

If you still have an issue create small sample files highlighting the
problem to allow us to cut and paste the xml and xslt to recreate the
results your getting.

cheers
andrew

Current Thread