code: public static Map<String, String> getXpathVariables(Map<String, Collection<AttributeBean>> attributeMap) {
          // Set all the bind variables in the query context
  
          Map<String, String> variables = new HashMap<String, String>();
  
          for (String t : targets) {
              int count = 0;
              for (AttributeBean bean : attributeMap.get(t.toLowerCase()
                                                         + "Attributes")) {
                  if (bean.getId().equals(XACML_RESOURCE_ID)) {
                      variables.put("XacmlResourceId", bean.getId());
  
                      if (log.isDebugEnabled()) {
                          log.debug("XacmlResourceId = '" + bean.getId()
                                    + "'");
                      }
  
  
                      int c = 0;
                      for (String value : bean.getValues()) {
                          variables.put("XacmlResourceIdValue"
                                            + c, value);
                          if (log.isDebugEnabled()) {
                              log.debug("XacmlResourceIdValue"
                                        + c + " = '" + value + "'");
                          }
  
  
                          c++;
                      }
                  } else {
                      variables.put(t + "Id" + count,
                                               bean.getId());
  
                      if (log.isDebugEnabled()) {
                          log.debug(t + "Id" + count + " = '" + bean.getId()
                                    + "'");
                      }
  
                      int valueCount = 0;
                      for (String value : bean.getValues()) {
                          variables.put(t + "Id" + count
                                                   + "-Value"
                                                   + valueCount,
                                                   value);
                          if (log.isDebugEnabled()) {
                              log.debug(t + "Id" + count + "-Value"
                                        + valueCount + " = '" + value + "'");
                          }
  
                          valueCount++;
                      }
  
                      count++;
                  }
              }
          }
          return variables;
  
  
      }
docs: FIXME: public for some external testing. -> protected