Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


global Elem names globally unique Re: SV: Element names guidelines

From: Burak Emir <Burak.Emir@----.-->
To: Bryan Rasmussen <brs@----.-->
Date: 11/23/2004 11:46:00 AM
Bryan Rasmussen wrote:

>
>
>You have an element that you want to match the concept car description how
>would you naturally embody that concept in xml?
>
>wouldn't it be 
><car>
><description></description>
></car> 
>(obviously there are numerous designs patterns that one might use but I will
>stick with this one for the point of this post)
>
>  
>
This makes sense to me.

>Instead what seems to happen with structures where xml schema is used is
>that you get naming conventions like this
>
><Car>
><CarDescription></CarDescription>
></Car> 
>
>In fact this is the naming convention where I work.
>
>  
>
I find that redundant, but you seem to be aware of the problem.

>this naming convention seems to be related to naming conventions often used
>in certain object oriented languages and of course in that we want to be
>  
>
Well, it is not related to the languages at all, this is an issue of 
modelling things, and giving names to elements of the model.

>able to say that a description of a car has various limitations on it that a
>generic description might not. (Which in the case of my work is also related
>to naming and design rules that do not allow local declaration of elements
>but require all elements to be globally declared)
>  
>
You are admonishing the restriction that global element declarations 
introduce element names.
I agree that this is needlessly restrictive, because if element 
references would include the element *type name*, then there would be no 
reason not to allow 20 different element declarations for "description" 
(provided they all declare different, named types). E.g.:

<!-- not legal in XSD -->
<element name="description" type="CarDescType">
<element name="description" type="BikeDescType">
<element name="description" type="FooType">

....<element ref="description" type="FooType"/>....

*However* considering that you can simply write (introducing a local 
element declaration)

....<element name="description" type="FooType"/>....

the problem seems marginal (although it complicates for instance 
generating a schema from a bunch of class definitions).

>I believe that this an example of the drawbacks of xml schema as an xml
>validation language, not to mention its drawbacks as a language in the areas
>of data typing, and data binding descriptions. 
>
>  
>
I would not go that far. It is rather a drawback of your naming and 
design rules.

Indirectly, one could say if it is hard to make reasonable naming and 
structuring conventions, than the language does not provide a great help 
to structuring (which comes back to the problem of element references 
above).

What could be the rationale for this restriction, namely that globally 
declared element names must be unique ? Is it because globally declared 
elements may appear as the root (couldn't an attribute root=true have 
done that job)? Is it to make element references simpler? For uniformity?

kind regards,
Burak Emir
--

Burak Emir

http://lamp.epfl.ch/~buraq


From Roman.Huditsch@l... Tue Nov 23 11:57:43 2004
Received: from lisa.w3.org ([128.30.52.41])
	by frink.w3.org with


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent