/** * Output a comment */ public void comment(CharSequence chars, Location locationId, int properties) throws XPathException { if (level == 0) { if (++count == 2) { checkAllowsMany(locationId); } checkItemType(NodeKindTest.COMMENT, nodeSupplier(Type.COMMENT, null, chars), locationId); } nextReceiver.comment(chars, locationId, properties); }
/** * Character data */ public void characters(CharSequence chars, Location locationId, int properties) throws XPathException { if (level == 0) { if (++count == 2) { checkAllowsMany(locationId); } checkItemType(NodeKindTest.TEXT, nodeSupplier(Type.TEXT, null, chars), locationId); } nextReceiver.characters(chars, locationId, properties); }
/** * Character data */ public void characters(CharSequence chars, Location locationId, int properties) throws XPathException { if (level == 0) { if (++count == 2) { checkAllowsMany(locationId); } checkItemType(NodeKindTest.TEXT, nodeSupplier(Type.TEXT, null, chars), locationId); } nextReceiver.characters(chars, locationId, properties); }
/** * Output a comment */ public void comment(CharSequence chars, Location locationId, int properties) throws XPathException { if (level == 0) { if (++count == 2) { checkAllowsMany(locationId); } checkItemType(NodeKindTest.COMMENT, nodeSupplier(Type.COMMENT, null, chars), locationId); } nextReceiver.comment(chars, locationId, properties); }
/** * Start of a document node. */ public void startDocument(int properties) throws XPathException { if (level == 0) { if (++count == 2) { checkAllowsMany(ExplicitLocation.UNKNOWN_LOCATION); } checkItemType(NodeKindTest.DOCUMENT, nodeSupplier(Type.DOCUMENT, null, ""), ExplicitLocation.UNKNOWN_LOCATION); } level++; nextReceiver.startDocument(properties); }
/** * Start of a document node. */ public void startDocument(int properties) throws XPathException { if (level == 0) { if (++count == 2) { checkAllowsMany(ExplicitLocation.UNKNOWN_LOCATION); } checkItemType(NodeKindTest.DOCUMENT, nodeSupplier(Type.DOCUMENT, null, ""), ExplicitLocation.UNKNOWN_LOCATION); } level++; nextReceiver.startDocument(properties); }
/** * Processing Instruction */ public void processingInstruction(String target, CharSequence data, Location locationId, int properties) throws XPathException { if (level == 0) { if (++count == 2) { checkAllowsMany(locationId); } checkItemType(NodeKindTest.PROCESSING_INSTRUCTION, nodeSupplier(Type.PROCESSING_INSTRUCTION, new NoNamespaceName(target), data), locationId); } nextReceiver.processingInstruction(target, data, locationId, properties); }
/** * Processing Instruction */ public void processingInstruction(String target, CharSequence data, Location locationId, int properties) throws XPathException { if (level == 0) { if (++count == 2) { checkAllowsMany(locationId); } checkItemType(NodeKindTest.PROCESSING_INSTRUCTION, nodeSupplier(Type.PROCESSING_INSTRUCTION, new NoNamespaceName(target), data), locationId); } nextReceiver.processingInstruction(target, data, locationId, properties); }
Token.INTERSECT, new ContentTypeTest(Type.ELEMENT, typeCode, getConfiguration(), false)); checkItemType(type, nodeSupplier(Type.ELEMENT, nodeName, ""), location); } else { if (count == 2) { Token.INTERSECT, new ContentTypeTest(Type.ELEMENT, typeCode, getConfiguration(), false)); checkItemType(type, nodeSupplier(Type.ELEMENT, nodeName, ""), location); checkedElements.add(key);
Token.INTERSECT, new ContentTypeTest(Type.ELEMENT, typeCode, getConfiguration(), false)); checkItemType(type, nodeSupplier(Type.ELEMENT, nodeName, ""), location); } else { if (count == 2) { Token.INTERSECT, new ContentTypeTest(Type.ELEMENT, typeCode, getConfiguration(), false)); checkItemType(type, nodeSupplier(Type.ELEMENT, nodeName, ""), location); checkedElements.add(key);
/** * 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 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 (level == 0) { if (++count == 2) { checkAllowsMany(locationId); } ItemType type = new CombinedNodeTest( new NameTest(Type.ATTRIBUTE, nameCode, getNamePool()), Token.INTERSECT, new ContentTypeTest(Type.ATTRIBUTE, typeCode, getConfiguration(), false)); checkItemType(type, nodeSupplier(Type.ATTRIBUTE, nameCode, value), locationId); } nextReceiver.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 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 (level == 0) { if (++count == 2) { checkAllowsMany(locationId); } ItemType type = new CombinedNodeTest( new NameTest(Type.ATTRIBUTE, nameCode, getNamePool()), Token.INTERSECT, new ContentTypeTest(Type.ATTRIBUTE, typeCode, getConfiguration(), false)); checkItemType(type, nodeSupplier(Type.ATTRIBUTE, nameCode, value), locationId); } nextReceiver.attribute(nameCode, typeCode, value, locationId, properties); }