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] Fw: commens on RELAX NG specification..

Forwarded by Kohsuke Kawaguchi <kohsuke.kawaguchi@sun.com>
----------------------- Original Message -----------------------
 From:    Murali Mani <mani@CS.UCLA.EDU>
 To:      <kk@kohsuke.org>,
 Date:    Thu, 8 Aug 2002 09:33:11 -0700 (PDT)
 Subject: commens on RELAX NG specification..

editorial comments:

(1) Section 6.2.8, semantics titled data2

I think your second antecedent should be (not (cx |- {};s =~p)
that is you should not have a

The remaining two are simple typos:
(2) Section 4.5
... (at the time of writing (rather than "at the term of writing")...

(3) Section 6.2.7. 1st para 3rd sentence
On the other hand ... (rather than "On the hand"..)

that is all the mistakes I could find trying hard to find them.. :)

The spec is really good... the simplification rules and the order, I
wonder how anyone could have thought through this whole process.

Also, suitability of RELAX NG for data modeling... (Note: I met Kohsuke,
and he mentioned other possible ways of doing this. What I mean by this is
ability to infer entity types and relationship types from a relax ng
grammar. Kohsuke mentioned that we can probably do annotations and use
them to infer, that is very possible)..

Anyways, what are entity types and relationship types?

Let us consider a simple example -- students and professors. in other
words we have student entities and professor entities, also every student
entity is related to a professor entity by the relationship advisor.. Also
let us introduce some attributes also, every student has an attribute
Sname, professor has an attribute Pname, and the relationship has an
attribute Since, which gives the year from which the professor was an
advisor for the student. Also let us restrict that a student can have one
and exactly one advisor.

an example, let us consider three student entities
Dongwon Lee
Yun Chi

two professor entities

relationship be described as
Dongwon Lee	Chu	1997
Yun Chi		Muntz	2000
Murali		Muntz	1998

How can we represent the same in XML??
      <Sname>Yun Chi</Sname>
      <Sname>Dongwon Lee</Sname>

Now let us go back to original entities, we can describe this using ER
diagram using entity types and relationship types as

student ----------- ADVISOR ----------- professor
	   (1,1)		(0,n)

here the cardinality means, a particular student participates once, and
exactly once in the relationship...

Can we do the modeling using RELAX NG. Yes -- there are two questions -

(1) a profesor has two child elements -- Pname, student -- in this case
Pname is an attribute of professor and student is another entity.. how do
we distinguish between them..

(2) Another question is -- student has two child elements again -- Sname,
Since -- Sname is an attribute of student, and Since is an attribute of
the relationship.. how do we distinguish them.

the answer to (1) is - consider the full syntax for relax ng, we will
define names for professor and student, and we will not define a name for
Pname, Sname, Since.. this is one technique utilizing the relax ng syntax
to infer Entity types and relationship types. Kohsuke suggested that we
can also use annotations for the same.. that is fine...

The answer to (2) is -- relational schema also does not make this
distinction, and no one really seems to care... of course, kohsuke's
suggestion of using annotations will work even here..

I think this is long enough.. Murata-san, there was one more thing.. I
think we are ready with the paper, right?? what is the next step?? do you
wish to do one more teleconference, are there more things to be worked

thanks and regards - murali.
--------------------- Original Message Ends --------------------

Sun Microsystems                   kohsuke.kawaguchi@sun.com

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

Powered by eList eXpress LLC