rdfa-streaming-parser
Version:
A fast and lightweight streaming RDFa parser
93 lines • 2.63 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RDFA_CONTENTTYPES = exports.RDFA_FEATURES = void 0;
/**
* A mapping of RDFa profile to a features object.
*/
// tslint:disable:object-literal-sort-keys
exports.RDFA_FEATURES = {
'': {
baseTag: true,
xmlBase: true,
langAttribute: true,
onlyAllowUriRelRevIfProperty: true,
inheritSubjectInHeadBody: true,
datetimeAttribute: true,
timeTag: true,
htmlDatatype: true,
copyRdfaPatterns: true,
xmlnsPrefixMappings: true,
xhtmlInitialContext: true,
roleAttribute: true,
},
'core': {
baseTag: false,
xmlBase: false,
langAttribute: true,
onlyAllowUriRelRevIfProperty: true,
inheritSubjectInHeadBody: false,
datetimeAttribute: false,
timeTag: false,
htmlDatatype: false,
copyRdfaPatterns: true,
xmlnsPrefixMappings: true,
xhtmlInitialContext: false,
roleAttribute: false,
},
'html': {
baseTag: true,
xmlBase: false,
langAttribute: true,
onlyAllowUriRelRevIfProperty: true,
inheritSubjectInHeadBody: true,
datetimeAttribute: true,
timeTag: true,
htmlDatatype: true,
copyRdfaPatterns: true,
xmlnsPrefixMappings: true,
xhtmlInitialContext: false,
roleAttribute: true,
},
'xhtml': {
baseTag: true,
xmlBase: false,
langAttribute: true,
onlyAllowUriRelRevIfProperty: true,
inheritSubjectInHeadBody: true,
datetimeAttribute: true,
timeTag: true,
htmlDatatype: true,
copyRdfaPatterns: true,
xmlnsPrefixMappings: true,
xhtmlInitialContext: true,
roleAttribute: true,
},
'xml': {
baseTag: false,
xmlBase: true,
langAttribute: true,
onlyAllowUriRelRevIfProperty: false,
inheritSubjectInHeadBody: false,
datetimeAttribute: true,
timeTag: true,
htmlDatatype: false,
copyRdfaPatterns: false,
xmlnsPrefixMappings: true,
xhtmlInitialContext: false,
roleAttribute: true,
},
};
// tslint:enable:object-literal-sort-keys
// tslint:disable:object-literal-sort-keys
exports.RDFA_CONTENTTYPES = {
// HTML
'text/html': 'html',
// XHTML
'application/xhtml+xml': 'xhtml',
// XML
'application/xml': 'xml',
'text/xml': 'xml',
'image/svg+xml': 'xml',
};
// tslint:enable:object-literal-sort-keys
//# sourceMappingURL=RdfaProfile.js.map