Package xbird.xquery.misc.QNameTable

Examples of xbird.xquery.misc.QNameTable.QualifiedName


                    String namespaceURI = readString(input);
                    handler.evEndElement(prefix, localName, namespaceURI);
                    break;
                }
                case XQEventEncoder.EV_ATTR: {
                    QualifiedName qname = QualifiedName.readFrom(input);
                    String value = readString(input);
                    handler.evAttribute(qname, value);
                    break;
                }
                case XQEventEncoder.EV_NAMESPACE: {
View Full Code Here


                    redirectString(input, out);
                    redirectString(input, out);
                    break;
                }
                case XQEventEncoder.EV_ATTR: {
                    QualifiedName qname = QualifiedName.readFrom(input);
                    qname.writeExternal(out);
                    redirectString(input, out);
                    break;
                }
                case XQEventEncoder.EV_NAMESPACE:
                    redirectString(input, out);
View Full Code Here

        if(!_pendingAtts.isEmpty()) {
            int attlen = _pendingAtts.size();
            for(int i = 0; i < attlen; i++) {
                Attribute att = _pendingAtts.get(i);
                long attid = _table.putAttribute(ATTRIBUTE, parent, i, attlen);
                QualifiedName qname = att.qname;
                _table.setAttributeName(attid, qname.getNamespaceURI(), qname.getLocalPart(), qname.getPrefix());
                _table.setTextAt(attid, att.value);
            }
            _pendingAtts.clear();
        }
    }
View Full Code Here

    public void evStartDocument() throws XQueryException {}

    @Override
    public void evStartElement(long eid, QualifiedName qname) throws XQueryException {
        if(qnameTable != null) {
            QualifiedName found = qnameTable.find(qname);
            if(found != null) {
                docTable.setName(eid, found.identity());
                qname = found;
            }
        }
        final TreeWalker walker = _walker;
        // #1 path index
View Full Code Here

    @Override
    public void evAttribute(long attid, QualifiedName attName, String attValue)
            throws XQueryException {
        if(qnameTable != null) {
            final QualifiedName found = qnameTable.find(attName);
            if(found != null) {
                docTable.setAttributeName(attid, found.identity());
                attName = found;
            }
        }
        final TreeWalker walker = _walker;
        // #1 path index
View Full Code Here

    }

    @Override
    public void evNamespace(long nsid, QualifiedName nsName, String uri) throws XQueryException {
        if(qnameTable != null) {
            QualifiedName found = qnameTable.find(nsName);
            if(found != null) {
                docTable.setAttributeName(nsid, found.identity());
                nsName = found;
            }
        }
        final TreeWalker walker = _walker;
        // #2 label index
View Full Code Here

    }

    public XQExpression visit(AttributeConstructor constructor, XQueryContext ctxt)
            throws XQueryException {
        boolean isLoopInvariant = true;
        QualifiedName name = constructor.getName();
        if(name == null) {
            XQExpression nameExpr = constructor.getNameExpr();
            XQExpression nameExpr2 = nameExpr.visit(this, ctxt);
            if(nameExpr2 != nameExpr) {
                constructor.setNameExpr(nameExpr2);
View Full Code Here

        }
        return coder.encode();
    }

    public int identifyQName(QualifiedName qname) {
        final QualifiedName found = qnameTable.find(qname);
        if(found == null) {
            return -1;
        }
        return found.identity();
    }
View Full Code Here

                childItor.closeQuietly();
                receiver.evEndDocument();
                break;
            case NodeKind.ELEMENT:
                final DMElement e = node.<DMElement> castAs();
                final QualifiedName elemName = e.nodeName();
                receiver.evStartElement(elemName);
                for(DMNamespace ns : e.namespaceNodes()) {
                    QualifiedName qname = ns.nodeName();
                    final String localName;
                    if(qname != null) {
                        localName = qname.getLocalPart();
                    } else {
                        localName = "";
                    }
                    String value = ns.getContent();
                    receiver.evNamespace(localName, value);
View Full Code Here

            return _delegate.nodeKind();
        }

        @Override
        public String getNamespaceURI() {
            QualifiedName nodename = nodeName();
            if(nodename != null) {
                return nodename.getNamespaceURI();
            }
            return super.getNamespaceURI();
        }
View Full Code Here

TOP

Related Classes of xbird.xquery.misc.QNameTable.QualifiedName

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.