Project

Profile

Help

Support #3618

closed

Schema aware warning not presented if I validate with Saxon 9.8.0.7

Added by Octavian Nadolu over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Schema-Aware processing
Sprint/Milestone:
-
Start date:
2018-01-12
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
9.8
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

If I validate the following XSL with Saxon 9.7.0.19 I get an warning

"SXWN9000: The complex type of element person does not allow a child element named c"

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    exclude-result-prefixes="xs"
    version="2.0">
    <xsl:import-schema schema-location="personal.xsd"></xsl:import-schema>
    <xsl:template match="schema-element(person)">
        <xsl:variable name="v" as="xs:string?" select="c"/>
        <xsl:value-of select="$v"/>
    </xsl:template>
</xsl:stylesheet>

This warning is not presented anymore if I validate with Saxon 9.8.0.7


Files

personal.xsd (3.69 KB) personal.xsd Octavian Nadolu, 2018-01-15 08:34
Actions #1

Updated by Michael Kay over 6 years ago

Are you running with the default -jit:on? By default, static analysis of the body of a template rule is now deferred until the template rule is first executed.

(My general advice is to use -jit:off during development, and -jit:on during production)

If that's not the cause, could we see the schema please?

Actions #2

Updated by Michael Kay over 6 years ago

  • Category set to Schema-Aware processing
  • Status changed from New to AwaitingInfo
  • Assignee set to Michael Kay
  • Priority changed from Low to Normal
Actions #3

Updated by Octavian Nadolu over 6 years ago

I attached the the schema.

Yes you are right, I run with all optimizations on (that includes also just in time compilation). If I disable the optimizations the warning is presented.

Actions #4

Updated by Michael Kay over 6 years ago

  • Tracker changed from Bug to Support
  • Status changed from AwaitingInfo to Closed

Closed with no action. This change is intentional: a consequence of the introduction of JIT processing of template rules in 9.8, and the decision to make this the default.

Please register to edit this issue

Also available in: Atom PDF