Skip to content

Latest commit

 

History

History
210 lines (141 loc) · 11.6 KB

Available_plugins.md

File metadata and controls

210 lines (141 loc) · 11.6 KB

Available Plugins

For more details, click on the plugin name.

Handle @type attribute of <author/> elements. Default is to remove the attribute altogether. Use configuration to change the attribute name to @role.

Remove text content from <availability/> and tail from children and add under a new <p/>.

Remove text content from <body/> elements and add to first child if it can contain text. Else, add a new <p/> that is inserted as first child of <body/>.

Find elements that are siblings of <byline/> but invalid after <byline/> (i.e. <p/> after <byline/> if there are already other <p/> elements before <byline/>). All elements surrounding the <byline/> until the invalid element and upto any <div/> are wrapped by a new <div/> element. N.B.: The invalid element that was the former direct sibling of <byline/> is not handled. If this element is a <p/> element for example, use in combination with div-sibling plugin to remove the invalid <p/> after <div/>.

Remove tail on <cell/> elements by adding the content of the tail with the text of the <cell/> or, if present, to the tail of the last child.

Replace <classcode/> elements with <classCode/>.

Replace <code/> elements with <ab/> if the element has descendants and set @type='code' attribute. If the parent has <p/> or <ab/> tag, the former <code/> element is added as sibling of the parent.

Remove <p/>, <ab/>, and <head/> elements with <del/> parent by stripping the inner tag.

Strip <div/> elements with invalid parents. If the parent of <div/> is <p/> or <ab/>, the <div/> element is added as a sibling of its parent.

Add a new <div/> as parent for <table/>, <quote/>, <list/>, <p/>, <head/>, or <ab/> elements if they are a following sibling of a <div/> element.

Remove tail from <div/> elements and add under new <p/> that is appended as last child of the <div/>.

Remove text from <div/> elements and add under new <p/>.

Rename <cell/> elements that are direct children of <cell/> to <p/>. If the inner <cell/> element has children, it will not be renamed but added as a sibling before the outer <cell/>.

Rename <item/> elements that are direct children of <item/> to <ab/>. If the inner <item/> has children, the element will not be renamed but an additional <list/> will be inserted, wrapping the inner <item/>.

Remove nested paragraph-like elements (<p/>, <ab/>) by stripping the inner tag. This plugin can be configured to insert an <lb/> element to separate text parts of parent or older sibling and target element.

Remove attributes with empty string as value from all elements. Set attributes to remove in configuration file.

Add empty <p/> to <body/> element without (required) children.

Remove empty <list/>, <table/>, and <row/> elements.

Add empty <term/> to empty <keywords/> elements.

Find <classCode/> elements with @scheme attribute with empty value and set new value or remove element. This requires configuration, see empty-scheme for more details.

Remove empty <notesStmt/> and <seriesStmt/> elements.

Remove <filename/> elements.

Find <p/>, <list/>, and <table/> elements with <fw/> parent. Merge <p/> element into parent. Rename parent to <ab/> if target has tag <list/> or <table/>.

Change tag of elements with h# tag (e.g. <h2/>) to <ab/>.

Remove <p/> and <ab/> elements with <head/> parent by stripping the inner tag.

Change tag of <head/> elements with wrong parent (<p/>, <ab/>, <hi/>, <head/>, <item/>, <quote/>) to <hi/>.

Remove @type attribute from <head/> elements.

Remove <p/> elements with <hi/> parent by stripping the <p/> tag.

Wrap <hi/> elements in <p/>. If siblings contain any <div/>, additionally wrap with the according <div#/>.

Replace attribute @id with @xml:id.

Remove unwanted attributes from all elements. Set attributes to remove and possible exceptions of elements in configuration file.

Remove @role attribute from <p/> and <div/> elements.

Set @ident attribute for <language/> elements where this attribute is missing. Values to be set should be passed via configuration files, see lang-ident for more details.

Wrap <lb/> elements with tail that have <div/> or <body/> parent with a new <p/> element.

Remove text content from <lb/> elements and merge with tail.

Add an <item/> element as parent of <p/>, <ab/>, <hi/>, <list/>, <del/>, <quote/>, and <table/> elements that are direct descendants of <list/>.

Remove text from <list/> elements that is not contained by any <item/> and add under a new <item/> element.

Find <cell/> elements that are outside of <row/> and wrap them in <row/> and <table/>, if necessary.

Find <item/> elements that are outside of <list/> and wrap them in <list/>. Empty elements are removed.

Wrap <row/> elements that are outside a <table/> element with <table/>.

Wrap <s/> elements that are children of <body/> or <div/> with a <p/> element.

Insert <notesStmt/> that follow <sourceDesc/> as previous sibling of the <sourceDesc/> element.

Find <text/> elements without <body/> or <group/> children and add a <body/> element as child. Children of <text/> that are not <front/> or <back/> are moved to the <body/> element.

Add an empty <publisher/> as first child to <publicationStmt/> if it does not contain any element from the publicationStmtPart.agency group (i.e. <publisher/>, <distributor/>, <authority/>). If all children of <publicationStmt/> are p-like, no change will be performed. N.B.: This plugin will only add an empty element, it does not guarantee that the order of the elements is valid if an element of the publicationStmtPart.agency group was already present.

Convert <byline/> elements with <p/>-like siblings before and after to <ab/>.

Convert <l/> elements with <s/> parent to <w/>.

Change tag of <opener/> elements that have invalid older sibling and no children (except <lb/>) to <ab/>.

Remove attribute @measure_quantity from <term/> elements.

Find <fw/> elements with <fw/> parent and <list/> or <table/> as descendant (and the <list/>/<table/> has <fw/> or <p/> as parent) and add as sibling of the parent. Any following siblings are added under a new <fw/> after the target.

Remove @type from <notesStmt/>.

Change name of @value attribute on <num/> elements to @type if the value is percent.

p-div-sibling

Deprecated, use div-sibling instead.

Replace tag <head/> elements that appear after invalid elements (e.g <p/>) with <ab/> and add type='head' attribute.

Add <p/> as parent to elements that incorrectly have <div/> or <body/> as parent. This requires configuration to set the target elements, see p-parent for more details.

Remove empty <p/> or <ab/> elements from <publicationStmt/> if there are siblings from model.publicationStmtPart.

Remove @target attribute from <ptr/> elements if the value is empty string.

Remove <relatedItem/> elements that do not have children or do not have @target attribute. If the parent element would be empty after removal, it will also be removed.

Wrap <note/> elements with parent <respStmt/> with a new <resp/> element if the <note/> element has no previous <resp/> sibling.

Add a <cell/> element as parent to <p/> elements that are direct children of <row/>.

Remove @schemaLocation attribute from <TEI/> elements.

Convert <p/> elements that are children of <table/> to <fw/>.

Remove text content of <table/> and tail of children of <table/>.

Remove text in tail of <p/>, <ab/>, <fw/>, <list/>, <table/>, <quote/> and <head/> elements if parent is a <div/>, <body/>, or <floatingText/> element. Add a new sibling <p/> that contains the former tail.

Remove @type attribute from <teiHeader/>.

Add TEI namespace declaration to <TEI/> element.

Replace <textclass/> elements with <textClass/>.

Change tag of <p/> elements with <u/> children to <div/>.

Replace <ul/> elements with <list/>.

Find <table/> and <list/> elements without the required children and add an empty child with the required tag.