Page 1 of 1

Warnings from SAXON are not displayed

Posted: Sat Apr 26, 2014 8:12 am
by fsteimke
Hi,

lets say i have an xsd-Schema which defines Element e with one child element a of type xs:string. I have an xslt script which imports this schema. In this script there is a template which matches schema-element(e). The value of the child element is assigned to a variable v. I will validate this script with the schema-aware SAXON-EE 9.5.1.3 Engine in Oxygen 15.2.

Question is: what happens when i accidently refer to a non-existing child of e, maybe because of a typo?

If the variable v is defined as mandatory, i will get both an error and a warning.

Code: Select all

<xsl:variable name="v" as="xs:string" select="c"/>
Failed to compile stylesheet. 1 error detected.
Fehlerlevel: warning
The complex type of element e does not allow a child element named c

Fehlerlevel: fatal
XTTE0570: An empty sequence is not allowed as the value of variable $v
Im am using the german language, Fehlerlevel is error-level. So this works as expected.

However, if variable v is optional, validation thells me that my script is valid.

Code: Select all

<xsl:variable name="v" as="xs:string?" select="c"/>
It is ok that the fatal error disappered because an empty sequence is now allowed as a value of $v, but i would expect the warning which tells me that the complex type of element e does not allow a child element named c. But this is not displayed. Everything seems to be ok, since the warning is supressed.

Is this a bug, or did i miss something in the configuration of oxygen or saxon?

Sincerely,
Frank

Re: Warnings from SAXON are not displayed

Posted: Mon Apr 28, 2014 6:00 pm
by adrian
Hi,

There seems to indeed be a bug in Oxygen's error reporting. It does eventually report it as a warning, but only if another error is in that context.

e.g. As you mentioned, no warnings and no errors are reported for this:

Code: Select all

<xsl:variable name="v" as="xs:string?" select="c"/>
<xsl:value-of select="$v"/>
However, for this:

Code: Select all

<xsl:variable name="v" as="xs:string?" select="c"/>
<xsl:value-of select="$v"/>
<xsl:variable name="v2" as="xs:string" select="d"/>
<xsl:value-of select="$v2"/>
one error and two warnings are reported:

Code: Select all


Engine name: Saxon-EE 9.5.1.3
Severity: error
Description: Failed to compile stylesheet. 1 error detected.

Engine name: Saxon-EE 9.5.1.3
Severity: warning
Description: The complex type of element e does not allow a child element named {}c

Engine name: Saxon-EE 9.5.1.3
Severity: warning
Description: The complex type of element e does not allow a child element named {}d

Engine name: Saxon-EE 9.5.1.3
Severity: fatal
Description: XTTE0570: An empty sequence is not allowed as the value of variable $v2
URL: http://www.w3.org/TR/xslt20/#err-XTTE0570
The first warning is for the child element c, even though the same code passed validation without warning in the first case.

I've logged this on our issue tracking tool. This will be analyzed and resolved in the next release of Oxygen.

Regards,
Adrian

Re: Warnings from SAXON are not displayed

Posted: Sun Jun 22, 2014 11:51 am
by fsteimke
Hi Adrian,

i have checked with the latest version. It seems that nothing has changed up to now.

Do you know when this bug will be fixed?

Thanks,
Frank

Re: Warnings from SAXON are not displayed

Posted: Mon Jun 23, 2014 6:08 pm
by adrian
Hi,

This didn't make it in the v16.0 release. It's currently scheduled for v16.1.

Regards,
Adrian

Re: Warnings from SAXON are not displayed

Posted: Wed Oct 08, 2014 1:08 pm
by fsteimke
Hi,

as far as i can see, it it still the same in 16.1 as before, right?

Sincerely,
Frank

Re: Warnings from SAXON are not displayed

Posted: Wed Oct 08, 2014 3:14 pm
by adrian
Hi,

That's right. This has not yet been fixed in v16.1. It will be re-scheduled for a later version.
We will notify this thread when it is fixed.

Regards,
Adrian

Re: Warnings from SAXON are not displayed

Posted: Tue May 19, 2015 1:49 pm
by Radu
Hi,

Just to update this thread, the issue should be already fixed in Oxygen 17.

Regards,
Radu