schema collection problem?



Hi...

I've been playing with some samples and I've noticed something that looks
like a bug. I created a schema collection like this:

create xml schema collection testcoll2 as
'<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
<xsd:simpleType name="noContent">
<xsd:restriction base="xsd:string">
<xsd:length value="1" />
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";
elementFormDefault="qualified" xmlns="http://ex.org/LogansRun";
targetNamespace="http://ex.org/LogansRun";>
<xsd:element name="age">
<xsd:simpleType>
<xsd:restriction base="xsd:float">
<xsd:minInclusive value="0" />
<xsd:maxInclusive value="30" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:schema>'

but when I fetch a schema back out, the return drops the elementFormDefault
value; this seems like it could lead to some serious problems if one wants to
use SQL Server 2005 as a schema store for other applications. Any idea why
SQL Server isn't returning a functionally equivalent schema to what's put in?

Here's what is returned by
select xml_schema_namespace ('dbo','testcoll2')

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
<xsd:simpleType name="noContent">
<xsd:restriction base="xsd:string">
<xsd:length value="1" />
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:t="http://ex.org/LogansRun"; targetNamespace="http://ex.org/LogansRun";>
<xsd:element name="age">
<xsd:simpleType>
<xsd:restriction base="xsd:float">
<xsd:minInclusive value="0" />
<xsd:maxInclusive value="30" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:schema>

I haven't done other tests to see whether the changing of my default
namespace designation to a named one (xmlns="" to xmlns:t="") would cause
problems; I haven't put in any refs or other examples to exercise that. But
the omission of the elementFormDefault="qualified" seems like a significant
functional discrepancy.

any thoughts?

Thanks
-mark

.



Relevant Pages

  • Re: multityped column
    ... top-level elements in your XML column. ... schema collection. ... will it result in a noticable performance ...
    (microsoft.public.sqlserver.xml)
  • Re: xs:import does not work in SQLServer2005???
    ... > are you telling me that I need to add all the other schema I referenced ... Other than the built-in namespaces (XSD types, SQL types, and XML ... added it the same schema collection. ... you will not be able to reference GML components even if you have added the ...
    (microsoft.public.sqlserver.xml)
  • Re: modifying attributes of a Schema collection XML
    ... require you to create a new schema collection and then alter the data to be ... representing the XML Schema itself, if you want to do it programmatically. ...
    (microsoft.public.sqlserver.xml)
  • Re: Do promoted properties show up in HAT Message Context property
    ... The schema collection of my receive pipeline had the message schema but not ... As soon as I put in the property schema the ... in the message context of the HAT message records. ...
    (microsoft.public.biztalk.general)
  • Re: multiple cascade paths
    ... You should not have them if your schema is designed properly. ... make you understand that I tried to show that a proper design can have ... am a SQL Server MVP, for crying out loud - you can safely assume that I ...
    (comp.databases.ms-sqlserver)