     startTagOpenDeriv: 0
   }
 
+  resetObjects = ->
+    uniqueIndex = 0
+    indexCount = {}
+
+    patternIntern = {
+      internSuccess: 0,
+      internCheck: 0,
+      attributeShutDown: 0,
+      startTagOpenDeriv: 0
+    }
+
+  setSkipAttributes = (skip) =>
+    prevSkip = skipAttributes
+    skipAttributes = !!skip
+    return prevSkip
+
   setDebug = (debug) =>
+    prevDebug = DEBUG
     DEBUG = debug
-    return DEBUG
+    return prevDebug
 
   ### @private ###
   _nodelog = (node, message...) =>

      patt = @startTagOpenDeriv(node)
      if patt instanceof NotAllowed
        return patt
      for attr in h.getNodeAttributes(node)
        patt = patt.attDeriv(attr)
        if patt instanceof NotAllowed

        h.getNodeAttr(node, "type"), h.getNodeAttr(node, "ns"), children[0])
      when 'list' then new List children[0]
      when 'attribute'
        if skipAttributes
        new Empty("#{attr}")
        else
          attr = new Attribute children[0], children[1]
        attr
      when 'ref' then new Ref h.getNodeAttr(node, "name"), defines
      when 'oneOrMore' then new OneOrMore children[0]
