I'll start with the fact that I'm using CREATE XML SCHEMA COLLECTION schemas_tmp_name AS N'<?xml version="1.0" encoding="UTF-8" standalone="no"?>...'
to create the initial schema, then adding to it by using ALTER XML SCHEMA COLLECTION schemas_tmp_name ADD '<?xml version="1.0" encoding="UTF-8"?>...'
Also (and as a response to you're second post) I was planing to insert data as you suggested but first create the table as you may see in the following example, this will allow SQL to parse XML data accordingly:CREATE TABLE XML_table(ID int, XML_data xml(schemas_tmp_name))
Errors:* "The XML Schema syntax '<xsd:include>' is not supported." ~ solution: removal of all "include" tags and related files were to be added individually (that was the plan).* "XML parsing: line 1, character 38, unable to switch the encoding" ~ although encoding was converted to UTF-8 (from UTF-16) in notepad++, SQL would NOT accept it and seems to insist that encoding declaration stays point at UTF-16 (I would prefer UTF-8 but for quick resolution declared UTF-16).* "Reference to an undefined name 'some_random_var'" ~ (some_random_var may very for each schema) my guess would be that the specific missing definition is defined in one of the other schema files ... not sure that this is the case but that's where I'm stuck as of now.