 import ModelIO
 import Fuzi
 import Spectra
+import Swinject
 import simd
 
 class SpectraXMLSpec: QuickSpec {
     
     override func spec() {
+        let parser = Container()
+        
+        let spectraEnumData = SpectraXSD.readXSD("SpectraEnums")
+        let spectraEnumXSD = SpectraXSD(data: spectraEnumData)
+        spectraEnumXSD.parseEnumTypes(parser)
+        
         let testBundle = NSBundle(forClass: SpectraXMLSpec.self)
         let xmlData: NSData = SceneGraphXML.readXML(testBundle, filename: "SceneGraphXMLTest")
-        let spectraXML = SpectraXML(data: xmlData)
+        let assetContainer = Container(parent: parser)
+        
+        let spectraXML = SpectraXML(parser: parser, data: xmlData)
+        
+        let attrPos = MDLVertexAttribute(name: MDLVertexAttributePosition, format: MDLVertexFormat.Float4, offset: 0, bufferIndex: 0)
+        let attrRgb = MDLVertexAttribute(name: MDLVertexAttributeColor, format: MDLVertexFormat.Float4, offset: 0, bufferIndex: 1)
+        let attrTex = MDLVertexAttribute(name: MDLVertexAttributeTextureCoordinate, format: MDLVertexFormat.Float2, offset: 0, bufferIndex: 2)
+        let attrAniso = MDLVertexAttribute(name: MDLVertexAttributeAnisotropy, format: MDLVertexFormat.Float4, offset: 0, bufferIndex: 3)
+
+        // let vertexDescriptor: MTLDescriptor
         
         // TODO: move this to a new file?
         describe("parser can register new D/I handlers for XML tags") {

        
        describe("vertex-descriptor") {
            it("can parse vertex descriptor with references to vertex attributes") {
                
            }
            
            it("can parse vertex descriptor, mixing references with new attributes") {

            }
        }
        
        describe("SpectraXMLNodeTuple") {
            it("can recursively resolve dependencies using (construct, meta)") {
                
            }
        }
        
        describe("vertex-attribute") {
            it("can parse vertex attribute nodes") {
                
            }
