Closed nichtich closed 5 years ago
The document could be loaded as Markdown from a configured URL. Markdown has the benefit of disallowing all kinds of ugly stuff (especially CSS):
// securely remove all HTML tags
markdown = new DOMParser().parseFromString(markdown, 'text/html').body.textContent || ""
// convert to HTML with https://www.npmjs.com/package/snarkdown (tiny!)
var html = snarkdown(markdown)
An example document is available at https://raw.githubusercontent.com/wiki/gbv/cocoda/WD-BK.md (see https://github.com/gbv/cocoda/wiki/WD-BK). The configuration in cocoda.default.json
could be:
"guidelines": [ {
"fromScheme": "http://bartoc.org/en/node/1940",
"toScheme": "http://uri.gbv.de/terminology/bk/",
"markdown": "https://raw.githubusercontent.com/wiki/gbv/cocoda/WD-BK.md"
} ]
If the given schemes are selected, an additional help-icon in the mapping editor can open a modal to show the guideline.
I added it as a simple link next to the "Mapping Editor" title for now. It's probably better to open it in a new tab because mappers can either have it on a separate screen while mapping or quickly switch tabs back and forth, which is easier than having to open a modal every time you need the guidelines.
If a combination of concept schemes is selected, e.g. RVK to DDC, a small document should be shown what rules to follow when doing mapping between these schemes. The document could be a Markdown document shown as modal and it should link to aditional documents, working groups etc.