Beispiel #1
0
 /**
  * Decode a name based on the runtime namespace map.
  *
  * @param name the encoded name
  * @return the decoded qualified name
  * @throws DecoderException of decoding the local part of the name fails
  */
 public static QName decode(String name) throws DecoderException {
   int pos = name.indexOf('_'); // find first underscore
   String local;
   String ns = XMLConstants.NULL_NS_URI;
   if (pos < 0) {
     local = ONameUtil.decodeName(name);
   } else {
     ns = IDS.getObject(name.substring(0, pos));
     local = ONameUtil.decodeName(name.substring(pos + 1));
   }
   return new QName(ns, local);
 }