sax :: SAXLocator :: line_number
Lines are delimited by line ends, which are defined in the XML specification.
Warning: The return value from this method is intended only as an approximation for the sake of diagnostics; it is not intended to provide sufficient information to edit the character content of the original XML document. In some cases, these "line" numbers match what would be displayed as columns, and in others they may not match the source text due to internal entity expansion.
Return an approximation of the line number in the document entity or external parsed entity where the markup triggering the event appears.
If possible, the SAX driver should provide the line position of the first character after the text associated with the document event. The first line is line 1.
Return -1 in absence of line number.
# Return the line number where the current document event ends.
#
# Lines are delimited by line ends, which are defined in
# the XML specification.
#
# **Warning:** The return value from this method
# is intended only as an approximation for the sake of diagnostics;
# it is not intended to provide sufficient information
# to edit the character content of the original XML document.
# In some cases, these "line" numbers match what would be displayed
# as columns, and in others they may not match the source text
# due to internal entity expansion.
#
# Return an approximation of the line number
# in the document entity or external parsed entity where the
# markup triggering the event appears.
#
# If possible, the SAX driver should provide the line position
# of the first character after the text associated with the document
# event. The first line is line 1.
#
# Return -1 in absence of line number.
fun line_number: Int is abstract
lib/sax/sax_locator.nit:61,2--83,33
redef var line_number = -1 is writable
lib/sax/helpers/sax_locator_impl.nit:47,2--39