Actions
Bug #5805
closedSet locator to XmlProcessingIncident
Start date:
2023-01-11
Due date:
% Done:
100%
Estimated time:
Legacy ID:
Applies to branch:
11, 12, trunk
Fix Committed on Branch:
11, 12, trunk
Description
Let' say in my XSLT I made a silly mistake and used xsl:attributes instead of xsl:attribute.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="3.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:p="http://www.oxygenxml.com/ns/samples/personal"
exclude-result-prefixes="p">
<xsl:template match="/">
<xsl:element name="table">
<xsl:attributes name="border">1</xsl:attributes>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
I create a transformer which fails with the error "Unknown XSLT instruction xsl:attributes" but there is no location for it, its line is -1.
I suggest here: net.sf.saxon.style.StyleElement.setValidationError(XmlProcessingIncident, OnFailure) to add some extra code:
if(reason != null && reason.getLocation() == Loc.NONE) {
reason.setLocation(allocateLocation());
}
Updated by Michael Kay almost 2 years ago
- Category set to Diagnostics
- Status changed from New to Resolved
- Assignee set to Michael Kay
- Priority changed from Low to Normal
- Applies to branch 11, 12, trunk added
- Fix Committed on Branch 11, 12, trunk added
- Platforms .NET, Java added
I made minor tweaks to the 12.0 diagnostics as well.
Updated by O'Neil Delpratt almost 2 years ago
- % Done changed from 0 to 100
- Fixed in Maintenance Release 11.5 added
Bug fix applied in the Saxon 11.5 maintenance release.
Updated by O'Neil Delpratt almost 2 years ago
- Status changed from Resolved to Closed
- Fixed in Maintenance Release 12.1 added
Bug fix applied in the Saxon 12.1 maintenance release.
Please register to edit this issue
Actions