Package org.exist.xquery.value

Examples of org.exist.xquery.value.Item.copyTo()


            buf.setLength(0);
          }
                    if (next.getType() == Type.ATTRIBUTE && !allowAttribs)
                        throw new XPathException(this, "XQTY0024: An attribute may not appear after " +
                            "another child node.");
                    next.copyTo(context.getBroker(), receiver);
                    allowAttribs = next.getType() == Type.ATTRIBUTE;
                    next = i.nextItem();
        }
            }
      // flush remaining character data
View Full Code Here


            };
            context.pushDocumentContext();
            Sequence seq = callback.evalFunction(null, null, params);
            for (SequenceIterator i = seq.iterate(); i.hasNext(); ) {
                Item next = i.nextItem();
                next.copyTo(context.getBroker(), docBuilder);
            }
            context.popDocumentContext();
        }
    }
}
View Full Code Here

            buf.setLength(0);
          }
                    if (next.getType() == Type.ATTRIBUTE && !allowAttribs)
                        throw new XPathException(this, "XQTY0024: An attribute may not appear after " +
                            "another child node.");
                    next.copyTo(context.getBroker(), receiver);
                    allowAttribs = next.getType() == Type.ATTRIBUTE;
                    next = i.nextItem();
        }
            }
      // flush remaining character data
View Full Code Here

            buf.setLength(0);
          }
                    if (next.getType() == Type.ATTRIBUTE && !allowAttribs)
                        throw new XPathException(this, "XQTY0024: An attribute may not appear after " +
                            "another child node.");
                    next.copyTo(context.getBroker(), receiver);
                    allowAttribs = next.getType() == Type.ATTRIBUTE;
                    next = i.nextItem();
        }
            }
      // flush remaining character data
View Full Code Here

                    } else if (next.getType() == Type.DOCUMENT) {
                        if (buf != null && buf.length() > 0) {
                            receiver.characters(buf);
                            buf.setLength(0);
                        }
                        next.copyTo(context.getBroker(), receiver);
                        next = i.nextItem();
                    } else if (Type.subTypeOf(next.getType(), Type.NODE)) {
                        if (buf != null && buf.length() > 0) {
                            receiver.characters(buf);
                            buf.setLength(0);
View Full Code Here

                    } else if (Type.subTypeOf(next.getType(), Type.NODE)) {
                        if (buf != null && buf.length() > 0) {
                            receiver.characters(buf);
                            buf.setLength(0);
                        }
                        next.copyTo(context.getBroker(), receiver);
                        next = i.nextItem();
                    }
                }
                // flush remaining character data
                if (buf != null && buf.length() > 0) {
View Full Code Here

                        buf.setLength(0);
                    }
                    if (next.getType() == Type.ATTRIBUTE && !allowAttribs)
                        {throw new XPathException(this, ErrorCodes.XQTY0024,
                            "An attribute may not appear after another child node.");}
                    next.copyTo(context.getBroker(), receiver);
                    allowAttribs = next.getType() == Type.ATTRIBUTE || next.getType() == Type.NAMESPACE;
                    next = i.nextItem();
                }
            }
            // flush remaining character data
View Full Code Here

                for (final SequenceIterator iter = callbackResult.iterate(); iter.hasNext(); ) {
                  final Item next = iter.nextItem();
                  if (Type.subTypeOf(next.getType(), Type.NODE)) {
                    nodeNr = builder.getDocument().getLastNode();
                    try {
              next.copyTo(context.getBroker(), receiver);
              result.add(builder.getDocument().getNode(++nodeNr));
              lastNodeNr = nodeNr;
            } catch (final SAXException e) {
              throw new XPathException(this, "Internal error while copying nodes: " + e.getMessage(), e);
            }
View Full Code Here

                    for (final SequenceIterator iter = callbackResult.iterate(); iter.hasNext(); ) {
                      final Item next = iter.nextItem();
                      if (Type.subTypeOf(next.getType(), Type.NODE)) {
                        nodeNr = builder.getDocument().getLastNode();
                        try {
                  next.copyTo(context.getBroker(), receiver);
                  result.add(builder.getDocument().getNode(++nodeNr));
                  lastNodeNr = nodeNr;
                } catch (final SAXException e) {
                  throw new XPathException(this, "Internal error while copying nodes: " + e.getMessage(), e);
                }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.