the name of the attribute in data
the name of the attribute in data view
Rest
...dataAttributeAliases: string[]aliases for the attribute in data, which shall be mapped to the same data view attribute
mapper = preserveAttributeAs("xlink:type", "data-xlink-type");
mapper = preserveAttributeAs("lang", "lang", "xml:lang");
Preserves the given data attribute as the given view attribute. Thus, it provides a mapper for
toView
renaming attribute given bydataAttributeName
to attribute namedviewAttributeName
.If a data attribute has alias names, you may specify them in
dataAttributeAliases
. Note, that the first existing attributes value in[dataAttributeName, ...dataAttributeAliases]
will be taken into account. All other attributes will be lost in this processing.