             match.start = start - mapping.start
             match.end = end - mapping.start
             match.wanted = mapping.pathInfo.content.substr match.start, match.end - match.start
+        
         @computeSourcePositions match
         match.yields = mapping.pathInfo.node.data.substr match.startCorrected, match.endCorrected - match.startCorrected
         matches.push match
+#        console.log "Done with " + mapping.pathInfo.path
 
     if matches.length is 0
 #      console.log "Wanted: [" + start + ":" + end + "], found: "

    xpath = xpath.replace /\/$/, ''
    xpath

  collectPathsForNode: (node) ->
    path = @getPathTo node
    cont = @getNodeContent node, false
    if cont.length then @allPaths[path] =
      path: path
      content: cont
      length: cont.length
      node : node
    
    if node.hasChildNodes
      children = node.childNodes
      i = 0
      while i < children.length
        @collectPathsForNode children[i]
        i++
    null


      sourceIndex++
    match.startCorrected = sourceStart
    match.endCorrected = sourceEnd
#    console.log "computeSourcePosition done. Corrected range is: " + match.startCorrected + "-" + match.endCorrected
    null

  # Internal function used to read out the text content of a given node, as render by the browser.
