<?xml version="1.0" encoding="UTF-8"?>
<!--
ao-encoding-taglib - High performance streaming character encoding in a JSP environment.
Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2025, 2026  AO Industries, Inc.
    support@aoindustries.com
    7262 Bull Pen Cir
    Mobile, AL 36695

This file is part of ao-encoding-taglib.

ao-encoding-taglib is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

ao-encoding-taglib is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with ao-encoding-taglib.  If not, see <https://www.gnu.org/licenses/>.
-->
<!DOCTYPE taglib [

<!-- Implementation-specific settings -->
<!ENTITY tld "ao-encoding-legacy.tld">
<!ENTITY tld_displayName "AO Encoding Taglib (Legacy)">
<!ENTITY tld_uri "https://oss.aoapps.com/encoding/taglib/legacy">
<!ENTITY tld_description "&lt;em&gt;This is the legacy implementation for compatibility with applications that use JSP scriptlets.&lt;/em&gt;
When JSP scriptlets are not required, please use &lt;a href=&quot;https://oss.aoapps.com/encoding/taglib/ao-encoding.tld/&quot;&gt;AO Encoding Taglib Reference&lt;/a&gt;.">
<!ENTITY package "com.aoapps.encoding.taglib.legacy">
<!ENTITY JSP "JSP">
<!ENTITY aoTld "ao-legacy.tld">
<!ENTITY nmwEmailTld "nmw-email-legacy.tld">
<!ENTITY nmwPaymentTld "nmw-payment-legacy.tld">

]>
<!-- <common> -->
<taglib xmlns="https://jakarta.ee/xml/ns/jakartaee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee
                      https://jakarta.ee/xml/ns/jakartaee/web-jsptaglibrary_3_1.xsd"
  version="3.1">
  <!-- datePublished="2020-11-18T11:39:31-06:00" -->
  <!-- dateModified="2025-12-30T13:42:11Z" -->
<!-- </common> -->
  <!-- allowRobots="false" -->
