org.kefirsf.bb.safehtml.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kefirbb Show documentation
Show all versions of kefirbb Show documentation
KefirBB is a Java-library for text processing. Initially it was developed for BB2HTML translation.
But flexible configuration allows to use it in different cases. For example for parsing Markdown, Textile,
and for HTML filtration.
The newest version!
<?xml version="1.0" encoding="utf-8"?> <configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://kefirsf.org/kefirbb/schema" xsi:schemaLocation="http://kefirsf.org/kefirbb/schema http://kefirsf.org/kefirbb/schema/kefirbb-1.2.xsd"> <!-- XML escape symbols --> <scope name="safeXml"> <code priority="-2"> <pattern>'</pattern> <template>&apos;</template> </code> <code priority="-2"> <pattern><</pattern> <template>&lt;</template> </code> <code priority="-2"> <pattern>></pattern> <template>&gt;</template> </code> <code priority="-2"> <pattern>"</pattern> <template>&quot;</template> </code> </scope> <!-- Scope for escaping some symbols --> <scope name="escapeHtml" parent="safeXml"> <!-- Ignore unknown tags --> <code priority="-1"> <pattern><<junk/>></pattern> <template/> </code> <!-- Comment --> <code name="comment"> <pattern><!--<junk/>></pattern> <template/> </code> </scope> <!-- Escape basic HTML char sequences --> <scope name="basic" parent="escapeHtml"> <!-- line feed characters --> <code name="br"> <pattern><eol/></pattern> <template><br/></template> </code> <code name="br1" priority="1"> <pattern><br/></pattern> <pattern><br <junk/>/></pattern> <template><br/></template> </code> <code name="br2"> <pattern><br></pattern> <pattern><br <junk/>></pattern> <template><br></template> </code> </scope> <scope name="format" parent="basic"> <!-- Headers --> <coderef name="h1"/> <coderef name="h2"/> <coderef name="h3"/> <coderef name="h4"/> <coderef name="h5"/> <coderef name="h6"/> <!-- Formatting --> <coderef name="bold"/> <coderef name="u"/> <coderef name="s"/> <coderef name="i"/> </scope> <!-- Root scope. This scope uses when processor started work and by default, if not set other scope --> <scope name="ROOT" parent="format"> <!-- Paragraph --> <coderef name="p"/> <coderef name="hr"/> <coderef name="span"/> <coderef name="div"/> <!-- Quotes --> <coderef name="pre"/> <coderef name="code"/> <coderef name="quote"/> <!-- Images --> <coderef name="img"/> <!-- links --> <coderef name="url1"/> <!-- Lists --> <coderef name="ul"/> <coderef name="ol"/> <coderef name="dl"/> <!-- Table --> <coderef name="table"/> </scope> <!-- Links. http, https, malto protocols --> <scope name="url" parent="format"> <!-- Paragraph --> <coderef name="span"/> <!-- Quotes --> <coderef name="code"/> <!-- Images --> <coderef name="img"/> </scope> <!-- Headers --> <code name="h1"> <pattern ignoreCase="true"><h1><var scope="basic"/></h1></pattern> <pattern ignoreCase="true"><h1 <junk/>><var scope="basic"/></h1></pattern> <template><h1><var/></h1></template> </code> <code name="h2"> <pattern ignoreCase="true"><h2><var scope="basic"/></h2></pattern> <pattern ignoreCase="true"><h2 <junk/>><var scope="basic"/></h2></pattern> <template><h2><var/></h2></template> </code> <code name="h3"> <pattern ignoreCase="true"><h3><var scope="basic"/></h3></pattern> <pattern ignoreCase="true"><h3 <junk/>><var scope="basic"/></h3></pattern> <template><h3><var/></h3></template> </code> <code name="h4"> <pattern ignoreCase="true"><h4><var scope="basic"/></h4></pattern> <pattern ignoreCase="true"><h4 <junk/>><var scope="basic"/></h4></pattern> <template><h4><var/></h4></template> </code> <code name="h5"> <pattern ignoreCase="true"><h5><var scope="basic"/></h5></pattern> <pattern ignoreCase="true"><h5 <junk/>><var scope="basic"/></h5></pattern> <template><h5><var/></h5></template> </code> <code name="h6"> <pattern ignoreCase="true"><h6><var scope="basic"/></h6></pattern> <pattern ignoreCase="true"><h6 <junk/>><var scope="basic"/></h6></pattern> <template><h6><var/></h6></template> </code> <!-- Paragraphs --> <code name="p"> <pattern ignoreCase="true"><p><var name="content" inherit="true"/></p></pattern> <pattern ignoreCase="true"><p <junk/>><var name="content" inherit="true"/></p></pattern> <template><p><var name="content"/></p></template> </code> <code name="hr"> <pattern ignoreCase="true"><hr/></pattern> <pattern ignoreCase="true"><hr <junk/>/></pattern> <template><hr/></template> </code> <code name="div"> <pattern ignoreCase="true"><div><var inherit="true"/></div></pattern> <pattern ignoreCase="true"><div <junk/>><var inherit="true"/></div></pattern> <template><div><var/></div></template> </code> <code name="span"> <pattern ignoreCase="true"><span><var inherit="true"/></span></pattern> <pattern ignoreCase="true"><span <junk/>><var inherit="true"/></span></pattern> <template><span><var/></span></template> </code> <!-- Simple formatting --> <code name="bold"> <pattern ignoreCase="true"><b><var name="content" inherit="true"/></b></pattern> <pattern ignoreCase="true"><b <junk/>><var name="content" inherit="true"/></b></pattern> <template><b><var name="content"/></b></template> </code> <code name="u"> <pattern ignoreCase="true"><u><var name="content" inherit="true"/></u></pattern> <pattern ignoreCase="true"><u <junk/>><var name="content" inherit="true"/></u></pattern> <template><u><var name="content"/></u></template> </code> <code name="s"> <pattern ignoreCase="true"><s><var name="content" inherit="true"/></s></pattern> <pattern ignoreCase="true"><s <junk/>><var name="content" inherit="true"/></s></pattern> <template><s><var name="content"/></s></template> </code> <code name="i"> <pattern ignoreCase="true"><i><var name="content" inherit="true"/></i></pattern> <pattern ignoreCase="true"><i <junk/>><var name="content" inherit="true"/></i></pattern> <template><i><var name="content"/></i></template> </code> <!-- Insert image --> <code name="img"> <pattern ignoreCase="true"><img <junk/>src="<url local="true"/>"<junk/>></pattern> <template><img src="<var name="url"/>"/></template> </code> <!-- HTTP --> <code name="url1"> <pattern ignoreCase="true"><a <junk/>href="<url local="true"/>"<junk/>><var name="text" scope="url"/></a></pattern> <template><a href="<var name="url"/>"><var name="text"/></a></template> </code> <!-- Quote block --> <code name="quote" priority="1"> <pattern ignoreCase="true"><blockquote><var name="content" inherit="true"/></blockquote></pattern> <pattern ignoreCase="true"><blockquote <junk/>><var name="content" inherit="true"/></blockquote></pattern> <template><blockquote><var name="content"/></blockquote></template> </code> <!-- Quote code block --> <code name="pre"> <pattern ignoreCase="true"><pre><var name="content" inherit="true"/></pre></pattern> <pattern ignoreCase="true"><pre <junk/>><var name="content" inherit="true"/></pre></pattern> <template><pre><var name="content"/></pre></template> </code> <code name="code"> <pattern ignoreCase="true"><code><var name="content" inherit="true"/></code></pattern> <pattern ignoreCase="true"><code <junk/>><var name="content" inherit="true"/></code></pattern> <template><code><var name="content"/></code></template> </code> <!-- Lists --> <code name="ol"> <pattern ignoreCase="true"><ol><var scope="list"/></ol></pattern> <pattern ignoreCase="true"><ol <junk/>><var scope="list"/></ol></pattern> <template><ol><var/></ol></template> </code> <code name="ul" priority="1"> <pattern ignoreCase="true"><ul><var scope="list"/></ul></pattern> <pattern ignoreCase="true"><ul <junk/>><var scope="list"/></ul></pattern> <template><ul><var/></ul></template> </code> <scope name="list" ignoreText="true"> <code name="li"> <pattern ignoreCase="true"><li><var scope="ROOT"/></li></pattern> <pattern ignoreCase="true"><li <junk/>><var scope="ROOT"/></li></pattern> <template><li><var/></li></template> </code> </scope> <code name="dl"> <pattern ignoreCase="true"><dl><var scope="dlist"/></dl></pattern> <pattern ignoreCase="true"><dl <junk/>><var scope="dlist"/></dl></pattern> <template><dl><var/></dl></template> </code> <scope name="dlist"> <code name="dt"> <pattern ignoreCase="true"><dt><var scope="ROOT"/></dt></pattern> <pattern ignoreCase="true"><dt <junk/>><var scope="ROOT"/></dt></pattern> <template><dt><var/></dt></template> </code> <code name="dd"> <pattern ignoreCase="true"><dd><var scope="ROOT"/></dd></pattern> <pattern ignoreCase="true"><dd <junk/>><var scope="ROOT"/></dd></pattern> <template><dd><var/></dd></template> </code> </scope> <!-- Table --> <code name="table"> <pattern ignoreCase="true"><table><var scope="tableScope"/></table></pattern> <pattern ignoreCase="true"><table <junk/>><var scope="tableScope"/></table></pattern> <template><table><var/></table></template> </code> <scope name="tableScope" parent="tableBlock" ignoreText="true"> <code name="caption"> <pattern ignoreCase="true"><caption><var scope="safeXml"/></caption></pattern> <pattern ignoreCase="true"><caption <junk/>><var scope="safeXml"/></caption></pattern> <template><caption><var/></caption></template> </code> <code name="thead"> <pattern ignoreCase="true"><thead><var scope="tableBlock"/></thead></pattern> <pattern ignoreCase="true"><thead <junk/>><var scope="tableBlock"/></thead></pattern> <template><thead><var/></thead></template> </code> <code name="tbody"> <pattern ignoreCase="true"><tbody><var scope="tableBlock"/></tbody></pattern> <pattern ignoreCase="true"><tbody <junk/>><var scope="tableBlock"/></tbody></pattern> <template><tbody><var/></tbody></template> </code> <code name="tfoot"> <pattern ignoreCase="true"><tfoot><var scope="tableBlock"/></tfoot></pattern> <pattern ignoreCase="true"><tfoot <junk/>><var scope="tableBlock"/></tfoot></pattern> <template><tfoot><var/></tfoot></template> </code> </scope> <scope name="tableBlock" ignoreText="true"> <code name="tr"> <pattern ignoreCase="true"><tr><var scope="tableRow"/></tr></pattern> <pattern ignoreCase="true"><tr <junk/>><var scope="tableRow"/></tr></pattern> <template><tr><var/></tr></template> </code> </scope> <scope name="tableRow" ignoreText="true"> <code name="th"> <pattern ignoreCase="true"><th><var scope="ROOT"/></th></pattern> <pattern ignoreCase="true"><th <junk/>><var scope="ROOT"/></th></pattern> <template><th><var/></th></template> </code> <code name="td"> <pattern ignoreCase="true"><td><var scope="ROOT"/></td></pattern> <pattern ignoreCase="true"><td <junk/>><var scope="ROOT"/></td></pattern> <template><td><var/></td></template> </code> </scope> </configuration>
© 2015 - 2024 Weber Informatics LLC | Privacy Policy