Global Directory
Global Directory
EXPLORE OUR SITES
London Stock Exchange Group
LSEG Data & Analytics
MyAccount
LSEG Perspectives
London Stock Exchange
FTSE Russell
LCH
Contact Us
Home
TR Internal
Do notes change if doc content changes?
Michael Harlow
Background: Recently we implemented a feature on the iPad to store docs offline. A flaw with this is that if a doc is changed in novus, there's no way to know and get the new content. We're going to refresh at intervals to get around this problem.
In this type of scenario (ie 3 paragraphs are removed from a doc), would the data behind notes (offsets, etc) change to match the new version of the document? Or would the JS just figure out how to place the notes every time the doc is viewed? We wonder because it might mean that we don't need a new version of the notes.
Find more posts tagged with
document
refinitiv-internal
netes
Accepted answers
James Greene
*Disclaimer: This is specific to the annotations concept within the Cobalt Platform.*
Annotation Types
-----------------
1. Document-Level Note
- The document-level note always appears at the top of the document. In the typical scenario (using the WestlawNext website), these are added via the Annotations menu on the toolbar while viewing a document. It is not at all based on document content, and contains only user-entered text.
2. Highlight
- A textual selection made by the user, highlighting document content. In the typical scenario (using the WestlawNext website), these are added by selecting text within the document content [while viewing a document] and then choosing "Highlight" from the SelectedTextMenu widget.
- **When orphaned**: When a Highlight cannot be placed correctly within the document (e.g. if the content has changed), then the Highlight will become a *temporary* orphan. In the typical scenario (using the WestlawNext website), orphaned Highlights will appear in the same container as the Document-Level Notes, *after* all of the Document-Level Notes. Each subsequent time the user views the same document, we will still attempt to place the Highlight in its correct spot again.
3. Inline Note (with associated Highlight)
- A textual selection made by the user, highlighting document content, along with a note containing user-entered text. In the typical scenario (using the WestlawNext website), these are added by selecting text within the document content [while viewing a document] and then choosing "Add Note" from the SelectedTextMenu widget. You can also convert an existing Highlight into a Note.
- **When orphaned**: When an Inline Note cannot be placed correctly within the document (e.g. if the content has changed), then the Inline Note will become a *temporary* orphan. In the typical scenario (using the WestlawNext website), orphaned Inline Notes will appear in the same container as the Document-Level Notes, *after* all of the Document-Level Notes. Each subsequent time the user views the same document, we will still attempt to place the Inline Note in its correct spot again.
Location Data
-----------------
Due to the possibility of changing content, the primary location is identified as "occurrence within the document", i.e. this is the second time that the text "dog and cat" has appeared within the document body. This is specific to the rendering order of the document, so if it were to be applied to a different product's rendering of a document that did not follow Cobalt's document restructuring and exclusion/inclusion rules for elements, then Highlights and/or Inline Notes could be incorrectly placed or not placed at all.
Document Content Change Scenarios
----------------
The following are scenarios considering a textual selection of at least 20 non-whitespace characters. There are additional special rules applied to textual selections of fewer than 20 non-whitespace characters which I will not go into at this time.
**Content Added**
1. Content is added after the text associated with a Highlight or Inline Note
- No impact
2. Content is added before the text associated with a Highlight or Inline Note
1. Added content does not contain any instances of the selected text associated with the annotation
- No impact
2. Added content contains *n* instances of the selected text associated with the annotation
- The annotation will be incorrectly placed *n* instances too early
3. Content is added within the text associated with a Highlight or Inline Note
1. If additional instances of the selected text occur *after* the associated selection
- The annotation will be incorrectly placed into a following instance of the text.
2. If no additional instances of the selected text occur after the associated selection
- The annotation will become an orphan
**Content Removed**
1. Content is removed after the text associated with a Highlight or Inline Note
- No impact
2. Content is removed before the text associated with a Highlight or Inline Note
1. Removed content does not contain any instances of the selected text associated with the annotation
- No impact
2. Removed content contained *n* instances of the selected text associated with the annotation
1. If there are at least *n* additional instances of the selected text *after* the associated selection
- The annotation will be incorrectly placed *n* instances too late
2. If there are not at least *n* additional instances of the selected text *after* the associated selection
- The annotation will become an orphan
3. Content is removed within the text associated with a Highlight or Inline Note
1. If additional instances of the selected text occur *after* the associated selection
- The annotation will be incorrectly placed into a following instance of the text.
2. If no additional instances of the selected text occur after the associated selection
- The annotation will become an orphan
I think that covers all of the [normal] bases. Make sense?
*Source:* I wrote the feature.
All comments
jjnguy
For notes, if the text related to that note is removed (or changed) that note gets moved to a document level note.
If the text behind highlighted text is removed or changed, the highlight is simply removed.
Michael Harlow
Thanks, Justin. By 'moved to a document level note', do you mean that it becomes an orphaned note (ie one that cannot be placed) or an actual document level note? If text prior to a note is removed, basically altering the offset, will the persisted note still be able to be placed, will it be moved or will it become orphaned?
jjnguy
It becomes an actual document-level note. I'm not sure about your second question though. I will look into it.
James Greene
*Disclaimer: This is specific to the annotations concept within the Cobalt Platform.*
Annotation Types
-----------------
1. Document-Level Note
- The document-level note always appears at the top of the document. In the typical scenario (using the WestlawNext website), these are added via the Annotations menu on the toolbar while viewing a document. It is not at all based on document content, and contains only user-entered text.
2. Highlight
- A textual selection made by the user, highlighting document content. In the typical scenario (using the WestlawNext website), these are added by selecting text within the document content [while viewing a document] and then choosing "Highlight" from the SelectedTextMenu widget.
- **When orphaned**: When a Highlight cannot be placed correctly within the document (e.g. if the content has changed), then the Highlight will become a *temporary* orphan. In the typical scenario (using the WestlawNext website), orphaned Highlights will appear in the same container as the Document-Level Notes, *after* all of the Document-Level Notes. Each subsequent time the user views the same document, we will still attempt to place the Highlight in its correct spot again.
3. Inline Note (with associated Highlight)
- A textual selection made by the user, highlighting document content, along with a note containing user-entered text. In the typical scenario (using the WestlawNext website), these are added by selecting text within the document content [while viewing a document] and then choosing "Add Note" from the SelectedTextMenu widget. You can also convert an existing Highlight into a Note.
- **When orphaned**: When an Inline Note cannot be placed correctly within the document (e.g. if the content has changed), then the Inline Note will become a *temporary* orphan. In the typical scenario (using the WestlawNext website), orphaned Inline Notes will appear in the same container as the Document-Level Notes, *after* all of the Document-Level Notes. Each subsequent time the user views the same document, we will still attempt to place the Inline Note in its correct spot again.
Location Data
-----------------
Due to the possibility of changing content, the primary location is identified as "occurrence within the document", i.e. this is the second time that the text "dog and cat" has appeared within the document body. This is specific to the rendering order of the document, so if it were to be applied to a different product's rendering of a document that did not follow Cobalt's document restructuring and exclusion/inclusion rules for elements, then Highlights and/or Inline Notes could be incorrectly placed or not placed at all.
Document Content Change Scenarios
----------------
The following are scenarios considering a textual selection of at least 20 non-whitespace characters. There are additional special rules applied to textual selections of fewer than 20 non-whitespace characters which I will not go into at this time.
**Content Added**
1. Content is added after the text associated with a Highlight or Inline Note
- No impact
2. Content is added before the text associated with a Highlight or Inline Note
1. Added content does not contain any instances of the selected text associated with the annotation
- No impact
2. Added content contains *n* instances of the selected text associated with the annotation
- The annotation will be incorrectly placed *n* instances too early
3. Content is added within the text associated with a Highlight or Inline Note
1. If additional instances of the selected text occur *after* the associated selection
- The annotation will be incorrectly placed into a following instance of the text.
2. If no additional instances of the selected text occur after the associated selection
- The annotation will become an orphan
**Content Removed**
1. Content is removed after the text associated with a Highlight or Inline Note
- No impact
2. Content is removed before the text associated with a Highlight or Inline Note
1. Removed content does not contain any instances of the selected text associated with the annotation
- No impact
2. Removed content contained *n* instances of the selected text associated with the annotation
1. If there are at least *n* additional instances of the selected text *after* the associated selection
- The annotation will be incorrectly placed *n* instances too late
2. If there are not at least *n* additional instances of the selected text *after* the associated selection
- The annotation will become an orphan
3. Content is removed within the text associated with a Highlight or Inline Note
1. If additional instances of the selected text occur *after* the associated selection
- The annotation will be incorrectly placed into a following instance of the text.
2. If no additional instances of the selected text occur after the associated selection
- The annotation will become an orphan
I think that covers all of the [normal] bases. Make sense?
*Source:* I wrote the feature.
mark.maruska
Is this documentation located somewhere that it can be referenced here? ...maybe there is other related information that would be useful to read over as reference. Thanks!
Michael Harlow
Thanks, James, that is extremely helpful.
James Greene
@Mark
: I wouldn't have written such a detailed response I could've just pasted a link. No, this is the first time this has been written up to this level of detail, but I've advised the Document team to ensure this gets reposted as actual documentation somewhere.
Quick Links
All Forums
Recent Questions
Terms of use
Privacy & Cookie Statement
Cookies settings
Do not sell my info
Whistleblowing
UK Bribery Act
Modern Slavery Act