[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: fundamental facets - inquiry from the XMLSchemaWorking Gro


operand operator
i could be way off here - flames accepted, but it seems to me (and it's
certainly my experience) that to get to the next level of anything we
have to be better at all the ontology stuff.

datatypes as we use them aren't very good. the zip code example earlier
is a good example - looks like a number, but isn't and the concept of
2002 - 1075 when they are zip codes (or post codes etc) is meaningless
and we have to be able to express that. adding dates is meaningless (but
subtracting dates is meaningful), but adding days to a date is
meaningful. and dates aren't numbers either.

so you make a database "richer" by adding new domains. whether by
standards decree or by implementor extension is worth the debate (i
favour the former for interoperability reasons) but the basic idea is we
should look at the things we're representing, decide on domains, the
rules of the domains and then they can be implemented.

then we have something.

it's a bit long winded, but we need to say something like:

<domains>
<domain name="integer">
	<operator name="+" type="binary" result="integer">
		<operand domain="integer">
			<valid>integer</valid>
			</operand>
		</operator>
	<operator name="-" type="binary" result="integer">
		<operand domain="integer">
			<valid>integer</valid>
			</operand>
		</operator>
	</domain>

<domain name="date">
	<operator name="+" type="binary" result="date">
		<operand domain="date">
			<valid>integer</valid>
			</operand>
		<operand domain="integer">
			<valid>date</valid>
			</operand>
		</operator>
	<operator name="-" type="binary" result="integer">
		<operand domain="date">
			<valid>date</valid>
			</operand>
		</operator>
	<operator name="-" type="binary" result="date">
		<operand domain="date">
			<valid>integer</valid>
			</operand>
		</operator.
	</domain>
	</domains>

etc

we might even allow for base laws such saying a domain is group, field,
set etc to allow pre defined rules, and similarly expressed validations
- although i think i'm on record here as saying simple validations are
imho of limited value. validations should be expressions between
attributes - much more important.

this could be easily parsed as well.

rick

On Sat, 2003-10-11 at 02:36, Eric van der Vlist wrote:
> On Fri, 2003-10-10 at 18:27, Dare Obasanjo wrote:
> > All of these problems don't matter as much if all you are designing is a validation language. They mainly become problematic when you want to perform operations on these types either in a programming or query language. 
> 
> Really?
> 
> How do you constrain a date in the Japanese calendar or a complex number
> without having either hardcoded these types in your type system or
> defined a system which lets you define new primitive datatypes?
> 
> Eric


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.