/** * TODO: Regarding versionning, see comments of {@link Repository#resolve(String,URISpace)} (AKA * we don't always want the latest version). */ public void registerExtensionFunctions(Configuration config) throws PackageException { for (Packages pp : myParent.listPackages()) { Package pkg = pp.latest(); SaxonPkgInfo info = (SaxonPkgInfo) pkg.getInfo("saxon"); if (info != null) { info.registerExtensionFunctions(config); } } }
public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException { ValueSequence result = new ValueSequence(); try { ExistRepository repo = getContext().getRepository(); Repository parent_repo = repo.getParentRepo(); for (Packages pkg : parent_repo.listPackages()) { String name = pkg.name(); result.add(new StringValue(name)); } } catch (Exception ex) { throw new XPathException("Problem listing packages in expath repository ", ex); } return result; }