Support #3618
closedSchema aware warning not presented if I validate with Saxon 9.8.0.7
0%
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
Updated by Michael Kay almost 7 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?
Updated by Michael Kay almost 7 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
Updated by Octavian Nadolu almost 7 years ago
- File personal.xsd personal.xsd added
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.
Updated by Michael Kay almost 7 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