XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Terminology: Maximum Constraint? Maximal Constraint?Strongest Constraint? Tightest Constraint?

On 05/02/2010 11:32, Costello, Roger L. wrote:
> Hi Folks,
>
> I am seeking the correct (or best) terminology.
>
> Suppose that in my business I need to do things with person last names. That manifests in a requirement for a<last-name>  element. So, I create an XML Schema that declares a last-name element, e.g.,
>
>        <element name="last-name" type="string" />
>
> But, that declaration is not acceptable. I do not want the value of<last-name>  to be any unbounded string. I want to constrain the value of<last-name>.
>
> I consult the experts and they inform that, for my business, last names should not be longer than 26 characters, and they should only consist of the characters a-z, A-Z, hyphen, and apostrophe.
>
> So, here is how I declare<last-name>:
>
>        <element name="last-name">
>            <simpleType>
>                <restriction base="string">
>                    <maxLength value="26" />
>                    <pattern value="[a-zA-Z'-]+" />
>                </restriction>
>            </simpleType>
>        </element>
>

Can't help but comment on how politically incorrect such a schema is.
It's (normally) better to use something like family-name rather than 
last-name if it is the family information that you want rather than the 
word that happens to come last in some conventional display order.
Also of course such a pattern restriction cuts out most of the
world's population.

http://blog.jclark.com/2007/12/thai-personal-names.html

For example


> Thus, rather than allowing the value of<last-name>  to be any string, I have restricted the values. I restricted<last-name>  to the greatest extent possible. That is, if I were to set maxLength to less than 26, to, say, 25, then my element declaration would reject some legitimate last name values. Or, if I were to omit, say, the apostrophe from the pattern facet then some legitimate values would be rejected.
>
> Okay, now to my terminology questions.
>
> QUESTION #1
>
> I constrained<last-name>  to the greatest extent possible, such that any tighter constraints would break rules of my business. What is the correct (or best) term for "the greatest extent possible?" How would you fill in this blank?
>
>        ________ constraint
>
> Here are some terms that came to mind:
>
>        Maximum constraint
>        Maximal constraint
>        Tightest constraint
>        Strongest constraint
>

I'd say strongest (but also strongly advise that the business rule is 
changed)

> Which is the correct (or best) term: maximum, maximal, tightest, or strongest? Or, perhaps there's another term that I haven't considered?
>
>
> QUESTION #2
>
> My XML Schema declaration expresses the limitations on the value of this element:
>
>        <last-name>____________</last-name>
>
> What is the correct (or best) term for "limitations?" How would you fill in this blank?
>
>        ________ on the value
>
> Here are some terms that came to mind:
>
>        Constraints on the value
>        Restrictions on the value
>        Limitations on the value
>
> Which is the correct (or best) term: constraints, restrictions, or limitations? Or, perhaps there's another term that I haven't considered?
>

any of those (probably I wouldn't use the last).

>
> QUESTION #3
>
> Are constraints *applied* to elements? Or, are constraints *imposed* on elements? How would you fill in the blank?
>
>        ________ constraints
>
> Here are some terms that came to mind:
>
>        Apply constraints
>        Impose constraints
>
> Which is the correct (or best) term: apply or impose? Or, perhaps there's another term that I haven't considered?
If you are only doing schema validation you are not forcing the data to 
conform to the constraint, just reporting whether it does or not, so I'd 
say the schema processor reports whether or not the constraints are 
violated. Or more simply just use the terminology given and say the 
schema processor validates the document.
>
>
> /Roger

David
> _______________________________________________________________________

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS