コード例 #1
0
ファイル: ListFunction.java プロジェクト: BillVelasquez/exist
 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;
 }
コード例 #2
0
 public SaxonRepository(Repository parent) throws PackageException {
   myParent = parent;
   parent.registerExtension(new SaxonPkgExtension());
 }