Re: Determining what facets can operate on what datatype.

Awesome, exactly what I was looking for.

Thanks!


On Mon, Dec 3, 2012 at 5:00 PM, C. M. Sperberg-McQueen <
cmsmcq@blackmesatech.com> wrote:

>
> On Dec 3, 2012, at 2:18 PM, Casey Jordan wrote:
>
> > As I dig deeper into the spec I am finding it hard to easily determine
> what facets are compatible with what datatypes. For instance, the
> definition of length:
> >
> > "For string and datatypes derived from string, length is measured in
> units of characters as defined in [XML 1.0 (Second Edition)]. For hexBinary
> and base64Binary and datatypes derived from them, length is measured in
> octets (8 bits) of binary data. For datatypes derived by list, length is
> measured in number of list items."
> >
> > Indicates to me that minLength, maxLength and fixedLength facets can
> only apply to derivations of String, hexBinary, base64Binary or List types.
> >
> > However, I don't see that explicitly stated anywhere (I am likely
> missing something) which leaves some question to my assumptions as well as
> what to do when encountering other datatypes.
> >
> > Is there information available which I am not seeing or should a way to
> approach this problem that I may not be realizing?
>
> You may find it helpful to consult the table headed "Schema Component
> Constraint: applicable facets" in section 4.1.5 "Constraints on Simple
> Type Definition Components".
>
> http://www.w3.org/TR/xmlschema-2/#defn-coss
>
> On the specific facets you mention: the length facets are specified as
> being legal on all datatypes, but they are not always very meaningful.
> XSD 1.1 specifies the meaning of the length facets more clearly for
> all primitive types (and says explicitly that the length facets are
> always satisfied for QName and NOTATION.
>
> And yes, enumerations are legal on all datatypes, including
> user-defined datatypes.
>
>
> --
> ****************************************************************
> * C. M. Sperberg-McQueen, Black Mesa Technologies LLC
> * http://www.blackmesatech.com
> * http://cmsmcq.com/mib
> * http://balisage.net
> ****************************************************************
>
>
>
>
>


-- 
--
Casey Jordan
easyDITA a product of Jorsek LLC
"CaseyDJordan" on LinkedIn, Twitter & Facebook
(585) 348 7399
easydita.com


This message is intended only for the use of the Addressee(s) and may
contain information that is privileged, confidential, and/or exempt from
disclosure under applicable law.  If you are not the intended recipient,
please be advised that any disclosure  copying, distribution, or use of
the information contained herein is prohibited.  If you have received
this communication in error, please destroy all copies of the message,
whether in electronic or hard copy format, as well as attachments, and
immediately contact the sender by replying to this e-mail or by phone.
Thank you.

Received on Monday, 3 December 2012 22:05:40 UTC