+ * var workspaceDom = new BlockDefinitionExtractor()
+ * .buildBlockFactoryWorkspace(exampleBlocklyBlock);
+ * Blockly.Xml.domToWorkspace(workspaceDom, BlockFactory.mainWorkspace);
+ *
+ *
+ * The exampleBlocklyBlock is usually the block loaded into the
+ * preview workspace after manually entering the block definition.
+ *
+ * @author JC-Orozco (Juan Carlos Orozco), AnmAtAnm (Andrew n marshall)
+ */
+'use strict';
+
+/**
+ * Namespace for BlockDefinitionExtractor.
+ */
+goog.provide('BlockDefinitionExtractor');
+
+
+/**
+ * Class to contain all functions needed to extract block definition from
+ * the block preview data structure.
+ * @namespace
+ */
+BlockDefinitionExtractor = BlockDefinitionExtractor || Object.create(null);
+
+/**
+ * Builds a BlockFactory workspace that reflects the block structure of the
+ * exmaple block.
+ *
+ * @param {!Blockly.Block} block The reference block from which the definition
+ * will be extracted.
+ * @return {!Element} Returns the root workspace DOM