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: Luuk Jansen <subscribe@xxxxxxxxxxxxxxxxx>
Date: Sat, 12 Aug 2006 20:00:21 +0100
Thanks Andrew that works now!

When I said "test the application again" I meant that I never trust a
change in components to behave exactly the same, but it seems fine so
far except a few errors concerning version.

The system runs though the XML files as it did before, but I get the
following error:

Error on line 12 column 110 of file:///home/Luuk/workspace/ATFM%
20Solutions/:
  SXXP0003: Error reported by XML parser: The prefix "o" for element
"o:p" is not bound.
___

This is caused by the <xsl:variable name="htmlContent"
select="saxon:parse(.)"/> command.

Wat does this mean?
I cannot find any such element.

Thanks,
Luuk

On Sat, 2006-08-12 at 19:02 +0100, andrew welch wrote:
> On 8/12/06, Luuk Jansen <subscribe@xxxxxxxxxxxxxxxxx> wrote:
> > On Sat, 2006-08-12 at 22:06 +0530, Mukul Gandhi wrote:
> > > On 8/12/06, Luuk Jansen <subscribe@xxxxxxxxxxxxxxxxx> wrote:
> > > > 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?
> > >
> > > The classes and interfaces in the package javax.xml.transform are just
> > > wrappers around a specific XSLT engine (for e.g. Xalan or Saxon).
> > > Which XSLT engine you use with javax.xml.transform is determined by a
> > > JAXP property (I don't remember the name just now; but you can easily
> > > find it by googling). To use Saxon, set the value of this JAXP
> > > property to the Saxon class. Then the system will recognize
> > > saxon:parse() function.
> > >
> >
> > Oke, thanks again, getting closer...
> >
> > The next problem is: Cannot find a matching 1-argument function named
> > {http://icl.com/saxon}parse()
> >
> > With the xsl:template as follows:
> >
> >  <xsl:template match="Content" xmlns:saxon="http://icl.com/saxon";>
> >                 <xsl:if test=". != ''">
> >                         <fo:block space-after="10mm">
> >                                 <xsl:variable name="htmlContent" select="saxon:parse(.)"/>
> >                                         <xsl:apply-templates select="$htmlContent"/>
> >                         </fo:block>
> >                 </xsl:if>
> >   </xsl:template>
> >
> > How can I get the function to be found/work?
> 
> You'll need to use the lastest version of Saxon - version 8.7.3 (the
> extension came in around 7.x but you may as well use the latest) and
> then use the correct namespace http://saxon.sf.net/

Current Thread