/** * Add a new declaration to the current scope. This is visible within * the current scope as well as from any nested scopes. * * @param prefix the prefix to be used for this namespace * @param uri the namespace name of this namespace. */ public synchronized void add(String prefix, String uri) { top.add(new NSDecl(prefix, uri)); }
public NSDecl(String pfx, String ur) { if (pfx == null) { this.prefix = "".intern(); } else { this.prefix = pfx.intern(); } this.uri = ur.intern(); this.hashCode = (toString()).hashCode(); }
/** * Return the prefix associated with the given namespace name by * looking thru all the namespace declarations that are in scope. * * @param uri the namespace name for whom a declared prefix is desired * @return the prefix or null if namespace name not found */ public synchronized String getPrefix(String uri) { for (int i = size - 1; i >= 0; i--) { List<NSDecl> scope = stack.get(i); ListIterator<NSDecl> lsIterator = scope.listIterator(); while (lsIterator.hasNext()) { NSDecl nsd = lsIterator.next(); if (nsd.getUri().equals(uri)) { return nsd.getPrefix(); } } } return null; }
/** * Return the prefix associated with the given namespace name by * looking thru all the namespace declarations that are in scope. * * @param uri the namespace name for whom a declared prefix is desired * @return the prefix or null if namespace name not found */ public synchronized String getPrefix(String uri) { for (int i = size - 1; i >= 0; i--) { List<NSDecl> scope = stack.get(i); ListIterator<NSDecl> lsIterator = scope.listIterator(); while (lsIterator.hasNext()) { NSDecl nsd = lsIterator.next(); if (nsd.getUri().equals(uri)) { return nsd.getPrefix(); } } } return null; }
/** * Return the prefix associated with the given namespace name by * looking thru all the namespace declarations that are in scope. * * @param uri the namespace name for whom a declared prefix is desired * @return the prefix or null if namespace name not found */ public synchronized String getPrefix(String uri) { for (int i = size - 1; i >= 0; i--) { List<NSDecl> scope = stack.get(i); ListIterator<NSDecl> lsIterator = scope.listIterator(); while (lsIterator.hasNext()) { NSDecl nsd = lsIterator.next(); if (nsd.getUri().equals(uri)) { return nsd.getPrefix(); } } } return null; }
public NSDecl(String pfx, String ur) { if (pfx == null) { this.prefix = "".intern(); } else { this.prefix = pfx.intern(); } this.uri = ur.intern(); this.hashCode = (toString()).hashCode(); }
/** * Add a new declaration to the current scope. This is visible within * the current scope as well as from any nested scopes. * * @param prefix the prefix to be used for this namespace * @param uri the namespace name of this namespace. */ public synchronized void add(String prefix, String uri) { top.add(new NSDecl(prefix, uri)); }
/** * Return the namespace name associated with the given prefix by * looking thru all the namespace declarations that are in scope. * * @param prefix the prefix for whom a declared namespace name is desired * @return the namespace name or null if prefix not found */ public synchronized String getURI(String prefix) { for (int i = size - 1; i >= 0; i--) { List<NSDecl> scope = stack.get(i); ListIterator<NSDecl> lsIterator = scope.listIterator(); while (lsIterator.hasNext()) { NSDecl nsd = lsIterator.next(); if (nsd.getPrefix().equals(prefix)) { return nsd.getUri(); } } } return null; }
public NSDecl(String pfx, String ur) { if (pfx == null) { this.prefix = "".intern(); } else { this.prefix = pfx.intern(); } this.uri = ur.intern(); this.hashCode = (toString()).hashCode(); }
/** * Add a new declaration to the current scope. This is visible within * the current scope as well as from any nested scopes. * * @param prefix the prefix to be used for this namespace * @param URI the namespace name of this namespace. */ public synchronized void add(String prefix, String uri) { top.add(new NSDecl(prefix, uri)); }
/** * Return the prefix associated with the given namespace name by * looking thru all the namespace declarations that are in scope. * * @param uri the namespace name for whom a declared prefix is desired * @return the prefix or null if namespace name not found */ public synchronized String getPrefix(String uri) { for (int i = size - 1; i >= 0; i--) { List<NSDecl> scope = stack.get(i); ListIterator<NSDecl> lsIterator = scope.listIterator(); while (lsIterator.hasNext()) { NSDecl nsd = lsIterator.next(); if (nsd.getUri().equals(uri)) { return nsd.getPrefix(); } } } return null; }
public NSDecl(String pfx, String ur) { if (pfx == null) { this.prefix = "".intern(); } else { this.prefix = pfx.intern(); } this.uri = ur.intern(); this.hashCode = (toString()).hashCode(); }
/** * Add a new declaration to the current scope. This is visible within * the current scope as well as from any nested scopes. * * @param prefix the prefix to be used for this namespace * @param uri the namespace name of this namespace. */ public synchronized void add(String prefix, String uri) { top.add(new NSDecl(prefix, uri)); }
/** * Return the namespace name associated with the given prefix by * looking thru all the namespace declarations that are in scope. * * @param prefix the prefix for whom a declared namespace name is desired * @return the namespace name or null if prefix not found */ public synchronized String getURI(String prefix) { for (int i = size - 1; i >= 0; i--) { List<NSDecl> scope = stack.get(i); ListIterator<NSDecl> lsIterator = scope.listIterator(); while (lsIterator.hasNext()) { NSDecl nsd = lsIterator.next(); if (nsd.getPrefix().equals(prefix)) { return nsd.getUri(); } } } return null; }
public NSDecl(String pfx, String ur) { if (pfx == null) { this.prefix = "".intern(); } else { this.prefix = pfx.intern(); } this.uri = ur.intern(); this.hashCode = (toString()).hashCode(); }
/** * Add a new declaration to the current scope. This is visible within * the current scope as well as from any nested scopes. * * @param prefix the prefix to be used for this namespace * @param uri the namespace name of this namespace. */ public synchronized void add(String prefix, String uri) { top.add(new NSDecl(prefix, uri)); }
/** * Return the namespace name associated with the given prefix by * looking thru all the namespace declarations that are in scope. * * @param prefix the prefix for whom a declared namespace name is desired * @return the namespace name or null if prefix not found */ public synchronized String getURI(String prefix) { for (int i = size - 1; i >= 0; i--) { List<NSDecl> scope = stack.get(i); ListIterator<NSDecl> lsIterator = scope.listIterator(); while (lsIterator.hasNext()) { NSDecl nsd = lsIterator.next(); if (nsd.getPrefix().equals(prefix)) { return nsd.getUri(); } } } return null; }
/** * Return the namespace name associated with the given prefix by * looking thru all the namespace declarations that are in scope. * * @param prefix the prefix for whom a declared namespace name is desired * @return the namespace name or null if prefix not found */ public synchronized String getURI(String prefix) { for (int i = size - 1; i >= 0; i--) { List<NSDecl> scope = stack.get(i); ListIterator<NSDecl> lsIterator = scope.listIterator(); while (lsIterator.hasNext()) { NSDecl nsd = lsIterator.next(); if (nsd.getPrefix().equals(prefix)) { return nsd.getUri(); } } } return null; }
/** * Return the namespace name associated with the given prefix by * looking thru all the namespace declarations that are in scope. * * @param prefix the prefix for whom a declared namespace name is desired * @return the namespace name or null if prefix not found */ public synchronized String getURI(String prefix) { for (int i = size - 1; i >= 0; i--) { List<NSDecl> scope = stack.get(i); ListIterator<NSDecl> lsIterator = scope.listIterator(); while (lsIterator.hasNext()) { NSDecl nsd = lsIterator.next(); if (nsd.getPrefix().equals(prefix)) { return nsd.getUri(); } } } return null; }
/** * Return the prefix associated with the given namespace name by * looking thru all the namespace declarations that are in scope. * * @param URI the namespace name for whom a declared prefix is desired * @return the prefix or null if namespace name not found */ public synchronized String getPrefix(String uri) { for (int i = size - 1; i >= 0; i--) { List<NSDecl> scope = stack.get(i); ListIterator<NSDecl> lsIterator = scope.listIterator(); while (lsIterator.hasNext()) { NSDecl nsd = lsIterator.next(); if (nsd.getUri().equals(uri)) { return nsd.getPrefix(); } } } return null; }