support the XML Schema xs:NOTATION datatype; but I'm having a hard time
finding that page again. I was able to locate a page in BOL
(http://msdn2.microsoft.com/en-us/library/ms191231.aspx) that indicates type
casting to/from xs:NOTATION is not supported, but need to know is
xs:NOTATION actually supported at all? Any references to this information
(one way or the other) is appreciated.
Thanks!
Hi Mike
On the page you posted
http://msdn2.microsoft.com/en-us/library/ms191231.aspx :
"xs:NOTATION and the fully ordered subtypes of duration,
xdt:yearMonthDuration and xdt:dayTimeDuration, are not supported. As a
result, casting to or from these types is not supported."
On http://msdn2.microsoft.com/pt-br/library/ms189547.aspx
"Constructors are supported for base and derived atomic XSD types. However,
the subtypes of xs:duration, which includes xdt:yearMonthDuration and
xdt:dayTimeDuration, and xs:QName, xs:NMTOKEN, and xs:NOTATION are not
supported. User-defined atomic types that are available in the associated
schema collections are also available, provided they are directly or
indirectly derived from the following types."
John
"Mike C#" wrote:
> I thought I read in BOL that SQL 2K5's XQuery implementation does not
> support the XML Schema xs:NOTATION datatype; but I'm having a hard time
> finding that page again. I was able to locate a page in BOL
> (http://msdn2.microsoft.com/en-us/library/ms191231.aspx) that indicates type
> casting to/from xs:NOTATION is not supported, but need to know is
> xs:NOTATION actually supported at all? Any references to this information
> (one way or the other) is appreciated.
> Thanks!
>
>
|||"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:A04FBA1C-8FB5-4461-83D3-201B858C672F@.microsoft.com...
> Hi Mike
> On the page you posted
> http://msdn2.microsoft.com/en-us/library/ms191231.aspx :
> "xs:NOTATION and the fully ordered subtypes of duration,
> xdt:yearMonthDuration and xdt:dayTimeDuration, are not supported. As a
> result, casting to or from these types is not supported."
Thanks, that seems to indicate xs:NOTATION is not supported at all. The
fact that xs:NOTATION is included in the chart at the top of that page seems
to contradict that wording though...
> On http://msdn2.microsoft.com/pt-br/library/ms189547.aspx
> "Constructors are supported for base and derived atomic XSD types.
> However,
> the subtypes of xs:duration, which includes xdt:yearMonthDuration and
> xdt:dayTimeDuration, and xs:QName, xs:NMTOKEN, and xs:NOTATION are not
> supported. User-defined atomic types that are available in the associated
> schema collections are also available, provided they are directly or
> indirectly derived from the following types."
Here's where the confusion comes in - xs:NOTATION is either supported (as a
virtual base type, as indicated on the chart on the first page and alluded
to in the quote from the second page), or it's not supported at all (as
indicated by the wording on the first page).
I assume the statement from the second page doesn't really indicate that
xs:NOTATION itself is not supported, but rather that an xs:NOTATION
constructor is not supported. That's based on the fact that xs:QName *is*
supported (though no constructor), and it's listed in the same sentence
where it says "...are not supported."
Mostly I think I'm just a victim of poor wording. xs:NOTATION constructor
and xs:NOTATION casting are clearly not supported, but is xs:NOTATION itself
(even as a virtual base type) supported or not?
|||Hi Mike
I think overall if you add everything up then you have to say there is no
support at all. There is no constructor so you can't create anything of that
type, you can not cast to or from so even if you had something of that type
you can't do much with it.
Have you tried using it?
John
"Mike C#" wrote:
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:A04FBA1C-8FB5-4461-83D3-201B858C672F@.microsoft.com...
> Thanks, that seems to indicate xs:NOTATION is not supported at all. The
> fact that xs:NOTATION is included in the chart at the top of that page seems
> to contradict that wording though...
>
> Here's where the confusion comes in - xs:NOTATION is either supported (as a
> virtual base type, as indicated on the chart on the first page and alluded
> to in the quote from the second page), or it's not supported at all (as
> indicated by the wording on the first page).
> I assume the statement from the second page doesn't really indicate that
> xs:NOTATION itself is not supported, but rather that an xs:NOTATION
> constructor is not supported. That's based on the fact that xs:QName *is*
> supported (though no constructor), and it's listed in the same sentence
> where it says "...are not supported."
> Mostly I think I'm just a victim of poor wording. xs:NOTATION constructor
> and xs:NOTATION casting are clearly not supported, but is xs:NOTATION itself
> (even as a virtual base type) supported or not?
>
>
|||"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:AC29C43A-7507-48AF-A419-3015A4654597@.microsoft.com...
> Hi Mike
> I think overall if you add everything up then you have to say there is no
> support at all. There is no constructor so you can't create anything of
> that
> type, you can not cast to or from so even if you had something of that
> type
> you can't do much with it.
> Have you tried using it?
Consider xs:QName: ( no constructor for xs:QName + no casting to or from an
xs:QName from any other type ) != no support at all. xs:QName is definitely
supported.
I haven't tried using xs:NOTATION directly, since the chart indicates it's a
"virtual base type". Presumably other types can be created from it. I
figured the good folks from Microsoft who visit these newsgroups might be
able to shed some light on how it might be used at all if it is supported as
a "virtual base type", or explain the apparent discrepancy in the
documentation if it's not supported at all.
Thanks.
|||"Mike C#" <xyz@.xyz.com> wrote in message
news:uzrl9$HHHHA.3872@.TK2MSFTNGP06.phx.gbl...
> Consider xs:QName: ( no constructor for xs:QName + no casting to or from
> an xs:QName from any other type ) != no support at all. xs:QName is
> definitely supported.
> I haven't tried using xs:NOTATION directly, since the chart indicates it's
> a "virtual base type". Presumably other types can be created from it. I
> figured the good folks from Microsoft who visit these newsgroups might be
> able to shed some light on how it might be used at all if it is supported
> as a "virtual base type", or explain the apparent discrepancy in the
> documentation if it's not supported at all.
>
I just ran a simple test for xs:NOTATION, and the result was SQL giving me
the error message "NOTATION not supported". So it looks like it doesn't
support xs:NOTATION at all. Someone at MS should fix that chart on the
XQuery datatypes casting page.
Thanks for the help!
|||Hi Mike
The chart shows casting between QNs so it would indicate some support! It
may be interesting to see what happens if you try to construct one!!
You could try sending feedback on this using the contact us option at the
bottom of the page.
John
"Mike C#" wrote:
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:AC29C43A-7507-48AF-A419-3015A4654597@.microsoft.com...
> Consider xs:QName: ( no constructor for xs:QName + no casting to or from an
> xs:QName from any other type ) != no support at all. xs:QName is definitely
> supported.
> I haven't tried using xs:NOTATION directly, since the chart indicates it's a
> "virtual base type". Presumably other types can be created from it. I
> figured the good folks from Microsoft who visit these newsgroups might be
> able to shed some light on how it might be used at all if it is supported as
> a "virtual base type", or explain the apparent discrepancy in the
> documentation if it's not supported at all.
> Thanks.
>
>
|||"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:7C916F7A-ED18-46E3-86F4-4E5B2E93D1A5@.microsoft.com...
> Hi Mike
> The chart shows casting between QNs so it would indicate some support! It
> may be interesting to see what happens if you try to construct one!!
> You could try sending feedback on this using the contact us option at the
> bottom of the page.
>
Hi John
QN's don't have a constructor function per se, but there is an F&O function
to create a QN. The QN casting is strictly QN to QN. The xs:NOTATION
doesn't even work with the "instance of" operator (which was my test), and
it comes back with the error message stating explicitly that no support for
xs:NOTATION exists, so that's what I'm going with

