     xpath = xpath.replace /\/$/, ''
     xpath
 
-  jq = this.map ->
+  jq = $el.map ->
     path = getPathTo this
 
     path

# relativeRoot - The root node for the xpath
#
# Returns a string
simpleXPathJQuery = (relativeRoot) ->
  jq = this.map ->
    path = ''
    elem = this


# relativeRoot - The root node for the xpath
#
# Returns a string
simpleXPathPure = ($el, relativeRoot) ->

  getPathSegment = (node) ->
    name = getNodeName node
