Basic XMLSchema questions

Alan Santos asantos at odi.com
Wed Jan 5 20:15:28 GMT 2000


Thanks for the quick response Brett.

In the example below, I understand the point of <datatype>,
but what is <type> getting us?  Don't you have the same thing without it?


> for example:
>
> <element name="myElement">
>   <type>
>     <element name="nestedElement" type="string" />
>     <element name="anotherNestedElement" type="string" />
>     <attribute name="isPrimary">
>       <datatype content="empty" />
>     </attribute>
>     <attribute name="focus">
>       <datatype content="NMTOKENS">
>         <enumeration value="Java" />
>         <enumeration value="C" />
>         <enumeration value="XML" />
>       </datatype>
>     </attribute>
>   </type>
> </element>
>

> Your schema is one-to-one with a Java class?  This wouldn't be a good
> idea, unless I'm misunderstanding your intent.  Maybe your _XML_ is
> based on a class, and it specifies the class, but then multiple XML docs
> (therefore multiple classes) all use the same Schema.
>


The _XML_ contains instances.  But felt it was more appropriate within the
schema document.  (Or some other xml instance document)

Why do you feel it is a poor decision?
Am I abusing the intent of  an XML Schema in a horrible manner?
Perhaps XMI is a better option for my needs?

> Why not?  What's the difference in your mind?  If you can define an
> infinite number of types, and define an infinite number of elements with
> any defined type, how is that not flexible?

Sorry, it is flexible, it just means more work for me, and users of my
application.

Now we need two elements  when we wish to add a new type to the schema
(unless I'm missing something else)

(e.g. <element name="xxxReference"/>
<element name="xxx"/>)


thanks,
alan



xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo at ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)





More information about the Xml-dev mailing list