Thanks
|||The first thing to test is, if the type is supported in XML Schema
collections... and it is not.
CREATE XML SCHEMA COLLECTION SCX AS
N'<xsd:schema targetNamespace="urn:example/customer"
xmlns:e="urn:example/customer"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xsd:element name="buys" type="xsd:NOTATION"/>
</xsd:schema>'
returns
Msg 9337, Level 16, State 1, Line 1
The XML Schema type 'NOTATION' is not supported.
Since schema does not support the type, XQuery does not either.
If this type is important for your scenario, please file a bug report under
http://connect.microsoft.com/sqlserver
Thanks
Michael
"Mike C#" <xyz@.xyz.com> wrote in message
news:%23RoXrrTHHHA.1816@.TK2MSFTNGP06.phx.gbl...
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:7C916F7A-ED18-46E3-86F4-4E5B2E93D1A5@.microsoft.com...
> Hi John
> QN's don't have a constructor function per se, but there is an F&O
> function to create a QN. The QN casting is strictly QN to QN. The
> xs:NOTATION doesn't even work with the "instance of" operator (which was
> my test), and it comes back with the error message stating explicitly that
> no support for xs:NOTATION exists, so that's what I'm going with

> Thanks
>
|||I can work around that limitation for now. It would be nice if they could
refresh the documentation on it to get rid of xs:NOTATION from the chart and
state a little more clearly that it's not supported. Right now the
statement that it's not supported is combined with a couple of other items
that are supported in various fashions, which leads to having to do tests
like this to determine if it actually is supported or not.
Thanks.
"Michael Rys [MSFT]" <mrys@.online.microsoft.com> wrote in message
news:eFSlFP8HHHA.1248@.TK2MSFTNGP03.phx.gbl...
> The first thing to test is, if the type is supported in XML Schema
> collections... and it is not.
> CREATE XML SCHEMA COLLECTION SCX AS
> N'<xsd:schema targetNamespace="urn:example/customer"
> xmlns:e="urn:example/customer"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified">
> <xsd:element name="buys" type="xsd:NOTATION"/>
> </xsd:schema>'
> returns
> Msg 9337, Level 16, State 1, Line 1
> The XML Schema type 'NOTATION' is not supported.
> Since schema does not support the type, XQuery does not either.
> If this type is important for your scenario, please file a bug report
> under http://connect.microsoft.com/sqlserver
> Thanks
> Michael
> "Mike C#" <xyz@.xyz.com> wrote in message
> news:%23RoXrrTHHHA.1816@.TK2MSFTNGP06.phx.gbl...
>
No comments:
Post a Comment