Project

Profile

Help

Support #3446

closed

How can i see which attribute has an invalid value?

Added by Gerben Abbink over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2017-09-15
Due date:
% Done:

0%

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

Description

This stylesheet (the stylesheet is just an example) produces an error in line 4:

<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">

	<xsl:number count="aaa///bbb" from="aaa///bbb"></xsl:number>

</xsl:template>

</xsl:stylesheet>

My installed error listener is called with parameter e, an XPathException.

The only information i can retreive is this:

e.getLocator().getLineNumber() = 4

e.getMessage() = Unexpected token "/" at start of expression.

There is no indication which one of the two attributes is wrong. I tried

e.getCause() = null

e.getException() = null

e.getErrorObject() = null

There is also no information about the location of the error in the XPath expression. However, if i evaluate "aaa///bbb" using XPathCompiler, an exception SaxonApiException is thrown and getCause() (also an XPathException) gives me the actual location, via getLocator().getColumnNumber(), so that information seems to be available.

How can i tell which one of the attribute values is wrong (in Java code) and what the position of the error in the XPath expression is?

Thank you.


Files

exception.tiff (287 KB) exception.tiff Michael Kay, 2017-09-15 13:28

Please register to edit this issue

Also available in: Atom PDF