<!-- <common> -->
  <description><![CDATA[
    <p>High performance streaming character encoding in a JSP environment.</p>
    <p>]]>&tld_description;<![CDATA[</p>
    <p>Both implementations are interoperable and may be used simultaneously under different prefixes.</p>
    <hr />
    <p>
      This taglib is part of an extensible suite of interoperable, context-aware,
      <a href="https://oss.aoapps.com/encoding/">auto-encoding</a> taglibs.
      All auto-encoding tags generate correct output for their context, provide context information for nested
      tags, and validate the output of nested tags.  For example,
      <a href="https://oss.aoapps.com/taglib/]]>&aoTld;<![CDATA[/tag-message">&lt;ao:message&gt;</a> within
      <a href="https://oss.aoapps.com/encoding/taglib/]]>&tld;<![CDATA[/tag-psql">&lt;encoding:psql&gt;</a> will write its output
      encoded as <a href="https://oss.aoapps.com/encoding/apidocs/com.aoapps.encoding/com/aoapps/encoding/MediaType.html#PSQL">PSQL</a>.
    </p>
    <p>
      This suite includes, but is not limited to:
    </p>
    <ul>
      <li><a href="https://oss.aoapps.com/encoding/taglib/]]>&tld;<![CDATA[/">AO Encoding Taglib</a> (this taglib)</li>
      <li><a href="https://oss.aoapps.com/taglib/]]>&aoTld;<![CDATA[/">AO Taglib</a></li>
      <li><a href="https://aoindustries.com/aoweb-struts/aoweb-struts-skin.tld/">AOWeb Struts Skin Taglib</a></li>
      <li><a href="https://oss.newmediaworks.com/email-taglib/]]>&nmwEmailTld;<![CDATA[/">NMW Email Taglib</a></li>
      <li><a href="https://oss.newmediaworks.com/payment-taglib/]]>&nmwPaymentTld;<![CDATA[/">NMW Payment Taglib</a></li>
      <!-- TODO: nmw-persistence-taglib once open-source, and many others -->
    </ul>
  ]]></description>
  <display-name>&tld_displayName;</display-name>
  <tlib-version>
    <!-- Release: 6.0.0-POST-SNAPSHOT -->
    6.0.0
  </tlib-version>
  <short-name>encoding</short-name>
  <uri>&tld_uri;</uri>
  <tag>
    <!-- datePublished="2020-11-21T17:26:24-06:00" -->
    <!-- dateModified="2023-10-02T00:34:59Z" -->
    <description><![CDATA[
      <p class="semanticcms-tag-reference-summary">
        Manually establishes an encoding context when automatic detection is not possible.
      </p>
      <p>
        The content type depends on the value provided to the type attribute.
        The content is checked for well-formedness based on its type:
      </p>
      <ul>
        <li><code>css</code> or <code>text/css</code> - must be well-formed CSS content. (Note: Currently only checks character values.)</li>
        <li><code>javascript</code>, <code>application/javascript</code>, or <code>text/javascript</code> - no validation</li>
        <li><code>json</code> or <code>application/json</code> - no validation</li>
        <li><code>ld_json</code> or <code>application/ld+json</code> - no validation</li>
        <li><code>text</code> or <code>text/plain</code> - no validation</li>
        <li><code>url</code> or <code>text/url</code> - must be a valid URL</li>
        <li><code>xhtml</code> or <code>application/xhtml+xml</code> - must be well-formed XHTML content. (Note: Currently only checks character values.)</li>
        <li><code>xhtml_attribute</code> or <code>application/xhtml+xml+attribute</code> - must be a valid XHTML attribute.</li>
        <li><code>mysql</code> or <code>text/x+mysql</code> - must be valid MySQL command "mysql" input</li>
        <li><code>psql</code> or <code>text/x+psql</code> - must be valid PostgreSQL command "psql" input</li>
        <li><code>sh</code> or <code>text/x+sh</code> - must be valid shell script</li>
      </ul>
    ]]></description>
    <name>encoding</name>
    <tag-class>&package;.EncodingTag</tag-class>
    <tei-class>com.aoapps.encoding.taglib.EncodingTagTEI</tei-class>
    <body-content>&JSP;</body-content>
    <attribute>
      <description><![CDATA[
        <p>
          Specifies the type of content contained in the tag body
        </p>
      ]]></description>
      <name>type</name>
      <required>true</required>
      <rtexprvalue>true</rtexprvalue>
      <type>java.lang.Object</type>
    </attribute>
  </tag>
  <tag>
    <!-- datePublished="2020-11-18T11:39:31-06:00" -->
    <!-- dateModified="2021-06-01T03:18:06-05:00" -->
    <description><![CDATA[
      <p class="semanticcms-tag-reference-summary">
        Manually establishes a JavaScript context when automatic detection is not possible.
        The body of this tag is a valid JavaScript.
      </p>
      <p>
        The content type of this tag is <code>application/javascript</code>.
      </p>
      <p>
        For more advanced scenarios, please use <a href="https://oss.aoapps.com/taglib/]]>&aoTld;<![CDATA[/tag-script">&lt;ao:script&gt;</a>.
      </p>
    ]]></description>
    <name>javascript</name>
    <tag-class>&package;.JavaScriptTag</tag-class>
    <body-content>&JSP;</body-content>
  </tag>
  <tag>
    <!-- datePublished="2020-11-18T11:39:31-06:00" -->
    <!-- dateModified="2021-06-01T03:18:06-05:00" -->
    <description><![CDATA[
      <p class="semanticcms-tag-reference-summary">
        Manually establishes a JSON context when automatic detection is not possible.
        The body of this tag is valid JSON.
      </p>
      <p>
        The content type of this tag is <code>application/json</code>.
      </p>
      <p>
        For more advanced scenarios, please use <a href="https://oss.aoapps.com/taglib/]]>&aoTld;<![CDATA[/tag-script">&lt;ao:script&gt;</a>.
      </p>
    ]]></description>
    <name>json</name>
    <tag-class>&package;.JsonTag</tag-class>
    <body-content>&JSP;</body-content>
  </tag>
  <tag>
    <!-- datePublished="2020-11-18T11:39:31-06:00" -->
    <!-- dateModified="2021-06-01T03:18:06-05:00" -->
    <description><![CDATA[
      <p class="semanticcms-tag-reference-summary">
        Manually establishes a JSON Linked Data context when automatic detection is not possible.
        The body of this tag is valid JSON-LD.
      </p>
      <p>
        The content type of this tag is <code>application/json</code>.
      </p>
      <p>
        For more advanced scenarios, please use <a href="https://oss.aoapps.com/taglib/]]>&aoTld;<![CDATA[/tag-script">&lt;ao:script&gt;</a>.
      </p>
    ]]></description>
    <name>ldJson</name>
    <tag-class>&package;.LdJsonTag</tag-class>
    <body-content>&JSP;</body-content>
  </tag>
  <tag>
    <!-- datePublished="2020-11-18T11:39:31-06:00" -->
    <!-- dateModified="2022-04-05T01:40:09-05:00" -->
    <description><![CDATA[
      <p class="semanticcms-tag-reference-summary">
        Manually establishes a MySQL context when automatic detection is not possible.
        The body of this tag is valid MySQL command "mysql" input.
      </p>
      <p>
        The content type of this tag is <code>text/x+mysql</code>.
      </p>
    ]]></description>
    <name>mysql</name>
    <tag-class>&package;.MysqlTag</tag-class>
    <body-content>&JSP;</body-content>
  </tag>
  <tag>
    <!-- datePublished="2020-11-18T11:39:31-06:00" -->
    <!-- dateModified="2023-10-02T00:34:59Z" -->
    <description><![CDATA[
      <p class="semanticcms-tag-reference-summary">
        Writes the value with proper escaping based on the context of the tag.
        Supports data types beyond
        <a rel="nofollow" href="https://docs.oracle.com/javaee/5/jstl/1.1/docs/tlddocs/c/out.html">&lt;c:out&gt;</a>.
      </p>
      <p>
        In addition to the usual set of coercions expected for
        <a rel="nofollow" href="https://docs.oracle.com/javaee/5/jstl/1.1/docs/tlddocs/c/out.html">&lt;c:out&gt;</a>,
        also supports writing <a rel="nofollow" href="https://docs.oracle.com/en/java/javase/11/docs/api/org/w3c/dom/Node.html">XML nodes</a>
        such as for HTML snippets.
      </p>
      <p>
        The content type depends on the value provided to the type attribute, and defaults to <code>text/plain</code>.
        The content is checked for well-formedness based on its type:
      </p>
      <ul>
        <li><code>css</code> or <code>text/css</code> - must be well-formed CSS content. (Note: Currently only checks character values.)</li>
        <li><code>javascript</code>, <code>application/javascript</code>, or <code>text/javascript</code> - no validation</li>
        <li><code>json</code> or <code>application/json</code> - no validation</li>
        <li><code>ld_json</code> or <code>application/ld+json</code> - no validation</li>
        <li><code>text</code> or <code>text/plain</code> - no validation</li>
        <li><code>url</code> or <code>text/url</code> - must be a valid URL</li>
        <li><code>xhtml</code> or <code>application/xhtml+xml</code> - must be well-formed XHTML content. (Note: Currently only checks character values.)</li>
        <li><code>xhtml_attribute</code> or <code>application/xhtml+xml+attribute</code> - must be a valid XHTML attribute.</li>
        <li><code>mysql</code> or <code>text/x+mysql</code> - must be valid MySQL command "mysql" input</li>
        <li><code>psql</code> or <code>text/x+psql</code> - must be valid PostgreSQL command "psql" input</li>
        <li><code>sh</code> or <code>text/x+sh</code> - must be valid shell script</li>
      </ul>
      <p>
        To be able to use nested <a href="https://oss.aoapps.com/taglib/]]>&aoTld;<![CDATA[/tag-value">&lt;ao:value&gt;</a> and
        <a href="https://oss.aoapps.com/taglib/]]>&aoTld;<![CDATA[/tag-type">&lt;ao:type&gt;</a> tags, use the compatible
        <a href="https://oss.aoapps.com/taglib/]]>&aoTld;<![CDATA[/tag-out">&lt;ao:out&gt;</a>.
      </p>
    ]]></description>
    <name>out</name>
    <tag-class>&package;.OutTag</tag-class>
    <tei-class>com.aoapps.encoding.taglib.OutTagTEI</tei-class>
    <body-content>empty</body-content>
    <attribute>
      <description><![CDATA[
        <p>
          The value to be written.
        </p>
      ]]></description>
      <name>value</name>
      <required>true</required>
      <rtexprvalue>true</rtexprvalue>
      <type>java.lang.Object</type>
      <!-- TODO: This, and look at other things done deferred-value in jstl
      <deferred-value>
        <type>java.lang.Object</type>
      </deferred-value>
      -->
    </attribute>
    <attribute>
      <description><![CDATA[
        <p>
          The default value if the resulting value is <code>null</code>.
        </p>
      ]]></description>
      <name>default</name>
      <required>false</required>
      <deferred-value>
        <type>java.lang.Object</type>
      </deferred-value>
    </attribute>
    <attribute>
      <description><![CDATA[
        <p>
          Specifies the type of content contained in the value.
          Defaults to <code>text/plain</code>.
        </p>
      ]]></description>
      <name>type</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
      <type>java.lang.Object</type>
    </attribute>
  </tag>
  <tag>
    <!-- datePublished="2020-11-18T11:39:31-06:00" -->
    <!-- dateModified="2022-04-05T01:40:09-05:00" -->
    <description><![CDATA[
      <p class="semanticcms-tag-reference-summary">
        Manually establishes a PostgreSQL context when automatic detection is not possible.
        The body of this tag is valid PostgreSQL command "psql" input.
      </p>
      <p>
        The content type of this tag is <code>text/x+psql</code>.
      </p>
    ]]></description>
    <name>psql</name>
    <tag-class>&package;.PsqlTag</tag-class>
    <body-content>&JSP;</body-content>
  </tag>
  <tag>
    <!-- datePublished="2020-11-18T11:39:31-06:00" -->
    <!-- dateModified="2021-06-01T03:18:06-05:00" -->
    <description><![CDATA[
      <p class="semanticcms-tag-reference-summary">
        Manually establishes a shell script context when automatic detection is not possible.
        The body of this tag is a valid shell script.
      </p>
      <p>
        The content type of this tag is <code>text/x+sh</code>.
      </p>
    ]]></description>
    <name>sh</name>
    <tag-class>&package;.ShTag</tag-class>
    <body-content>&JSP;</body-content>
  </tag>
  <tag>
    <!-- datePublished="2022-04-05T01:08:57-05:00" -->
    <description><![CDATA[
      <p class="semanticcms-tag-reference-summary">
        Manually establishes a CSS context when automatic detection is not possible.
        The body of this tag is valid CSS.
      </p>
      <p>
        The content type of this tag is <code>text/css</code>.
      </p>
      <p>
        For more advanced scenarios, please use <a href="https://oss.aoapps.com/taglib/]]>&aoTld;<![CDATA[/tag-style">&lt;ao:style&gt;</a>.
      </p>
    ]]></description>
    <name>style</name>
    <tag-class>&package;.StyleTag</tag-class>
    <body-content>&JSP;</body-content>
  </tag>
  <tag>
    <!-- datePublished="2020-11-18T11:39:31-06:00" -->
    <!-- dateModified="2022-03-25T17:25:18-05:00" -->
    <description><![CDATA[
      <p class="semanticcms-tag-reference-summary">
        Manually establishes a plaintext context when automatic detection is not possible.
        The body of this tag contains any arbitrary plain text.
      </p>
      <p>
        In some contexts, such as contained in a JavaScript string, this may be binary transparent.
      </p>
      <p>
        In other contexts, it may result in an error when a character may not
        be encoded to the container's system.  An example would be a NULL character
        in an XML document.
      </p>
      <p>
        End of line conversions may also occur in some contexts.
      </p>
      <p>
        When contained in CSS, this will automatically be surrounded by double quotes.
        The double quotes are automatically added to clearly separate data from
        code.  Please note that this auto-quoting applies to all forms of data in
        all tags, not just this text tag.
      </p>
      <p>
        When contained in JavaScript, this will automatically be surrounded by
        double quotes and will be binary transparent through \uxxxx escape codes.
        The double quotes are automatically added to clearly separate data from
        code.
      </p>
      <p>
        The content type of this tag <code>text/plain</code>.
      </p>
    ]]></description>
    <name>text</name>
    <tag-class>&package;.TextTag</tag-class>
    <body-content>&JSP;</body-content>
  </tag>
  <tag>
    <!-- datePublished="2020-11-18T11:39:31-06:00" -->
    <!-- dateModified="2025-12-30T13:42:11Z" -->
    <description><![CDATA[
      <p class="semanticcms-tag-reference-summary">
        Manually establishes a URL context when automatic detection is not possible.
        The body of this tag, after trimming, is valid <a href="https://datatracker.ietf.org/doc/html/rfc3986">RFC 3986 URI</a>
        or <a href="https://datatracker.ietf.org/doc/html/rfc3987">RFC 3987 IRI</a>.
      </p>
      <p>
        Depending on context, the URL will be passed through
        <a rel="nofollow" href="https://jakarta.ee/specifications/platform/10/apidocs/jakarta/servlet/http/HttpServletResponse.html#encodeURL(java.lang.String)">HttpServletResponse.encodeURL</a>
        to add any URL-based session state.  Session state will never be added to external links.
      </p>
      <p>
        When contained in CSS, this will automatically be surrounded by <code>url("…")</code>.
        Please note that this auto-quoting applies to all forms of data in all tags, not just this css tag.
      </p>
      <p>
        The content type of this tag is <code>text/url</code>.
      </p>
      <p>
        To establish a URL context with more full-featured URL manipulation, see also
        <a href="https://oss.aoapps.com/taglib/]]>&aoTld;<![CDATA[/tag-url">&lt;ao:url&gt;</a>.
      </p>
    ]]></description>
    <name>url</name>
    <tag-class>&package;.UrlTag</tag-class>
    <body-content>&JSP;</body-content>
  </tag>
  <tag>
    <!-- datePublished="2020-11-18T11:39:31-06:00" -->
    <!-- dateModified="2021-06-01T03:18:06-05:00" -->
    <description><![CDATA[
      <p class="semanticcms-tag-reference-summary">
        Manually establishes an XHTML attribute context when automatic detection is not possible.
        The body of this tag contains well-formed XHTML 1.0-compliant attribute.
      </p>
      <p>
        The content type of this tag is <code>application/xhtml+xml+attribute</code>.
      </p>
    ]]></description>
    <name>xhtmlAttribute</name>
    <tag-class>&package;.XhtmlAttributeTag</tag-class>
    <body-content>&JSP;</body-content>
  </tag>
  <tag>
    <!-- datePublished="2020-11-18T11:39:31-06:00" -->
    <!-- dateModified="2021-06-01T03:18:06-05:00" -->
    <description><![CDATA[
      <p class="semanticcms-tag-reference-summary">
        Manually establishes an XHTML context when automatic detection is not possible.
        The body of this tag contains well-formed XHTML 1.0-compliant markup.
      </p>
      <p>
        The content type of this tag is <code>application/xhtml+xml</code>.
      </p>
      <p>
        Note: For performance, this implementation currently only checks character
        values.  This ensures that no encodings are violated and overall XML validation
        by the browser should catch problems.
      </p>
    ]]></description>
    <name>xhtml</name>
    <tag-class>&package;.XhtmlTag</tag-class>
    <body-content>&JSP;</body-content>
  </tag>
  <function>
    <!-- datePublished="2020-11-18T11:39:31-06:00" -->
    <!-- dateModified="2021-06-16T12:51:47-05:00" -->
    <description><![CDATA[
      <p>
        Gets the current <a href="https://oss.aoapps.com/encoding/apidocs/com.aoapps.encoding/com/aoapps/encoding/Doctype.html">Doctype</a>.
      </p>
    ]]></description>
    <name>getDoctype</name>
    <function-class>com.aoapps.encoding.taglib.Functions</function-class>
    <function-signature>com.aoapps.encoding.Doctype getDoctype()</function-signature>
    <example><![CDATA[<code>${encoding:getDoctype()}</code>]]></example>
  </function>
  <function>
    <!-- datePublished="2020-11-18T11:39:31-06:00" -->
    <!-- dateModified="2021-06-16T12:51:47-05:00" -->
    <description><![CDATA[
      <p>
        Gets the current <a href="https://oss.aoapps.com/encoding/apidocs/com.aoapps.encoding/com/aoapps/encoding/Serialization.html">Serialization</a>.
      </p>
    ]]></description>
    <name>getSerialization</name>
    <function-class>com.aoapps.encoding.taglib.Functions</function-class>
    <function-signature>com.aoapps.encoding.Serialization getSerialization()</function-signature>
    <example><![CDATA[<code>${encoding:getSerialization()}</code>]]></example>
  </function>
</taglib>
<!-- </common> -->
