private static String getNamespaceURI(String name, Map<String,String> ns) {
        if(name.startsWith("@"))
            name = name.substring(1);
        if(name.contains("["))
            name = name.substring(0,name.indexOf("["));
        if(name.contains(":"))
            name = name.substring(0,name.indexOf(":"));
        else
            name = null;
        if(!Objects.isNullOrEmpty(name))
            name = ns.get(name);
        return name;
    }
private static String getNamespaceURI ( String name , Map < String , String > ns ) { if ( name . startsWith ( "@" ) ) name = name . substring ( 1 ) ; if ( name . contains ( "[" ) ) name = name . substring ( 0 , name . indexOf ( "[" ) ) ; if ( name . contains ( ":" ) ) name = name . substring ( 0 , name . indexOf ( ":" ) ) ; else name = null ; if ( ! Objects . isNullOrEmpty ( name ) ) name = ns . get ( name ) ; return name ; }
@param name
@param ns
@return