[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: attributes containing subordinate attributes
I think this is an instance of a more general problem. It is possible in TREX to write patterns that can never be matched by any input document, because for example: 1. They require attributes containing structure 2. They require duplicate attributes 3. They require infinite structures What should TREX say about these? A related issue is patterns that allow, but do not require impossible things such as 1-3. Murata Makoto wrote: > > The TREX spec allows patterns for attributes > containing subordinate attributes. For example: > > <attribute name="foo"><attribute name="bar"><anyString/></attribute></attribute> > > I do not see any values in allowing attributes to contain subordinate attributes. > Certainly, this is not allowed in XML 1.0. We need to be careful with terminology here. There are two separate issues. 1. Should the TREX data model allow attributes to contain attributes? 2. Should TREX place special restrictions on attribute patterns to make it an error to write "nonsense" patterns, for some appropriate definition of "nonsense"? On 1, the TREX data model does not allow attributes to contain attributes, and so is consistent with XML 1.0. On 2, TREX currently does not have any such restrictions. At the moment, such nonsense patterns will simply fail to match any input document. The difficulty is in coming up with an appropriate definition of "nonsense". I would like to consider this in a general way, rather than on a case by case basis. I am very keen to avoid complicating both the spec and implementations with numerous ad hoc restrictions. > I would argue that such patterns are useless, doubtful, and should be dropped. > > Cheers, > > Makoto
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC