Project

Profile

Help

Bug #3543

closed

XdmNode.getColumnNumber() is always -1 for text and comment nodes.

Added by Gerben Abbink over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Diagnostics
Sprint/Milestone:
-
Start date:
2017-11-23
Due date:
% Done:

100%

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

Description

I'm building an XML dom using S9API's DocumentBuilder. Configuration.setLineNumbering is set to true.

The resulting dom contains all kinds of nodes. Calling XdmNode.getColumnNumber() on elements, attributes and processing-instructions return an actual value. However, calling in on text and comments always returns -1.

I did some digging in Saxon's source code and in TinyBuilder.java i see that in method processingInstruction() tt.setLineNumber() is called, while in method comment() it is not called. Is that the reason why getColumnNumber() always returns -1 for comment and not for processing instructions?


Related issues

Has duplicate Saxon - Feature #1739: Add line/column information for nodes other than elements.ResolvedMichael Kay2013-04-23

Actions

Please register to edit this issue

Also available in: Atom PDF