[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: [relax-ng] ooRelaxNG (was: Limitation ...)
On Sat, 8 Jun 2002 16:11:00 -0400 (EDT) John Cowan <jcowan@reutershealth.com> wrote: > > It seems to me, though, that it's fully determined from the element > name what the class must be, as far as RNG validation is concerned. > The instance-to-class link is essentially the element-to-element type link. I don't understand your argument. I don't think classes can be determined from variables. In o-o programming languages, we have variables, classes, and objects. When we declare an instance variable "foo" and associate a class "Foo" with this variable, we allow instances of subclasses of "Foo", for example class "Bar". We can represent both tag names and class names in the XML syntax. This approach requires alternate nesting of var names and class names. For example, <variable name="foo"><instance class="Bar">....</instance></variable> we can certainly use class and variable names as tag names. This leads to <foo><Bar>....</Bar></foo>. If we omit the start tag <Bar> and end tag </Bar>, I do not think we can determine the actual class of the object bounded to the variable "foo". By the way, the XML Schema WG thinks that representing both variables and classes in the instance is redundant. Thus, they omitted class names. The class declared for a variable is determined from the variable name, but the class bounded to this variable cannot be determined. In the example, we can find the class Foo from the variable foo, but cannot know that this instance is of the class Bar. To remedy this problem, the XML Schema WG introduced xsi:type. I think that this is disastrous. Cheers, -- MURATA Makoto (FAMILY Given) <EB2M-MRT@asahi-net.or.jp>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC