protected static String nameToId(String name) {
        try {
            return URLEncoder.encode(name, "UTF-8");
        } catch (UnsupportedEncodingException e) {
            // should not happen
            throw new RuntimeException("Unsupported encoding", e);
        }
    }
protected static String nameToId ( String name ) { try { return URLEncoder . encode ( name , "UTF-8" ) ; } catch ( UnsupportedEncodingException e ) { throw new RuntimeException ( "Unsupported encoding" , e ) ; } }
utility methods to convert between a document name and a form that eXist accepts (ie URL-encoded)