Lines Matching refs:prefix
128 * @param prefix
129 * If non-null and non-empty, this prefix is bound to the URI
134 * If this parameter is null, the runtime will allocate an unique prefix.
136 * Used only when the prefix parameter is null. If true, this indicates
137 * that the non-empty prefix must be assigned to this URI. If false,
142 public NamespaceDecl addNamespaceDecl(String uri, String prefix,boolean requirePrefix) {
149 throw new IllegalArgumentException("The empty namespace cannot have a non-empty prefix");
150 if(prefix!=null && prefix.length()>0)
151 throw new IllegalArgumentException("The empty namespace can be only bound to the empty prefix");
152 prefix = "";
158 if(prefix==null) {
163 if(n.prefix==null) {
165 n.prefix = prefix;
169 if(prefix.equals(n.prefix)) {
175 if(prefix!=null && n.prefix!=null && n.prefix.equals(prefix))
177 "Prefix '"+prefix+"' is already bound to '"+n.uri+'\'');
180 NamespaceDecl ns = new NamespaceDecl(document.assignNewId(),uri,prefix,requirePrefix);
243 if(ns.prefix!=null)
244 // if the prefix has already been declared, use it.
245 return ns.prefix;