- From: Nick Spadaccini <nick@cs.uwa.edu.au>
- Date: Thu, 6 Sep 2001 00:22:39 -0400 (EDT)
- To: <xmlschema-dev@w3.org>
As a relative newcomer to XML I hope what I am asking below makes sense. I am sure if it doesn't I will be enlightened in due course. Back in July and August there were threads initiated by Casey Mullins and Dave Gross concerning personal namespace attributes to the XML Schema. Namely defining a schema schema that allowed you to use your own attribute names and values in the xsd:element entity. Whatever replies there were, were of the variety "Yeh that looks correct", or "As I understand it, you can do what you have done", followed up by "but I don't think any of the validators will handle it" - or similar responses. As someone who is trying to extend the attributes of the XML Schema in a pretty extensive way, I really need to know if what I am doing is valid, makes sense, or is the best way to do it. The last of these will come with experience but the first two need reliable software that will help me. I too want to be able to add attributes to my schema definitions. I already use a "dictionary" to define a data model and these dictionaries can even contain user defined imbedded methods. Needless to say our system is not based on XML and predates XML by many years. However part of our system can be mapped to an XML Schema, but with some extensions. In our "dictionary" I can declare a data object's structure extensively, as in, TypeContainer = "Matrix" (or possibly List, Tuple, Vector etc) ContainerDimension = "[3][3]" (or whatever). TypeContainerElements = "Real" (integer etc) In the context of XML I think (at this stage) what I want to do is, <xsd:element name="TransformMatrix" me:TypeContainer="Matrix" me:ContainerDimension="[3][3]" me:TypeContainerElements="Real" /> The last attribute is probably best handled by xsd:type since it will cover everything I need. I think I can define my new attributes with either their allowed enumeration or a pattern that matches against a legitimate string. (1) Can anyone tell me is there a validator that will read my schema extensions, and when given an instance schema will validate that the new attributes are valid AND that the attribute values are valid? (2) On a related topic, is it possible for me to define in a schema schema an new entity say <DictionaryDefn> that extends the xsd:element entity, so that in the instance schema, when the validator sees <DictionaryDefn> it knows it has to process it in exactly (in a semantic sense) the same way as an the xsd:element entity. I am pretty sure I know how to do this in a syntactic sense but if the validator doesn't appreciate I am subclassing off the xsd:element (its attributes AND its methods etc) there is little point in doing it - make sense? (3) If the answer to (1) is positive, then the next thing to do is to validate an instance document with my schema. I have a clear cut specification for what a Matrix must look like as data. How does the validator know? If in my schema I define an entity to be Integer then the validator presumably can look at the data instance of that entity and verify it is indeed Integer. How can it do this for my "Matrix"? Perhaps I am asking too much of generic XML validators. -- cheers Nick -------------------------------- Dr Nick Spadaccini (Acting Head - 2001) Department of Computer Science & voice: +(61 8) 9380 3452 Software Engineering fax: +(61 8) 9380 1089 University of Western Australia CRAWLEY, Perth, WA 6009 email: nick@cs.uwa.edu.au AUSTRALIA w3: www.cs.uwa.edu.au/~nick
Received on Thursday, 6 September 2001 04:20:33 UTC