<?xml version="1.0" encoding="UTF-8"?>
<!-- Reviewed: no -->
<sect2 id="zend.validate.sitemap">
    <title>Sitemap Validators</title>

    <para>
        The following validators conform to the <ulink
            url="http://www.sitemaps.org/protocol.php">Sitemap <acronym>XML</acronym>
            protocol</ulink>.
    </para>

    <sect3 id="zend.validate.sitemap.changefreq">
        <title>Sitemap_Changefreq</title>

        <para>
            Validates whether a string is valid for using as a 'changefreq'
            element in a Sitemap <acronym>XML</acronym> document. Valid values are: 'always',
            'hourly', 'daily', 'weekly', 'monthly', 'yearly', or 'never'.
        </para>

        <para>
            Returns <constant>TRUE</constant> if and only if the value is a string
            and is equal to one of the frequencies specified above.
        </para>
    </sect3>

    <sect3 id="zend.validate.sitemap.lastmod">
        <title>Sitemap_Lastmod</title>

        <para>
            Validates whether a string is valid for using as a 'lastmod'
            element in a Sitemap <acronym>XML</acronym> document. The lastmod element should
            contain a <acronym>W3C</acronym> date string, optionally discarding information
            about time.
        </para>

        <para>
            Returns <constant>TRUE</constant> if and only if the given value is
            a string and is valid according to the protocol.
        </para>

        <example id="zend.validate.sitemap.lastmod.example">
            <title>Sitemap Lastmod Validator</title>

            <programlisting language="php"><![CDATA[
$validator = new Zend_Validate_Sitemap_Lastmod();

$validator->isValid('1999-11-11T22:23:52-02:00'); // true
$validator->isValid('2008-05-12T00:42:52+02:00'); // true
$validator->isValid('1999-11-11'); // true
$validator->isValid('2008-05-12'); // true

$validator->isValid('1999-11-11t22:23:52-02:00'); // false
$validator->isValid('2008-05-12T00:42:60+02:00'); // false
$validator->isValid('1999-13-11'); // false
$validator->isValid('2008-05-32'); // false
$validator->isValid('yesterday'); // false
]]></programlisting>
        </example>
    </sect3>

    <sect3 id="zend.validate.sitemap.loc">
        <title>Sitemap_Loc</title>

        <para>
            Validates whether a string is valid for using as a 'loc'
            element in a Sitemap <acronym>XML</acronym> document. This uses
            <methodname>Zend_Form::check()</methodname> internally. Read more at
            <link linkend="zend.uri.validation">URI Validation</link>.
        </para>
    </sect3>

    <sect3 id="zend.validate.sitemap.priority">
        <title>Sitemap_Priority</title>

        <para>
            Validates whether a value is valid for using as a 'priority'
            element in a Sitemap <acronym>XML</acronym> document. The value should be a
            decimal between 0.0 and 1.0. This validator accepts both numeric
            values and string values.
        </para>

        <example id="zend.validate.sitemap.priority.example">
            <title>Sitemap Priority Validator</title>

            <programlisting language="php"><![CDATA[
$validator = new Zend_Validate_Sitemap_Priority();

$validator->isValid('0.1'); // true
$validator->isValid('0.789'); // true
$validator->isValid(0.8); // true
$validator->isValid(1.0); // true

$validator->isValid('1.1'); // false
$validator->isValid('-0.4'); // false
$validator->isValid(1.00001); // false
$validator->isValid(0xFF); // false
$validator->isValid('foo'); // false
]]></programlisting>
        </example>
    </sect3>

    <sect3 id="zend.validate.set.sitemap.options">
        <title>Supported options for Zend_Validate_Sitemap_*</title>

        <para>
            There are no supported options for any of the Sitemap validators.
        </para>
    </sect3>
</sect2>
