/** computes a combined child content pattern and (,if possible,) its continuation. */ public ExpressionPair get(Expression combinedPattern, StartTagInfo info) { StringPair sp = null; // check the cache if (combinedPattern.verifierTag != null) { OptimizationTag ot = (OptimizationTag)combinedPattern.verifierTag; sp = new StringPair(info.namespaceURI, info.localName); OptimizationTag.OwnerAndCont cache = (OptimizationTag.OwnerAndCont)ot.transitions.get(sp); if (cache != null) { // cache hit numElements = 1; result[0] = cache.owner; return new ExpressionPair(cache.owner.contentModel.getExpandedExp(pool), cache.continuation); } } ExpressionPair r = (ExpressionPair)get(combinedPattern, info, true); if (numElements == 1) { // only one element matchs this tag name. cache this result OptimizationTag ot = (OptimizationTag)combinedPattern.verifierTag; if (ot == null) combinedPattern.verifierTag = ot = new OptimizationTag(); if (sp == null) sp = new StringPair(info.namespaceURI, info.localName); ot.transitions.put(sp, new OptimizationTag.OwnerAndCont(result[0], r.continuation)); } return r; }
/** computes a combined child content pattern and (,if possible,) its continuation. */ public ExpressionPair get(Expression combinedPattern, StartTagInfo info) { StringPair sp = null; // check the cache if (combinedPattern.verifierTag != null) { OptimizationTag ot = (OptimizationTag)combinedPattern.verifierTag; sp = new StringPair(info.namespaceURI, info.localName); OptimizationTag.OwnerAndCont cache = (OptimizationTag.OwnerAndCont)ot.transitions.get(sp); if (cache != null) { // cache hit numElements = 1; result[0] = cache.owner; return new ExpressionPair(cache.owner.contentModel.getExpandedExp(pool), cache.continuation); } } ExpressionPair r = (ExpressionPair)get(combinedPattern, info, true); if (numElements == 1) { // only one element matchs this tag name. cache this result OptimizationTag ot = (OptimizationTag)combinedPattern.verifierTag; if (ot == null) combinedPattern.verifierTag = ot = new OptimizationTag(); if (sp == null) sp = new StringPair(info.namespaceURI, info.localName); ot.transitions.put(sp, new OptimizationTag.OwnerAndCont(result[0], r.continuation)); } return r; }
/** computes a combined child content pattern and (,if possible,) its continuation. */ public ExpressionPair get(Expression combinedPattern, StartTagInfo info) { StringPair sp = null; // check the cache if (combinedPattern.verifierTag != null) { OptimizationTag ot = (OptimizationTag)combinedPattern.verifierTag; sp = new StringPair(info.namespaceURI, info.localName); OptimizationTag.OwnerAndCont cache = (OptimizationTag.OwnerAndCont)ot.transitions.get(sp); if (cache != null) { // cache hit numElements = 1; result[0] = cache.owner; return new ExpressionPair(cache.owner.contentModel.getExpandedExp(pool), cache.continuation); } } ExpressionPair r = (ExpressionPair)get(combinedPattern, info, true); if (numElements == 1) { // only one element matchs this tag name. cache this result OptimizationTag ot = (OptimizationTag)combinedPattern.verifierTag; if (ot == null) combinedPattern.verifierTag = ot = new OptimizationTag(); if (sp == null) sp = new StringPair(info.namespaceURI, info.localName); ot.transitions.put(sp, new OptimizationTag.OwnerAndCont(result[0], r.continuation)); } return r; }
/** computes a combined child content pattern and (,if possible,) its continuation. */ public ExpressionPair get(Expression combinedPattern, StartTagInfo info) { StringPair sp = null; // check the cache if (combinedPattern.verifierTag != null) { OptimizationTag ot = (OptimizationTag)combinedPattern.verifierTag; sp = new StringPair(info.namespaceURI, info.localName); OptimizationTag.OwnerAndCont cache = (OptimizationTag.OwnerAndCont)ot.transitions.get(sp); if (cache != null) { // cache hit numElements = 1; result[0] = cache.owner; return new ExpressionPair(cache.owner.contentModel.getExpandedExp(pool), cache.continuation); } } ExpressionPair r = (ExpressionPair)get(combinedPattern, info, true); if (numElements == 1) { // only one element matchs this tag name. cache this result OptimizationTag ot = (OptimizationTag)combinedPattern.verifierTag; if (ot == null) combinedPattern.verifierTag = ot = new OptimizationTag(); if (sp == null) sp = new StringPair(info.namespaceURI, info.localName); ot.transitions.put(sp, new OptimizationTag.OwnerAndCont(result[0], r.continuation)); } return r; }