addComponent(qn);
}
private void init( Map<String, String> namespaces, String path ) {
//TODO : compute better length
final FastStringBuffer token = new FastStringBuffer(path.length());
int pos = 0;
while (pos < path.length()) {
final char ch = path.charAt(pos);
switch (ch) {
case '*':
addComponent(WILDCARD);
token.setLength(0);
pos++;
break;
case '/':
final String next = token.toString();
token.setLength(0);
if (next.length() > 0)
{addComponent(namespaces, next);}
if (path.charAt(++pos ) == '/')
{addComponent(SKIP);}
break;
default:
token.append(ch);
pos++;
}
}
if (token.length() > 0)
{addComponent(namespaces, token.toString());}
}