// scoping behavior when used with the Stack
// drop through on purpose
case END_TAG:
- ns = t.prefix==null?"":nss.get(t.prefix); // Get the namespace from prefix (if exists)
+ ns = t.prefix==null||nss==null?"":nss.get(t.prefix); // Get the namespace from prefix (if exists)
break;
default:
ns = "";
if(type==0) {
type=START_TAG;
}
- tag.state|=type; // add the appropriate Tag States
+ if(tag!=null) {
+ tag.state|=type; // add the appropriate Tag States
+ }
return tag;
}