> Two that I can see:  First, this approach would involve a total rewrite of
> schema support; it's not at all obvious to me that much of the X1 code
> could be ported over at all.

I see. This is an understandable reason.


> Secondly, because components can reference
> each other with virtually no regard for order, there's just no way of
> avoiding some kind of in-memory representation; so it's not obvious that
> developing a custom representation for this single purpose is worthwhile.

I thought you would directly construct schema component objects from SAX.
Since XML Schema allows me to write xsi:schemaLocation in the middle of
a document, I assumed that schema component objects support the "late-binding"
mechanism, which solves the forward-reference problems.


> > 3. Do you have any plan to support other schema languages? I have RELAX
> >    NG in my mind.
>
<snip/>
> Clearly we need the design to be sufficiently
> flexible to make this feasible though.

I'm very happy to hear that!




> My understanding of the current approach is that we use an element name to
> identify an appropriate content model. I would think that, for a element
> with content models depending on the presence of given attributes--or of
> attributes with given values--we could have an additional layer, perhaps a
> Hashtable, to identify which content model to use.  Perhaps a different
> ContentModel class would work for this, along the lines of the
> AllContentNodel that we use for elements containing schema <all> models
> currently.  Since we're now validating on-the-way-in, I can't see why this
> wouldn't work.

I admit that my knowledge of the current validation engine of Xerces is
nearly zero. To catch up ths discussion, I skimmed XMLContentModel
interface, but I couldn't see how it supports the "on-the-way-in" style.

Anyway, I am only trying to list gray zones which may make it difficult
for Xerces to support RELAX NG. So I'm glad if all my fears are imaginary.


1.  It seems to me that it is  XMLValidator that decides the content
    model for the elements.  But in RELAX NG, every element declaration
    is local and it is context-sensitive.
    
    Isn't it a problem?  Or will it be implemented along the lines of
    local element declarations of XML Schema? (I don't know how they are
    implemented now)


2.  RELAX NG has the concept of "name class", which is basically a set
    of acceptable names. For example, you can say "any tag name except
    those in XYZ namespace will have this content model". I guess this
    makes it even more unfeasible, if not impossible, to use element
    name to pick up the content model. How do you think about this?





regards,
--
Kohsuke KAWAGUCHI                          +1 650 786 0721
Sun Microsystems                   [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to