         literalTypes: $scope.rdf.propertyLiteralTypes
 
       w = $window.open ''
-      $scope.currentMapping = $scope.sml.toSml currentMapping
+      $scope.currentMapping = $scope.sml.toSml mapping
       $scope.transform.getDumpUrl $scope.currentMapping
         .then (url) ->
           w.location = url

        literals: $scope.rdf.propertyLiteralSelection
        literalTypes: $scope.rdf.propertyLiteralTypes
      
      $scope.currentMapping = $scope.sml.toSml currentMapping
      w = $window.open ''
      w.document.open()
      w.document.write '<pre>' + $scope.currentMapping + '</pre>'


      $scope.publishing = false
      $scope.success = true
      $scope.currentMapping = $scope.sml.toSml mapping
      # $scope.transform.publish $scope.currentMapping
