コード例 #1
0
 private void addVariableAsTargetIfMatches(
     XQueryVarDecl variableDeclaration, String checkedNamespace) {
   if (variableDeclarationWithValidName(variableDeclaration)) {
     XQueryQName<XQueryVarName> source =
         aXQueryQName(myElement.getVarName()).withPrefix(checkedNamespace).build();
     XQueryQName<XQueryVarName> checkedQName =
         aXQueryQName(variableDeclaration.getVarName()).build();
     if (source.equals(checkedQName)) {
       matchingVariableNames.add(checkedQName.getNamedObject());
     }
   }
 }
コード例 #2
0
 private boolean variableDeclarationWithValidName(XQueryVarDecl varDecl) {
   return varDecl.getVarName() != null && varDecl.getVarName().getTextLength() > 0;
 }