Re: Parsing an incorrect xml string doesn't lead to an error

Nick Wellnhofer <[email protected]> Thu, 13 Feb 2014 15:01:39 +0100
Newsgroups gmane.comp.gnome.lib.xslt
Message-ID <[email protected]>
On 13/02/2014 14:24, Charles G. wrote:
> I thought that if the type were different from toto in the xml, xsltapplystylesheet would exit with an error, but it doesn't.

If you want to check if a transform was terminated, you can call 
'xsltApplyStylesheetUser' with your own 'xsltTransformContextPtr ctxt' and 
then test if 'ctxt->state == XSLT_STATE_STOPPED'.

> I checked the source (transform.c) and it seems that if xslt encounter a terminate=yes, it just skip the element.

No, the transformation should be terminated. If you see that the 
transformation continues, please provide a self-contained test case.

Nick