@Override public void namespace(NamespaceBindingSet namespaceBindings, int properties) throws XPathException { written = true; super.namespace(namespaceBindings, properties); }
@Override public void namespace(NamespaceBindingSet namespaceBindings, int properties) throws XPathException { written = true; super.namespace(namespaceBindings, properties); }
@Override public void namespace(NamespaceBinding namespaceBinding, int properties) throws XPathException { MatchContext context = matchContext.getLast(); if (context.matchedElement) { super.namespace(namespaceBinding, properties); } }
@Override public void namespace(NamespaceBindingSet namespaceBindings, int properties) throws XPathException { MatchContext context = matchContext.getLast(); if (context.matchedElement) { super.namespace(namespaceBindings, properties); } }
@Override public void namespace(NamespaceBindingSet namespaceBindings, int properties) throws XPathException { MatchContext context = matchContext.getLast(); if (context.matchedElement) { super.namespace(namespaceBindings, properties); } }
@Override public void namespace(NamespaceBindingSet namespaceBindings, int properties) throws XPathException { start(); super.namespace(namespaceBindings, properties); }
@Override public void namespace(NamespaceBindingSet namespaceBindings, int properties) throws XPathException { start(); super.namespace(namespaceBindings, 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 namespaceBindings the prefix/uri pair representing the namespace binding * @param properties any special properties to be passed on this call * @throws IllegalStateException: attempt to output a namespace when there is no open element * start tag */ @Override public void namespace(NamespaceBindingSet namespaceBindings, int properties) throws XPathException { if (level == 0) { failed = true; throw new XPathException("Cannot serialize a free-standing namespace node", "SENR0001"); } try { super.namespace(namespaceBindings, properties); } catch (XPathException e) { failed = true; throw e; } }
/** * 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 namespaceBindings the prefix/uri pair representing the namespace binding * @param properties any special properties to be passed on this call * @throws IllegalStateException: attempt to output a namespace when there is no open element * start tag */ @Override public void namespace(NamespaceBindingSet namespaceBindings, int properties) throws XPathException { if (level == 0) { failed = true; throw new XPathException("Cannot serialize a free-standing namespace node", "SENR0001"); } try { super.namespace(namespaceBindings, properties); } catch (XPathException e) { failed = true; throw e; } }
/** * 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. * * Any special namespaces (for XHTML, SVG and MathML) are not written out - * they are specifically emitted with elements or attributes requiring them * * @param namespaceBindings the prefix/uri pair representing the namespace binding * @param properties any special properties to be passed on this call * @throws IllegalStateException: attempt to output a namespace when there is no open element * start tag */ @Override public void namespace(NamespaceBindingSet namespaceBindings, int properties) throws XPathException { for (NamespaceBinding ns : namespaceBindings) { if (!isSpecial(ns.getURI())) { super.namespace(ns, 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. * * Any special namespaces (for XHTML, SVG and MathML) are not written out - * they are specifically emitted with elements or attributes requiring them * * @param namespaceBindings the prefix/uri pair representing the namespace binding * @param properties any special properties to be passed on this call * @throws IllegalStateException: attempt to output a namespace when there is no open element * start tag */ @Override public void namespace(NamespaceBindingSet namespaceBindings, int properties) throws XPathException { for (NamespaceBinding ns : namespaceBindings) { if (!isSpecial(ns.getURI())) { super.namespace(ns, properties); } } }
@Override public void namespace(NamespaceBindingSet namespaceBindings, int properties) throws XPathException { if (contentStarted) { for (NamespaceBinding ns : namespaceBindings) { String prefix = ns.getPrefix(); String uri = ns.getURI(); processingInstruction("namespace", "prefix=\"" + prefix + "\" uri=\"" + uri + "\"", ExplicitLocation.UNKNOWN_LOCATION, 0); } } else { super.namespace(namespaceBindings, properties); } }
@Override public void namespace(NamespaceBindingSet namespaceBindings, int properties) throws XPathException { if (contentStarted) { for (NamespaceBinding ns : namespaceBindings) { String prefix = ns.getPrefix(); String uri = ns.getURI(); processingInstruction("namespace", "prefix=\"" + prefix + "\" uri=\"" + uri + "\"", ExplicitLocation.UNKNOWN_LOCATION, 0); } } else { super.namespace(namespaceBindings, properties); } }
public void namespace(int namespaceCode, int properties) throws XPathException { if (contentStarted) { String prefix = getNamePool().getPrefixFromNamespaceCode(namespaceCode); String uri = getNamePool().getURIFromNamespaceCode(namespaceCode); processingInstruction("namespace", "prefix=\"" + prefix + "\" uri=\"" + uri + "\"", 0, 0); } else { super.namespace(namespaceCode, properties); } }
public void namespace(int namespaceCode, int properties) throws XPathException { if (contentStarted) { String prefix = getNamePool().getPrefixFromNamespaceCode(namespaceCode); String uri = getNamePool().getURIFromNamespaceCode(namespaceCode); processingInstruction("namespace", "prefix=\"" + prefix + "\" uri=\"" + uri + "\"", 0, 0); } else { super.namespace(namespaceCode, properties); } }
/** * Notify an attribute. Attributes are notified after the startElement event, and before any * children. Namespaces and attributes may be intermingled. * * Specific treatment of attributes in XHTML, SVG and MathML namespaces forces a namespace to be emitted too, * rather than by higher level default behaviour. * * @param nameCode The name of the attribute * @param typeCode The type of the attribute * @param locationId the location of the node in the source, or of the instruction that created it * @param properties Bit significant value. The following bits are defined: * <dl> * <dd>DISABLE_ESCAPING</dd> <dt>Disable escaping for this attribute</dt> * <dd>NO_SPECIAL_CHARACTERS</dd> <dt>Attribute value contains no special characters</dt> * </dl> * @throws IllegalStateException: attempt to output an attribute when there is no open element * start tag */ public void attribute(NodeName nameCode, SimpleType typeCode, CharSequence value, Location locationId, int properties) throws XPathException { if(isSpecial(nameCode.getURI())) { super.namespace(nameCode.getNamespaceBinding(),properties); } super.attribute(nameCode, typeCode, value, locationId, properties); } }
/** * Notify an attribute. Attributes are notified after the startElement event, and before any * children. Namespaces and attributes may be intermingled. * * Specific treatment of attributes in XHTML, SVG and MathML namespaces forces a namespace to be emitted too, * rather than by higher level default behaviour. * * @param nameCode The name of the attribute * @param typeCode The type of the attribute * @param locationId the location of the node in the source, or of the instruction that created it * @param properties Bit significant value. The following bits are defined: * <dl> * <dd>DISABLE_ESCAPING</dd> <dt>Disable escaping for this attribute</dt> * <dd>NO_SPECIAL_CHARACTERS</dd> <dt>Attribute value contains no special characters</dt> * </dl> * @throws IllegalStateException: attempt to output an attribute when there is no open element * start tag */ public void attribute(NodeName nameCode, SimpleType typeCode, CharSequence value, Location locationId, int properties) throws XPathException { if(isSpecial(nameCode.getURI())) { super.namespace(nameCode.getNamespaceBinding(),properties); } super.attribute(nameCode, typeCode, value, locationId, properties); } }
/** * Notify the start of an element * * Specific treatment of elements in XHTML, SVG and MathML namespaces forces a namespace to be emitted too, * rather than by higher level default behaviour. * @param elemName integer code identifying the name of the element within the name pool. * @param typeCode integer code identifying the element's type within the name pool. * @param location * @param properties properties of the element node */ @Override public void startElement(NodeName elemName, SchemaType typeCode, Location location, int properties) throws XPathException { if (isSpecial(elemName.getURI())) { if (!elemName.getPrefix().isEmpty()) { elemName = new FingerprintedQName("", elemName.getURI(), elemName.getLocalPart()); } super.startElement(elemName, typeCode, location, properties); super.namespace(new NamespaceBinding("", elemName.getURI()), properties); } else { super.startElement(elemName, typeCode, location, properties); } }
/** * Notify the start of an element * * Specific treatment of elements in XHTML, SVG and MathML namespaces forces a namespace to be emitted too, * rather than by higher level default behaviour. * @param elemName integer code identifying the name of the element within the name pool. * @param typeCode integer code identifying the element's type within the name pool. * @param location * @param properties properties of the element node */ @Override public void startElement(NodeName elemName, SchemaType typeCode, Location location, int properties) throws XPathException { if (isSpecial(elemName.getURI())) { if (!elemName.getPrefix().isEmpty()) { elemName = new FingerprintedQName("", elemName.getURI(), elemName.getLocalPart()); } super.startElement(elemName, typeCode, location, properties); super.namespace(new NamespaceBinding("", elemName.getURI()), properties); } else { super.startElement(elemName, typeCode, location, properties); } }