Wednesday, March 7, 2012

Include, Import and ReDefine

I read somewhere here by one of the members of the engine team that
they supported nested schemas but not includes. My problem is I'm
about 7 different schemas which all have includes. Something like
this:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xsi:schemaLocation="aCompany http://aCompanyxsd/DW1/Schemas/ASubDivision/DWLetter.xsd"
xmlns="aCompany" in the root element of the XML instance.
Within the aComany namespace schema is an include as well as an import
and a redefine. I'm wondering how other people deal with this kind of
situtation. Is there a work around. Also, is there a plan to support
complex schemas in Katmai?
Any replies welcome
Hello dba,

> I read somewhere here by one of the members of the engine team that
> they supported nested schemas but not includes. My problem is I'm
> about 7 different schemas which all have includes. Something like
> this:
<xsd:include>, <xsd:key>, <xsd:keyref>, <xsd:redefine>, and <xsd:unique>
are not supported. Import works but only if the reference schema is cataloged
into the same XML schema collection.

> Within the aComany namespace schema is an include as well as an import
> and a redefine.
My typically solution to this depends on if you are simply validating or
depending on the XSD to provide uniquness to the SQL definition. If simply
validating the easy work-around is to create a function in SQLCLR that consumes
the XML and the schema from the database and use

> I'm wondering how other people deal with this kind of
> situtation. Is there a work around. Also, is there a plan to support
> complex schemas in Katmai?
I doubt this will change for Katmai.
Thanks!
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/
|||Books online provides code to resolve the includes into a single XML Schema.
And no, we are not planning to support xs:include or xs:redefine in the next
version either.
If you want us to consider this in a future release, please file a feedback
item at http://connect.microsoft.com/sqlserver/feedback with your sample
schemas and - preferably - some motivations why these schemas are using
xs:redefine and xs:include.
Thanks and best regards
Michael
"Kent Tegels" <ktegels@.develop.com> wrote in message
news:18f2bcb115c588c97ccb8626890c@.news.microsoft.c om...
> Hello dba,
>
> <xsd:include>, <xsd:key>, <xsd:keyref>, <xsd:redefine>, and <xsd:unique>
> are not supported. Import works but only if the reference schema is
> cataloged into the same XML schema collection.
>
> My typically solution to this depends on if you are simply validating or
> depending on the XSD to provide uniquness to the SQL definition. If simply
> validating the easy work-around is to create a function in SQLCLR that
> consumes the XML and the schema from the database and use
> I doubt this will change for Katmai.
> Thanks!
> Kent Tegels
> DevelopMentor
> http://staff.develop.com/ktegels/
>

No comments:

Post a Comment