/** * Add a new declaration to the current scope using a unique prefix * and return the prefix. This is useful when one just wants to add a * decl and doesn't want to have to deal with creating unique prefixes. * If the namespace name is already declared and in scope, then the * previously declared prefix is returned. * * @param uri the namespace name of this namespace * @return the unique prefix created or previously declared * for this namespace */ public synchronized String add(String uri) { String uniquePrefix = getPrefix(uri); if (uniquePrefix == null) { do { uniquePrefix = NS_PREFIX_PREFIX + nsPrefixCount++; } while (getURI(uniquePrefix) != null); add(uniquePrefix, uri); } return uniquePrefix; }
/** * Add a new declaration to the current scope using a unique prefix * and return the prefix. This is useful when one just wants to add a * decl and doesn't want to have to deal with creating unique prefixes. * If the namespace name is already declared and in scope, then the * previously declared prefix is returned. * * @param URI the namespace name of this namespace * @return the unique prefix created or previously declared * for this namespace */ public synchronized String add(String uri) { String uniquePrefix = getPrefix(uri); if (uniquePrefix == null) { do { uniquePrefix = NS_PREFIX_PREFIX + nsPrefixCount++; } while (getURI(uniquePrefix) != null); add(uniquePrefix, uri); } return uniquePrefix; }
/** * Add a new declaration to the current scope using a unique prefix * and return the prefix. This is useful when one just wants to add a * decl and doesn't want to have to deal with creating unique prefixes. * If the namespace name is already declared and in scope, then the * previously declared prefix is returned. * * @param uri the namespace name of this namespace * @return the unique prefix created or previously declared * for this namespace */ public synchronized String add(String uri) { String uniquePrefix = getPrefix(uri); if (uniquePrefix == null) { do { uniquePrefix = NS_PREFIX_PREFIX + nsPrefixCount++; } while (getURI(uniquePrefix) != null); add(uniquePrefix, uri); } return uniquePrefix; }
/** * Add a new declaration to the current scope using a unique prefix * and return the prefix. This is useful when one just wants to add a * decl and doesn't want to have to deal with creating unique prefixes. * If the namespace name is already declared and in scope, then the * previously declared prefix is returned. * * @param uri the namespace name of this namespace * @return the unique prefix created or previously declared * for this namespace */ public synchronized String add(String uri) { String uniquePrefix = getPrefix(uri); if (uniquePrefix == null) { do { uniquePrefix = NS_PREFIX_PREFIX + nsPrefixCount++; } while (getURI(uniquePrefix) != null); add(uniquePrefix, uri); } return uniquePrefix; }
/** * Add a new declaration to the current scope using a unique prefix * and return the prefix. This is useful when one just wants to add a * decl and doesn't want to have to deal with creating unique prefixes. * If the namespace name is already declared and in scope, then the * previously declared prefix is returned. * * @param uri the namespace name of this namespace * @return the unique prefix created or previously declared * for this namespace */ public synchronized String add(String uri) { String uniquePrefix = getPrefix(uri); if (uniquePrefix == null) { do { uniquePrefix = NS_PREFIX_PREFIX + nsPrefixCount++; } while (getURI(uniquePrefix) != null); add(uniquePrefix, uri); } return uniquePrefix; }