Warnings from SAXON are not displayed

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
fsteimke
Posts: 40

Warnings from SAXON are not displayed

Sat Apr 26, 2014 8:12 am

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: 2336

Re: Warnings from SAXON are not displayed

Mon Apr 28, 2014 6:00 pm

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: 40

Re: Warnings from SAXON are not displayed

Sun Jun 22, 2014 11:51 am

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: 2336

Re: Warnings from SAXON are not displayed

Mon Jun 23, 2014 6:08 pm

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: 40

Re: Warnings from SAXON are not displayed

Wed Oct 08, 2014 1:08 pm

Hi,

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

Sincerely,
Frank
adrian
Posts: 2336

Re: Warnings from SAXON are not displayed

Wed Oct 08, 2014 3:14 pm

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: 5210

Re: Warnings from SAXON are not displayed

Tue May 19, 2015 1:49 pm

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

Return to “Common Problems”

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests