Nav Doc link checks (remote resources + reading order) #999
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
disallow remote links in toc/landmarks/page-list nav …
A new message
NAV_010
(ERROR
) is reported when atoc
,landmarks
,or
page-list
nav contains links to remote resources.Fix #890
check that toc & page-list nav are in reading order
New Message:
NAV_011
(ERROR
) is reported when the links intoc
andpage-list
nav
(in the Navigation Document) do not follow the reading order(i.e. spine order + order of IDs in the Content Documents).
Checking logic for
NAV_011
:XRefChecker
XRefChecker.checkReferences
(ran after all documents have been parsed and validated)
Internal changes:
PathUtil
utilities:removeAnchor
method toremoveFragment
getFragment
methodOPFItem
class:getSpinePosition()
getterXRefChecker
class:getResource(path)
public method to get anOPFItem
for a given path.
getAnchorPosition(id)
method to the internalResource
class.
references, with a specific reference type (e.g. a Nav Doc link is
registered both as a HYPERLINK and as a NAV_TOC_LINK): these
subtypes are now checked in separate private methods, to keep the
main
checkReference(Reference)
method pristine.checkReadingOrder(Queue, int, int)
private method whichprocesses a queue of references (along with the last known spine
position and fragment position) and check they are in reading order
Fix #888