@Override public final boolean eq( final Item it, final Collation coll, final StaticContext sc, final InputInfo ii) throws QueryException { return it.type.isUntyped() ? coll == null ? Token.eq(string(), it.string(ii)) : coll.compare(string(), it.string(ii)) == 0 : it.eq(this, coll, sc, ii); }
@Override public final int diff(final Item it, final Collation coll, final InputInfo ii) throws QueryException { return it.type.isUntyped() ? coll == null ? Token.diff(string(), it.string(ii)) : coll.compare(string(), it.string(ii)) : -it.diff(this, coll, ii); }
/** * Creates annotation child elements. * * @param anns annotations * @param parent parent element * @param uri include uri * @throws QueryException query exception */ final void annotation(final AnnList anns, final FElem parent, final boolean uri) throws QueryException { for (final Ann ann : anns) { final FElem annotation = elem("annotation", parent); if (ann.sig != null) { annotation.add("name", ann.sig.id()); if (uri) annotation.add("uri", ann.sig.uri); } else { annotation.add("name", ann.name.string()); if (uri) annotation.add("uri", ann.name.uri()); } for (final Item it : ann.args) { final FElem literal = elem("literal", annotation); literal.add("type", it.type.toString()).add(it.string(null)); } } }