SystemDefinitionModel and Databases
I'd like to be able to store SDM Models in an SQL Server database.
However, the SDM Schema uses a processContents='lax' in a couple of places. this is not a supported schema element for use in Xml schema collection within SQL Server 2005. Aside from not assigning an Xml Schema to the column in the database table, are there any recommendations for an approach to be taken here?
Regards
Stef Shoffren
Stef,First of all, your workaround (i.e. not assigning the XML Shema..) is a valid approach. The problem you presented has already been noted, and planned for a future release. However, we hope that the workarounds are acceptable.
Here is what was suggested by SQL team:
"The recommendations depend on what you want to achieve with the schema:
- If you want to use it for validation, the recommendation is that you do not associate the schema with the XML datatype through a schema collection. Instead, validate the XML on the client-side before passing it into the table or write a CLR UDF that performs the validation as a constraint check.
- If you want to use it for typing of the other part of the data, we recommend to do 1 to get the validation and then use a schema that replaces the lax with skip to get the other parts of the schema typed correctly."
I will post more feedback from MS as it becomes available, but let me know if this is not sufficient.Best Regards,
Dmitriy Nikonov