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] Re: Some ideas about type-assignment

> > All these things seem to point toward the constraint we discussed for
> > ID/IDREF...
> If we consider type-assignment for data binding tools, everything becomes 
> more difficult.  I have a feeling that we have to drop or weaken my second goal 
> "Type-assignment should be useful for data binding tools".  I will soon 
> write my understanding of data binding for relaxer.  Since you have done
> more work than me about type assignment for data binding, your opinion 
> is very welcome.

It seems to me that there are many different levels of type-assignment.

The first, easier level would be just determine declarations for
elements, attributes, and possibly for texts. This can be done easily
and useful for things like schema-guided editor or XQuery.

For it to be useful for data-binding tools, I think what we need is
"start-end detection" (for lack of better word) where the receiver would
like to know when a new primitive starts and when it ends.

With the following grammar,

<element name="foo" id="p1">
  <oneOrMore id="p2">
    <element name="bar" id="p3"><empty id="p4"/></element>

and the following instance:


Such a type assignment produces:

start(p1) start(p2)
  start(p3) start(p4) end(p4) end(p3) 
  start(p3) start(p4) end(p4) end(p3) 
end(p2) end(p1)

This is pretty much what RelaxNGCC does internally (so as JAXB RI), and
I believe the algorithm is the same for Relaxer as well.

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