You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Etienne Roy <er...@us.ibm.com> on 2001/09/19 17:56:24 UTC

Schema design question

Hi all,

I've got the two following ways of building my schema, that would result in
the same instances, and I ned advice on which one would be better (shema,
xerces, performances, validation, etc...)

I have something that looks like:
Element A contains subA + ???
Element B contains subB + ???
Element C contains subC + ???

And basically, subA, subB and subC are very similar: they've got the same
children, the same basic attributes, and a few specific attributes each

I could define a baseSub element, with all the common grammar, and extend
it into subA, subB and subC with their specific features (close to OO
design)
or I could define the three elements subA, subB and subC standalone, so
that there will not be any derivation.

What do you think ?
I'm not familiar enough with Xerces (and Xerces2 soon) to know if there is
a noticeable difference between those two ways... or maybe I'm just
thinking too much ;-)

Thanks for your thoughts

Etienne

PS: I will probably have some more weird questions like that...


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: Schema design question

Posted by Philip Mitchell <ph...@hulmail.harvard.edu>.
I can't comment on performance issues, and I'm not an expert on xschema. 
But I would propose the idea that you keep your implementation simple 
unless there is a significant benefit from using the OO approach. Do you 
anticipate significant maintenance advantages to being able to inherit from 
a base type?

At 11:56 AM 9/19/01 -0400, you wrote:
>Hi all,
>
>I've got the two following ways of building my schema, that would result in
>the same instances, and I ned advice on which one would be better (shema,
>xerces, performances, validation, etc...)
>
>I have something that looks like:
>Element A contains subA + ???
>Element B contains subB + ???
>Element C contains subC + ???
>
>And basically, subA, subB and subC are very similar: they've got the same
>children, the same basic attributes, and a few specific attributes each
>
>I could define a baseSub element, with all the common grammar, and extend
>it into subA, subB and subC with their specific features (close to OO
>design)
>or I could define the three elements subA, subB and subC standalone, so
>that there will not be any derivation.
>
>What do you think ?
>I'm not familiar enough with Xerces (and Xerces2 soon) to know if there is
>a noticeable difference between those two ways... or maybe I'm just
>thinking too much ;-)
>
>Thanks for your thoughts
>
>Etienne
>
>PS: I will probably have some more weird questions like that...
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
>For additional commands, e-mail: xerces-j-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org