@Override public void attribute(NodeName attName, SimpleType typeCode, CharSequence value, Location location, int properties) throws XPathException { written = true; super.attribute(attName, typeCode, value, location, properties); }
@Override public void attribute(NodeName attName, SimpleType typeCode, CharSequence value, Location location, int properties) throws XPathException { written = true; super.attribute(attName, typeCode, value, location, properties); }
@Override public void attribute(NodeName nameCode, SimpleType typeCode, CharSequence value, Location locationId, int properties) throws XPathException { start(); super.attribute(nameCode, typeCode, value, locationId, properties); }
@Override public void attribute(NodeName nameCode, SimpleType typeCode, CharSequence value, Location locationId, int properties) throws XPathException { start(); super.attribute(nameCode, typeCode, value, locationId, properties); }
@Override public void attribute(NodeName attributeName, SimpleType typeCode, CharSequence value, Location locationId, int properties) throws XPathException { if (contentStarted) { String attName = attributeName.getDisplayName(); processingInstruction("attribute", "name=\"" + attName + "\" value=\"" + value + "\"", locationId, 0); } else { super.attribute(attributeName, typeCode, value, locationId, properties); } }
@Override public void attribute(NodeName attributeName, SimpleType typeCode, CharSequence value, Location locationId, int properties) throws XPathException { if (contentStarted) { String attName = attributeName.getDisplayName(); processingInstruction("attribute", "name=\"" + attName + "\" value=\"" + value + "\"", locationId, 0); } else { super.attribute(attributeName, typeCode, value, locationId, properties); } }
@Override public void attribute(NodeName nameCode, SimpleType typeCode, CharSequence value, Location locationId, int properties) throws XPathException { MatchContext mc = matchContext.getLast(); if (!mc.matchedElement) { return; } if (nameCode.hasURI(javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI)) { super.attribute(nameCode, typeCode, value, locationId, properties); return; } if (mc.attributeArcs != null) { for (PathMapArc arc : mc.attributeArcs) { NodeTest test = arc.getNodeTest(); if (test == null || test.matches(Type.ATTRIBUTE, nameCode, typeCode)) { super.attribute(nameCode, typeCode, value, locationId, properties); return; } } } }
@Override public void attribute(NodeName nameCode, SimpleType typeCode, CharSequence value, Location locationId, int properties) throws XPathException { MatchContext mc = matchContext.getLast(); if (!mc.matchedElement) { return; } if (nameCode.hasURI(javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI)) { super.attribute(nameCode, typeCode, value, locationId, properties); return; } if (mc.attributeArcs != null) { for (PathMapArc arc : mc.attributeArcs) { NodeTest test = arc.getNodeTest(); if (test == null || test.matches(Type.ATTRIBUTE, nameCode, typeCode)) { super.attribute(nameCode, typeCode, value, locationId, properties); return; } } } }
@Override public void attribute(NodeName nameCode, SimpleType typeCode, CharSequence value, int locationId, int properties) throws XPathException { MatchContext mc = matchContext.getLast(); if (!mc.matchedElement) { return; } if (nameCode.isInNamespace(javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI)) { super.attribute(nameCode, typeCode, value, locationId, properties); return; } if (mc.attributeArcs != null) { for (PathMapArc arc : mc.attributeArcs) { NodeTest test = arc.getNodeTest(); if (test == null || test.matches(Type.ATTRIBUTE, nameCode, typeCode.getFingerprint())) { super.attribute(nameCode, typeCode, value, locationId, properties); return; } } } }
public void attribute(int nameCode, int typeCode, CharSequence value, int locationId, int properties) throws XPathException { if (contentStarted) { String attName = getNamePool().getDisplayName(nameCode); processingInstruction("attribute", "name=\"" + attName + "\" value=\"" + value + "\"", 0, 0); } else { super.attribute(nameCode, typeCode, value, locationId, properties); } }
public void attribute(int nameCode, int typeCode, CharSequence value, int locationId, int properties) throws XPathException { if (contentStarted) { String attName = getNamePool().getDisplayName(nameCode); processingInstruction("attribute", "name=\"" + attName + "\" value=\"" + value + "\"", 0, 0); } else { 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. * * @param name The name of the attribute * @param typeCode The type of the attribute * @param value * @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 */ @Override public void attribute(NodeName name, SimpleType typeCode, CharSequence value, Location locationId, int properties) throws XPathException { if (level == 0) { failed = true; XPathException err = new XPathException("Cannot serialize a free-standing attribute node (" + name + ')', "SENR0001"); err.setLocation(locationId); throw err; } try { super.attribute(name, typeCode, value, locationId, properties); } catch (XPathException e) { failed = true; throw e; } }
/** * Notify an attribute. Attributes are notified after the startElement event, and before any * children. Namespaces and attributes may be intermingled. * * @param name The name of the attribute * @param typeCode The type of the attribute * @param value * @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 */ @Override public void attribute(NodeName name, SimpleType typeCode, CharSequence value, Location locationId, int properties) throws XPathException { if (level == 0) { failed = true; XPathException err = new XPathException("Cannot serialize a free-standing attribute node (" + name + ')', "SENR0001"); err.setLocation(locationId); throw err; } try { super.attribute(name, typeCode, value, locationId, properties); } catch (XPathException e) { failed = true; throw e; } }
/** * Notify an attribute. Attributes are notified after the startElement event, and before any * children. Namespaces and attributes may be intermingled. * @param nameCode The name of the attribute * @param typeCode The type of the attribute * @param value The attribute value * @param locationId The location of the attribute * @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 */ @Override public void attribute(NodeName nameCode, SimpleType typeCode, CharSequence value, Location locationId, int properties) throws XPathException { checksum ^= hash(nameCode, sequence); checksum ^= hash(value, sequence); if (DEBUG) { System.err.println("After attribute " + nameCode.getDisplayName() + ": " + checksum + "(" + hash(nameCode, sequence) + "," + hash(value, sequence) + ")"); } 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 an attribute. Attributes are notified after the startElement event, and before any * children. Namespaces and attributes may be intermingled. * @param nameCode The name of the attribute * @param typeCode The type of the attribute * @param value The attribute value * @param locationId The location of the attribute * @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 */ @Override public void attribute(NodeName nameCode, SimpleType typeCode, CharSequence value, Location locationId, int properties) throws XPathException { checksum ^= hash(nameCode, sequence); checksum ^= hash(value, sequence); if (DEBUG) { System.err.println("After attribute " + nameCode.getDisplayName() + ": " + checksum + "(" + hash(nameCode, sequence) + "," + hash(value, sequence) + ")"); } 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); } }