Re: [xslt] Locating 'Invalid type' errors



On Thu, Mar 13, 2008 at 06:49:50PM +0100, Mark Howe wrote:
> Hi,
> 
> I get a lot of these (usually because I have omitted an exsl:node-set()
> to allow further processing of an RTF), and they can be a real pain to
> locate, because LibXSLT doesn't report a line number, or even a file. I
> assume this is because it's a runtime error that is only identified when
> the offending data gets to the top of the stack, but I wondered if
> anyone had any tips on isolating the problem more easily.

  Basically you get the error in the XPath interpretor. All one get
there is the XPath evaluation context, and the data used have been 
generated when the XPath expressions of the XSLT have been compiled
in the early XSLT compilation. Maybe there is a way to plug the
informations on the XSLT location in the XPath context, or capture
libxml2 generated errors from libxslt (or xsltproc) and try to
give back the current context. Send me a sample example reproducing
the problem with xsltproc, and i will try to look, but don't hold your
breath :-)

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]