- From: Jacob via GitHub <sysbot+gh@w3.org>
- Date: Sat, 23 Jan 2016 17:11:57 +0000
- To: public-annotation@w3.org
So here is a "bad scenario" of multiple choices interweaved through
the proposed pattern.
{
"type": "SpecificResource",
"source": "http://example.org"
"selector": [
{
"type": "foo:QuerySelector",
"value": "knownItem",
"subSelector": [
{
"type": "foo:PageSelector",
"value": "desiredPage",
"subSelector": [
{
"type": "FragmentSelector",
"value": "namedSection",
"subSelector": [
{
"type": "TextPositionSelector",
"start": 5
"end": 28
},
{
"type": "TextPositionSelectorAlt",
"start": 45
"end": 68
}
]
},
{
"type": "TextQuoteSelector",
"exact": "quote in namedSelection"
}
]
},
{
"type": "foo:PageSelectorAlt",
"value": "desiredPage",
"subSelector": {
"type": "FragmentSelector",
"value": "namedSection",
"subSelector": {
"type": "TextPositionSelector",
"start": 5 // relative to
target#namedSelection
"end": 28
}
}
}
]
},
{
"type": "foo:QuerySelector",
"value": "knownItemAlt",
"subSelector": {
"type": "foo:PageSelector",
"value": "desiredPage",
"subSelector": {
"type": "FragmentSelector",
"value": "namedSection",
"subSelector": {
"type": "TextPositionSelector",
"start": 5 // relative to
target#namedSelection
"end": 28
}
}
}
}
]
}
And for the inverted structure.
{
"@type": "SpecificResource",
"selector": [
{
[
{
"@type": "TextPositionSelector",
"start": 5,
"end": 28
},
{
"@type": "TextPositionSelectorAlt"
"start": 45,
"end": 68
},
"source": {
"selector": {
"@type": "FragmentSelector",
"value": "namedSection"
}
]
},
{
"type": "TextQuoteSelector",
"exact": "quote in namedSelection"
},
],
"source": {
"selector": [
{
"@type": "foo:PageSelector",
"value": "desiredPage"
},
{
"@type": "foo:PageSelectorAlt",
"value": "desiredPage"
}
],
"source" : {
"selector": [
{
"@type": "foo:QuerySelector",
"value": "knownItem"
},
{
"@type": "foo:QuerySelector",
"value": "knownItem"
}
],
"source": "http://example.org"
}
}
}
}
Again, I think these kind of complex chains of choices are likely
edgecases. A more likely pattern is one choice between a single
selector and a chain of two selectors.
--
GitHub Notification of comment by jjett
Please view or discuss this issue at
https://github.com/w3c/web-annotation/issues/93#issuecomment-174201090
using your GitHub account
Received on Saturday, 23 January 2016 17:12:00 UTC