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

        literalTypes: $scope.rdf.propertyLiteralTypes

      w = $window.open ''
      $scope.mapping = $scope.sml.toSml mapping
      $scope.transform.getDumpUrl $scope.mapping
        .then (url) ->
          w.location = url



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