<?xml version="1.0" encoding="UTF-8"?>
<!--
semanticcms-news-taglib - SemanticCMS newsfeeds in a JSP environment.
Copyright (C) 2016, 2017, 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 semanticcms-news-taglib.

semanticcms-news-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.

semanticcms-news-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 semanticcms-news-taglib.  If not, see <https://www.gnu.org/licenses/>.
-->
<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="2016-09-08T11:43:11-05:00" -->
  <!-- dateModified="2016-11-11T13:47:50-06:00" -->
  <description><![CDATA[
    <p><a target="_top" href="https://semanticcms.com/news/">SemanticCMS newsfeeds</a> in a JSP environment.</p>
  ]]></description>
  <display-name>SemanticCMS News Taglib</display-name>
  <tlib-version>
    <!-- Release: 2.0.1-POST-SNAPSHOT -->
    2.0.1
  </tlib-version>
  <short-name>news</short-name>
  <uri>https://semanticcms.com/news/taglib/</uri>
  <tag>
    <!-- datePublished="2016-09-08T11:43:11-05:00" -->
    <!-- dateModified="2025-12-30T07:58:25Z" -->
    <description><![CDATA[
      <p>
        A newsfeed item, used to annotate pages and elements of what
        changes.  The news entries are not typically directly visible, but 
        instead are available via news views, RSS feeds, newsletters, Twitter
        tweets, and such.
      </p>
    ]]></description>
    <name>news</name>
    <tag-class>com.semanticcms.news.taglib.NewsTag</tag-class>
    <body-content>scriptless</body-content>
    <attribute>
      <description><![CDATA[
        <p>
          The id used in URL anchors.
          If not provided, is generated from the label.
          Must be unique per page.
          Ids generated from labels will be unique, but may change as page structure changes.
        </p>
      ]]></description>
      <name>id</name>
      <required>false</required>
      <deferred-value>
        <type>java.lang.String</type>
      </deferred-value>
    </attribute>
    <attribute>
      <description><![CDATA[
        <p>
          The book of the news target book.
          Defaults to the book of the current JSP file.
        </p>
      ]]></description>
      <name>book</name>
      <required>false</required>
      <deferred-value>
        <type>java.lang.String</type>
      </deferred-value>
    </attribute>
    <attribute>
      <description><![CDATA[
        <p>
          The page-relative path to the news target book.
          Required when book provided.
          Defaults to the parent page/element of the news entry when not specified.
        </p>
      ]]></description>
      <name>page</name>
      <required>false</required>
      <deferred-value>
        <type>java.lang.String</type>
      </deferred-value>
    </attribute>
    <attribute>
      <description><![CDATA[
        <p>
          The id of the news target element.
          Defaults to the parent page/element of the news entry when book, page, and element not specified.
        </p>
      ]]></description>
      <name>element</name>
      <required>false</required>
      <deferred-value>
        <type>java.lang.String</type>
      </deferred-value>
    </attribute>
    <attribute>
      <description><![CDATA[
        <p>
          The view to use for the target element.
          Defaults to <code>content</code> when not specified.
        </p>
      ]]></description>
      <name>view</name>
      <required>false</required>
      <deferred-value>
        <type>java.lang.String</type>
      </deferred-value>
    </attribute>
    <attribute>
      <description><![CDATA[
        <p>
          The title of the news entry.
          Defaults to the target page title/element label when not specified.
        </p>
      ]]></description>
      <name>title</name>
      <required>false</required>
      <deferred-value>
        <type>java.lang.String</type>
      </deferred-value>
    </attribute>
    <attribute>
      <description><![CDATA[
        <p>
          The optional description of the news entry.
        </p>
      ]]></description>
      <name>description</name>
      <required>false</required>
      <deferred-value>
        <type>java.lang.String</type>
      </deferred-value>
    </attribute>
    <attribute>
      <description><![CDATA[
        <p>
          The publication date in <a href="https://www.iso.org/iso-8601-date-and-time-format.html">ISO 8601</a> format.
        </p>
        <p>
          At least <code>YYYY-MM-DD</code> is required,
          and when time not specified will default to midnight in the current system time zone.
          A long value of <code>-1</code> or <code>0</code> is converted to <code>null</code>.
        </p>
      ]]></description>
      <name>pubDate</name>
      <required>true</required>
      <deferred-value>
        <type>java.lang.Object</type>
      </deferred-value>
    </attribute>
    <attribute>
      <description><![CDATA[
        <p class="semanticcms-tag-reference-summary">
          Controls whether robots will be allowed to access this news entry.
        </p>
        <p>
          Possible values are:
        </p>
        <ul>
          <li><code>auto</code> - Inherit setting from page</li>
          <li><code>true</code> - Robots allowed</li>
          <li><code>false</code> - Robots not allowed</li>
        </ul>
        <p>
          Defaults to <code>auto</code>.
        </p>
      ]]></description>
      <name>allowRobots</name>
      <required>false</required>
      <deferred-value>
        <type>java.lang.String</type>
      </deferred-value>
    </attribute>
    <dynamic-attributes>true</dynamic-attributes>
  </tag>
  <function>
    <!-- datePublished="2016-09-09T20:28:53-05:00" -->
    <!-- dateModified="2020-05-29T14:25:33-05:00" -->
    <description><![CDATA[
      <p>
        Gets all the new items in the given page and below, ordered by <code>pubDate desc, page</code>.
      </p>
    ]]></description>
    <name>findAllNews</name>
    <function-class>com.semanticcms.news.taglib.Functions</function-class>
    <function-signature>java.util.List findAllNews(com.semanticcms.core.model.Page)</function-signature>
    <!-- functionSignature="java.util.List<com.semanticcms.news.model.News> findAllNews(com.semanticcms.core.model.Page)" -->
    <example><![CDATA[<code>${news:findAllNews(page)}</code>]]></example>
  </function>
</taglib>
