Project

Profile

Help

Revision 9841d386

Added by Michael Kay almost 12 years ago

2952193 Line number -1 in .NET (from XmlReader)

View differences:

latest9.2/hej/net/sf/saxon/dotnet/DotNetPullProvider.java
436 436
     * @see #getLineNumber
437 437
     */
438 438
    public int getColumnNumber() {
439
        if (parser instanceof XmlTextReader) {
440
            return ((XmlTextReader)parser).get_LinePosition();
441
        } else if (parser instanceof XmlValidatingReader) {
442
            return ((XmlValidatingReader)parser).get_LinePosition();
439
        if (parser instanceof IXmlLineInfo && ((IXmlLineInfo)parser).HasLineInfo()) {
440
            return ((IXmlLineInfo)parser).get_LinePosition();
443 441
        } else {
444 442
            return -1;
445 443
        }
......
461 459
     * @see #getColumnNumber
462 460
     */
463 461
    public int getLineNumber() {
464
        if (parser instanceof XmlTextReader) {
465
            //System.err.println("DotNetPullProvider lineNumber = " + ((XmlTextReader)parser).get_LineNumber());
466
            return ((XmlTextReader)parser).get_LineNumber();
467
        } else if (parser instanceof XmlValidatingReader) {
468
            return ((XmlValidatingReader)parser).get_LineNumber();
462
        if (parser instanceof IXmlLineInfo && ((IXmlLineInfo)parser).HasLineInfo()) {
463
            return ((IXmlLineInfo)parser).get_LinePosition();
469 464
        } else {
470 465
            return -1;
471 466
        }

Also available in: Unified diff