Warnings from SAXON are not displayed

Having trouble installing Oxygen? Got a bug to report? Post it all here.
fsteimke
Posts: 80
Joined: Tue Jan 01, 2013 3:19 pm

Warnings from SAXON are not displayed

Post 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
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Warnings from SAXON are not displayed

Post 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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
fsteimke
Posts: 80
Joined: Tue Jan 01, 2013 3:19 pm

Re: Warnings from SAXON are not displayed

Post 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
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Warnings from SAXON are not displayed

Post by adrian »

Hi,

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

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
fsteimke
Posts: 80
Joined: Tue Jan 01, 2013 3:19 pm

Re: Warnings from SAXON are not displayed

Post by fsteimke »

Hi,

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

Sincerely,
Frank
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Warnings from SAXON are not displayed

Post 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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: Warnings from SAXON are not displayed

Post by Radu »

Hi,

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

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply