コード例 #1
0
  private static void qualifyAttribute(
      Element element, String attributeName, String base, Bundle bundle) {
    if (element.hasAttribute(attributeName)) {
      String attributeValue = element.getAttribute(attributeName);
      // if (new IntroURLParser(attributeValue).hasProtocol())
      if (hasProtocol(attributeValue)) {
        return;
      }

      // resolve the resource against the nl mechanism.
      String attributePath = BundleUtil.getResolvedResourceLocation(base, attributeValue, bundle);
      element.setAttribute(attributeName, attributePath);
    }
  }
コード例 #2
0
 private static void qualifyValueAttribute(Element element, String base, Bundle bundle) {
   if (element.hasAttribute(ATT_VALUE)
       && element.hasAttribute(ATT_VALUE_TYPE)
       && element.getAttribute(ATT_VALUE_TYPE).equals("ref") // $NON-NLS-1$
       && element.getLocalName().equals(TAG_PARAM)) {
     String value = element.getAttribute(ATT_VALUE);
     // if (new IntroURLParser(value).hasProtocol())
     if (hasProtocol(value)) {
       return;
     }
     // resolve the resource against the nl mechanism.
     String attributePath = BundleUtil.getResolvedResourceLocation(base, value, bundle);
     element.setAttribute(ATT_VALUE, attributePath);
   }
 }