Skip to content

Line number of RelaxNG error seems capped at 65535 #1505

@mikevm

Description

@mikevm

When validating an XML document using RelaxNG, the line number of the error is capped at 65535.

test code: https://gist.github.com/mikevm/71095581645c62a971194b3142d09b92

output:

$ ruby -v
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14]
$ ruby ./test.rb
Nokogiri: 1.6.8
XML document with a schema violation on line 400
 0. RelaxNG reports error on line 400: Error validating datatype string
 1. RelaxNG reports error on line 400: Element item failed to validate content
XML document with a schema violation on line 40000
 0. RelaxNG reports error on line 40000: Error validating datatype string
 1. RelaxNG reports error on line 40000: Element item failed to validate content
XML document with a schema violation on line 70000
 0. RelaxNG reports error on line 65535: Error validating datatype string
 1. RelaxNG reports error on line 65535: Element item failed to validate content

expected the result of #line always returns the line on which the error occurred
actual the result of #line is capped at 65535.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions