OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng message

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


Subject: [relax-ng] Some ideas about simple type assignment


I propose some design goals:

- It should be possible to do simple type assignment
  without validation, which is sometimes too heavy and 
  not available in your favorite programming language.

- Given an instance, it should be easy for average progammers
  to implement simple type assignment.  Undestanding of
  theoretical computer science (e.g., automata) should not be
  required.

- Given a schema as well as some auxiliary descripsions for
  simple type assignment, it should be possible to 
  tell whether simple type assignment is possible for ANY 
  instance.


I would suggest that we use collections of path-datatype pairs
together wth RELAX NG Schemas.  Here is an example of such a
collection


	@a       int
	a/@b     int
	a/b/c    float
	a/b/c/@d  short
  
The first line asserts that every attribute named "a" is of
the datatype "int".  The second asserts that every attribute
named "b" of any element named "a" is of the datatype "int".
Some software program should ensure that these assersions are
correct with respect to a given schema.  This is certainly
possible.

Once these assertions are guranteed to be correct, everybody
can implement simple type assignment.  Thus, I do not think we
need standard APIs or have to materialize the result of simple
type assignment by adding foreign attributes.

It is possible to slightly extend this by allowing "//"
everywhere, for example.  But I think that fixed paths are good
enough and I like very ad-hoc solutions or very generalized
solutions.

Cheers,

Makoto


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


Powered by eList eXpress LLC