Hello,
I figured out how to get the 3.0.0-Beta release of the FSharp.Data installed. It seems to accept my schema XSD files without a hiccup!
My question is this - when using the current stable release XmlProvider with a sample file to create the type rather than a schema, I was able to reference my elements and attributes by name using dot-notation, down through multiple levels, e.g.:
type OdmAudit = XmlProvider<…>
let clinData = OdmAudit.Parse(response)
…clinData.CreationDateTime
but now using the 3.0.0-Beta and creating the type by pointing to an XSD file (which uses other XSD files), I have to refer to my elements and attributes using XElements, e.g.
Hmmm…I lied about it liking my schema, so I’m unsure why I was able to get that top-level attribute at all. Realized I had forgotten the ’ Schema = ’ qualifier n the XmlProvider statement. With that added, and pointing to the top-level XSD file in the schema files received from my vendor, I get:
test_fsharpData_beta.fsx(135,17): error FS3033: The type provider ‘ProviderImplementation.XmlProvider’ reported an error: Cannot read sample XSD from ‘H:/FSharp_Projects/XmlTests/ODMSchema2015.3.0/ODM1.3.1/mdsol.xsd’:
No suitable element definition found in the schema.
Can I use a multi-file schema that uses imports and includes, or do they need to be merged into a single XSD file?