parent = tag.getParent();
parent = parent.getParent();
    public static TopicMapObject getTypeableObject(TagSupport tag) throws JellyTagException{                Tag parent = tag.getParent();        while( parent != null) {            if(parent instanceof ContextTopic){                return ((ContextTopic)parent).getTopic();            }            else if(parent instanceof ContextAssociation){                return ((ContextAssociation)parent).getAssociation();            }            else if(parent instanceof ContextOccurrence){                return ((ContextOccurrence)parent).getOccurrence();            }                        parent = tag.getParent();                    }                        return null;    }