@Override public void replay(Receiver out) throws XPathException { out.attribute(name, type, value, location, properties); } }
@Override public void attribute(NodeName nameCode, SimpleType typeCode, CharSequence value, int locationId, int properties) throws XPathException { reciever.attribute(nameCode, typeCode, value, locationId, properties); }
/** * Output an attribute */ public void attribute(int nameCode, int typeCode, CharSequence value, int locationId, int properties) throws XPathException { if ((nameCode & NamePool.FP_MASK) == xmlspace && value.equals("preserve") && suppressedAtLevel < 0) { // Note, we are suppressing indentation within an xml:space="preserve" region even if a descendant // specifies xml:space="default suppressedAtLevel = level; } nextReceiver.attribute(nameCode, typeCode, value, locationId, properties); }
public void attribute(int nameCode, int typeCode, CharSequence value, int locationId, int properties) throws XPathException { // test for xml:space="preserve" | "default" if ((nameCode & 0xfffff) == StandardNames.XML_SPACE) { if (value.toString().equals("preserve")) { stripStack[top] |= PRESERVE_PARENT; } else { stripStack[top] &= ~PRESERVE_PARENT; } } nextReceiver.attribute(nameCode, typeCode, value, locationId, properties); }
/** * Output an attribute */ public void attribute(NodeName nameCode, SimpleType typeCode, CharSequence value, Location locationId, int properties) throws XPathException { nextReceiver.attribute(nameCode, typeCode, normalize(value, (properties & ReceiverOptions.USE_NULL_MARKERS) != 0), locationId, properties); }
public void attribute(NodeName nameCode, SimpleType typeCode, CharSequence value, Location locationId, int properties) throws XPathException { // test for xml:space="preserve" | "default" if (nameCode.equals(XML_SPACE)) { if (Whitespace.normalizeWhitespace(value).equals("preserve")) { stripStack[top] |= PRESERVE_PARENT; } else { stripStack[top] &= ~PRESERVE_PARENT; } } nextReceiver.attribute(nameCode, typeCode, value, locationId, properties); }
@Override protected void markAsEscaped(CharSequence escaped, boolean isKey) throws XPathException { if (containsEscape(escaped.toString()) && escape) { NodeName name = isKey ? escapedKeyQN : escapedQN; out.attribute(name, validate ? BOOLEAN_TYPE : SIMPLE_TYPE, "true", ExplicitLocation.UNKNOWN_LOCATION, 0); } }
/** * Output an attribute */ public void attribute(int nameCode, int typeCode, CharSequence value, int locationId, int properties) throws XPathException { nextReceiver.attribute(nameCode, typeCode, normalizer.normalize(value), locationId, properties); }
public void onGroupStart(int groupNumber) throws XPathException { out.startElement(groupName, groupType, ExplicitLocation.UNKNOWN_LOCATION, 0); out.attribute(groupNrName, groupNrType, "" + groupNumber, ExplicitLocation.UNKNOWN_LOCATION, 0); out.startContent(); }
/** * Copy this node to a given outputter */ public void copy(Receiver out, int whichNamespaces, boolean copyAnnotations, int locationId) throws XPathException { int nameCode = tree.attCode[nodeNr]; int typeCode = (copyAnnotations ? getTypeAnnotation() : -1); out.attribute(nameCode, typeCode, getStringValue(), locationId, 0); }
public void addAttribute(NodeName elemName, SimpleType typeCode, String newValue) { try { receiver.attribute(elemName, typeCode, newValue, VoidLocation.instance(), 0); } catch (XPathException e) { throw new XProcException(e); } }
/** * Copy this node to a given outputter */ public void copy(Receiver out, int whichNamespaces, boolean copyAnnotations, int locationId) throws XPathException { int nameCode = getNameCode(); int typeCode = (copyAnnotations ? getTypeAnnotation() : -1); out.attribute(nameCode, typeCode, getStringValue(), locationId, 0); }
/** * Handle an attribute */ public void attribute(int nameCode, int typeCode, CharSequence value, int locationId, int properties) throws XPathException { int nc = newPool.allocate(oldPool.getPrefix(nameCode), oldPool.getURI(nameCode), oldPool.getLocalName(nameCode)); nextReceiver.attribute(nc, typeCode, value, locationId, properties); }
/** * Copy this node to a given outputter */ public void copy(/*@NotNull*/ Receiver out, int copyOptions, Location locationId) throws XPathException { SimpleType typeCode = (CopyOptions.includes(copyOptions, CopyOptions.TYPE_ANNOTATIONS) ? ((SimpleType) getSchemaType()) : BuiltInAtomicType.UNTYPED_ATOMIC); out.attribute(NameOfNode.makeName(this), typeCode, getStringValue(), locationId, 0); }
/** * Copy this node to a given outputter */ public void copy(/*@NotNull*/ Receiver out, int copyOptions, Location locationId) throws XPathException { SimpleType typeCode = CopyOptions.includes(copyOptions, CopyOptions.TYPE_ANNOTATIONS) ? (SimpleType) getSchemaType() : BuiltInAtomicType.UNTYPED_ATOMIC; out.attribute(NameOfNode.makeName(this), typeCode, getStringValue(), locationId, 0); }
/** * Copy this node to a given outputter */ public void copy(/*@NotNull*/ Receiver out, int copyOptions, Location locationId) throws XPathException { SimpleType typeCode = CopyOptions.includes(copyOptions, CopyOptions.TYPE_ANNOTATIONS) ? (SimpleType) getSchemaType() : BuiltInAtomicType.UNTYPED_ATOMIC; out.attribute(NameOfNode.makeName(this), typeCode, getStringValue(), locationId, 0); }
public void addAttribute(XdmNode xdmattr, String newValue) { NodeInfo inode = xdmattr.getUnderlyingNode(); NodeName attrName = NameOfNode.makeName(inode); SimpleType typeCode = (SimpleType) inode.getSchemaType(); try { receiver.attribute(attrName, typeCode, newValue, VoidLocation.instance(), 0); } catch (XPathException e) { throw new XProcException(e); } }
/** * Handle an attribute */ public void attribute(NodeName name, SimpleType type, CharSequence value, Location location, int properties) throws XPathException { checkType(type); int fp = newPool.allocateFingerprint(name.getURI(), name.getLocalPart()); nextReceiver.attribute(new CodedName(fp, name.getPrefix(), newPool), type, value, location, properties); }
public void addAttribute(QName attrName, String newValue) { NodeName elemName = new FingerprintedQName(attrName.getPrefix(),attrName.getNamespaceURI(),attrName.getLocalName()); SimpleType typeCode = (SimpleType) BuiltInType.getSchemaType(StandardNames.XS_UNTYPED_ATOMIC); try { receiver.attribute(elemName, typeCode, newValue, VoidLocation.instance(), 0); } catch (XPathException e) { throw new XProcException(e); } }
public void addAttribute(QName attrName, String newValue) { NodeName elemName = new FingerprintedQName(attrName.getPrefix(),attrName.getNamespaceURI(),attrName.getLocalName()); SimpleType typeCode = (SimpleType) BuiltInType.getSchemaType(StandardNames.XS_UNTYPED_ATOMIC); try { receiver.attribute(elemName, typeCode, newValue, VoidLocation.instance(), 0); } catch (XPathException e) { throw new XProcException(e); } }