Package org.apache.xmlbeans

Examples of org.apache.xmlbeans.XmlLineNumber


            _context.startElement(_locale.makeQualifiedQName(uri, qName));

            if (_wantLineNumbers)
            {
                _context.bookmark(
                    new XmlLineNumber(_startLocator.getLineNumber(),
                        _startLocator.getColumnNumber() - 1, -1));
            }

            for (int i = 0, len = atts.getLength(); i < len; i++)
            {
View Full Code Here


        {
            _context.endElement();
            if (_wantLineNumbersAtEndElt)
            {
                _context.bookmark(
                    new XmlLineNumber(_startLocator.getLineNumber(),
                        _startLocator.getColumnNumber() - 1, -1));
            }
        }
View Full Code Here

        protected void lineNumber ( int line, int column, int offset )
        {
            _lastXobj.setBookmark(
                _lastPos,
                XmlLineNumber.class,
                new XmlLineNumber( line, column, offset ) );
        }
View Full Code Here

            if (ref == b)
                o.print( "*:" );

            if (b._value instanceof XmlLineNumber)
            {
                XmlLineNumber l = (XmlLineNumber) b._value;
                o.print( "<line:" + l.getLine() + ">" + "[" + b._pos + "]" );
            }
            else
                o.print( "<mark>" + "[" + b._pos + "]" );
        }
    }
View Full Code Here

                while (!c.currentTokenType().isStart())
                    c.toNextToken();

                Assert.assertTrue( c.currentTokenType().isStart() );
                   
                XmlLineNumber ln =
                    (XmlLineNumber)
                        c.getBookmark( XmlLineNumber.class );

                Assert.assertTrue( ln != null );

                Assert.assertTrue( ln.getLine()   == -1 || ln.getLine() == line );
                Assert.assertTrue( ln.getColumn() == -1 || ln.getColumn() == col );
                Assert.assertTrue( ln.getOffset() == -1 || ln.getOffset() == i );
               
                c.toNextToken();
            }

            if (ch == '\n')
View Full Code Here

            _context.startElement(_locale.makeQualifiedQName(uri, qName));

            if (_wantLineNumbers)
            {
                _context.bookmark(
                    new XmlLineNumber(_startLocator.getLineNumber(),
                        _startLocator.getColumnNumber() - 1, -1));
            }

            for (int i = 0, len = atts.getLength(); i < len; i++)
            {
View Full Code Here

        {
            _context.endElement();
            if (_wantLineNumbersAtEndElt)
            {
                _context.bookmark(
                    new XmlLineNumber(_startLocator.getLineNumber(),
                        _startLocator.getColumnNumber() - 1, -1));
            }
        }
View Full Code Here

    }

    private XmlTreeNode findXmlTreeNode(XmlTreeNode treeNode, int line, int column) {
        for (int c = 0; c < treeNode.getChildCount(); c++) {
            XmlTreeNode child = treeNode.getChild(c);
            XmlLineNumber ln = child.getNodeLineNumber();
            if (ln != null && (line < ln.getLine() || (line == ln.getLine() && column <= ln.getColumn()))) {
                if (c == 0) {
                    return treeNode;
                } else {
                    return findXmlTreeNode(treeNode.getChild(c - 1), line, column);
                }
View Full Code Here

                set( _lastSplay, _lastPos );
        }

        void lineNumberAnnotation ( int line, int column, int offset )
        {
            annotate( new XmlLineNumber( line, column, offset ) );
        }
View Full Code Here

                while (!c.currentTokenType().isStart())
                    c.toNextToken();

                Assert.assertTrue( c.currentTokenType().isStart() );
                   
                XmlLineNumber ln =
                    (XmlLineNumber)
                        c.getBookmark( XmlLineNumber.class );

                Assert.assertTrue( ln != null );

                Assert.assertTrue( ln.getLine()   == -1 || ln.getLine() == line );
                Assert.assertTrue( ln.getColumn() == -1 || ln.getColumn() == col );
                Assert.assertTrue( ln.getOffset() == -1 || ln.getOffset() == i );
               
                c.toNextToken();
            }

            if (ch == '\n')
View Full Code Here

TOP

Related Classes of org.apache.xmlbeans.XmlLineNumber

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.