Project

Profile

Help

Feature #4516

closed

When using the command-line, errors/warnings to stdout give the XSLT give filename or source, but no path

Added by Philip Fearon about 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2020-04-10
Due date:
% Done:

0%

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

Description

(With Saxon 10.0)

When invoking an XSLT from the command-line, if warnings or errors are emitted to stdout/stderr, I would like to be able to uniquely identify the source file location that is the cause of the warning or error. Currently, only the filename is given, not the absolute or relative path.

I'm proposing that the absolute or relative path is included in the file location for a warning or error message.

For example, with the entry-point XSLT:

<xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    version="3.0">
    
    <xsl:import href="functions/basic-support.xsl"/>
    
    <xsl:param name="p1"/>
    <xsl:param name="p2"/>
    
    <xsl:template match='/'>
        <root>
            <xsl:sequence select="*"/>
        </root>
    </xsl:template>
    
</xsl:stylesheet>

If an error is found in the** imported** functions/basic-support.xsl, the result is, in a specific case

Type error at char 0 in expression in xsl:sequence/@select on line 10 column 47 of basic-support.xsl:
  XTTE0780  The required item type of the result of a call to ext:test#0 is xs:string. The
  supplied value is of type xs:integer
Errors were reported during stylesheet compilation

It would be most useful if the first line was instead:

Type error at char 0 in expression in xsl:sequence/@select on line 10 column 47 of functions/basic-support.xsl:

Files

problemEntries.png (201 KB) problemEntries.png Philip Fearon, 2020-04-13 18:00

Please register to edit this issue

Also available in: Atom PDF