/** * Notify a namespace. Namespaces are notified <b>after</b> the startElement event, and before * any children for the element. The namespaces that are reported are only required * to include those that are different from the parent element; however, duplicates may be reported. * A namespace must not conflict with any namespaces already used for element or attribute names. * * @param namespaceCode an integer: the top half is a prefix code, the bottom half a URI code. * These may be translated into an actual prefix and URI using the name pool. A prefix code of * zero represents the empty prefix (that is, the default namespace). A URI code of zero represents * a URI of "", that is, a namespace undeclaration. * @throws IllegalStateException: attempt to output a namespace when there is no open element * start tag */ public void namespace(int namespaceCode, int properties) throws XPathException { seq1.namespace(namespaceCode, properties); seq2.namespace(namespaceCode, properties); }
/** * Notify a namespace. Namespaces are notified <b>after</b> the startElement event, and before * any children for the element. The namespaces that are reported are only required * to include those that are different from the parent element; however, duplicates may be reported. * A namespace must not conflict with any namespaces already used for element or attribute names. * * @param namespaceCode an integer: the top half is a prefix code, the bottom half a URI code. * These may be translated into an actual prefix and URI using the name pool. A prefix code of * zero represents the empty prefix (that is, the default namespace). A URI code of zero represents * a URI of "", that is, a namespace undeclaration. * @throws IllegalStateException: attempt to output a namespace when there is no open element * start tag */ public void namespace(int namespaceCode, int properties) throws XPathException { seq1.namespace(namespaceCode, properties); seq2.namespace(namespaceCode, properties); }
public TailCall processLeavingTail(XPathContext context) throws XPathException { Controller controller = context.getController(); String prefix = evaluatePrefix(context); String uri = expandChildren(context).toString(); checkPrefixAndUri(prefix, uri, context); int nscode = controller.getNamePool().allocateNamespaceCode(prefix, uri); SequenceReceiver out = context.getReceiver(); out.namespace(nscode, ReceiverOptions.REJECT_DUPLICATES); return null; }
public TailCall processLeavingTail(XPathContext context) throws XPathException { Controller controller = context.getController(); String prefix = evaluatePrefix(context); String uri = expandChildren(context).toString(); checkPrefixAndUri(prefix, uri, context); int nscode = controller.getNamePool().allocateNamespaceCode(prefix, uri); SequenceReceiver out = context.getReceiver(); out.namespace(nscode, ReceiverOptions.REJECT_DUPLICATES); return null; }
break; out.namespace(ns, 0);
break; out.namespace(ns, 0);