Line endings are not normalized in library modules
(Reported by Gunther Rademacher on saxon-help list)
Line endings are normalized in the main query module but not in library modules.
#1 Updated by Michael Kay over 3 years ago
- Status changed from New to In Progress
Normalization of line endings is done in XQueryParser.normalizeLineEndings10 or normalizeLineEndings11, which are called from XQueryParser.makeXQueryExpression(), which only handles the main module and not library modules.
Comments in the code suggest incorrectly that it's done in QueryReader.readInputStream(), which would handle both main modules and library modules. But this code isn't invoked when the query is supplied as a string (as happens when reading queries from the QT3 test catalog, for example), so I suspect the invocation was moved for this reason. See also the incorrect comment about line endings in the javadoc for QueryModule.makeQueryModule.
It probably makes sense to leave the invocation in XQueryParser.makeXQueryExpression() for main modules, and to add an invocation in QueryParser.parseLibraryModule to handle library modules.
Please register to edit this issue