- From: Rob Sanderson via GitHub <sysbot+gh@w3.org>
- Date: Tue, 03 Nov 2015 00:58:45 +0000
- To: public-annotation@w3.org
azaroth42 has just created a new issue for https://github.com/w3c/web-annotation: == Simplification: Multiple Selectors == An outstanding issue for discussion has been the tradeoffs between clarity and simplicity for multiple selectors or making uber-selectors that try to encompass all the known information somehow. For example, in order to say even "Get the text from this XPath and then take the character range between these positions" currently requires an oa:List with two Selectors. For something that seems an important feature to enable, the concern was about the complexity of the current situation and whether there was an alternative. Given #92, a new pattern is even more desirable. Proposal: Mint a new hasSubSelector predicate range and domain of Selector to chain multiple selectors together in order: ``` { "type": "SpecificResource", "selector": [ { "type": "FragmentSelector", "value": "namedSection", "subSelector": { "type": "TextPositionSelector", "start": 5 // relative to target#namedSelection "end": 28 } }, { "type": "TextQuoteSelector", "exact": "quote in namedSelection" } ] } ``` This has the advantages: * No additional List construction * Doesn't invert the ordering like having a SpecificResource as the source of a SpecificResource would. (e.g. above is do this, then do this... the SR version is to start at the bottom and work back up) * Multiple selectors would be interpreted legitimately as a Choice -- this specific resource has this selector and independently it has this other selector. So long as they're actually reasonable alternatives, the lack of ordering is inconsequential. Note: There is an open question about States. If you have both an HttpRequestState and a TimeState, that would be interpreted as a choice of State not both. It's not clear (I believe) in any of the versions of Open Annotation how multiple States should be interpreted, and this should also be resolved. `subState` would enforce an ordering in the same way as above. See https://github.com/w3c/web-annotation/issues/93
Received on Tuesday, 3 November 2015 00:58:48 UTC