Re: Re[4]: <key> problems.

Kevin Burges <xmldude@burieddreams.com> writes:

> >> <Check FormIDRef="FORM_2" FieldIDRef="FIELD_1"/>
> >> 
> >> I need to check in this case that FIELD_1 exists within FORM_2.
> >> 
> >> Are you saying I cannot do this at present? I thought that was the
> >> point of having multiple <field xpath=""> elements?
> 
> HST> The point of that is to identify something that has a multipart key.
> HST> Your Field doesn't have it's own multipart key, it has a cascaded or
> HST> multi-stage key -- first find Form with this key, then find Field with 
> HST> _this_ key.  That's what's not supported yet, sorry.
> 
> I *think* I understand what you're saying here but maybe not because
> it still seems to me that I should be able to do what I want, at least
> in part.
> 
> I understand that a single key cannot assert the uniqueness of FormIDs
> and FieldIDs within those, as that would be a multi-stage key. Lets
> assume this uniqueness does not exist, and something like this was valid:
> 
> <IDs>
>   <Form FormID="FORM_1">
>     <Field FieldID="FIELD_1"/>
>   </Form>
>   <Form FormID="FORM_2">
>     <Field FieldID="FIELD_1"/>
>   </Form>
>   <Form FormID="FORM_1">  <!-- NOTE: FORM_1 again -->
>     <Field FieldID="FIELD_2"/>
>   </Form>
> </IDs>
> 
> Could I not have a multipart key which consists of:
>   {@FormID @FieldID}
> 
> which in this example would give:
>   {FORM_1 FIELD_1}
>   {FORM_2 FIELD_1}
>   {FORM_1 FIELD_2}

Sorry not to be clearer.  Yes, in principle, but no in practice, _for
the Field element_.  The decision to eliminate _inter alia_ '..' from
the XPath expression subset for fields and selectors was made to put a 
reasonable bound on the cost of implementation to streaming
processors.

Note you _can_ do this if it's _Form_ elements which are uniquely
keyed by the pair.

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/

Received on Monday, 19 November 2001 11:30:45 UTC