Short maintenance. We will be observing a scheduled maintenance window this Sunday, October 30th 2016 from 9:00 until 11:00 UTC to perform important software updates that require a consistent data state. Planio may be unavailable for a few minutes at a time during the maintenance window.

Bug #2081

Line endings are not normalized in library modules

Added by Michael Kay over 2 years ago. Updated over 2 years ago.

XQuery conformance
Start date:
Due date:
% Done:


Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Found in version:
Fixed in version:


(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 2 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.

#2 Updated by Michael Kay over 2 years ago

  • Status changed from In Progress to Resolved

Fixed as suggested in the 9.5 and 9.6 branches.

#3 Updated by O'Neil Delpratt over 2 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in version set to

Bug fix applied in Saxon maintenance release

Also available in: Atom PDF