Re: [xml] xsltproc does not set error code when parsinf faulty xsl

On Wed, Jan 21, 2004 at 06:50:43PM +0100, Stefan Kost wrote:
hi Daniel,

is it intensional that xsltpro not returns an error incase of invalid xslt files.
I've inserted an mistyped elements (xsl:ooutput) and run xsltpro as below:

xsltproc typo.xsl && echo $?
Parsing stylesheet typo.xsl took 6 ms
compilation error: file typo.xsl line 19 element ooutput
xsltStylePreCompute: unknown xsl:ooutput
compilation error: file typo.xsl line 19 element ooutput
xsltParseStylesheetTop: ignoring unknown ooutput element

xsltStylePreCompute: only increments the warning-counter

xsltParseStylesheetTop: says it is an error, but increments the warning counter

          xsltTransformError(NULL, style, cur,
                      "xsltParseStylesheetTop: ignoring unknown %s element\n",
          if (style != NULL) style->warnings++;

The rational I would like to treat such warnings as errors is, that I use
xsltpro as part of my 'make test' target to see if all stylesheets I package

  Hum, in that case the element is in the XSLT namespace, it then
need to be linked to version compatibility processing, see

it depends on the version indicated, but it's probably right that this should
be labelled as an error.


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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