<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
    xmlns:ai="https://www.example.com/ai-sitemap/1.0">
<xsl:output method="html" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<html>
<head>
    <title>AI Sitemap Viewer</title>
    <meta charset="UTF-8"/>
    <style>
        body{font-family:Arial,sans-serif;margin:40px;background:#f6f7f7;color:#1d2327}
        h1{margin-bottom:8px}
        .note{color:#50575e;margin-bottom:24px}
        table{border-collapse:collapse;width:100%;background:#fff}
        th,td{border:1px solid #ccd0d4;padding:10px;text-align:left;vertical-align:top}
        th{background:#f0f0f1}
        code{font-size:13px}
        a{color:#2271b1}
    </style>
</head>
<body>
    <h1>AI Sitemap Viewer</h1>
    <p class="note">Human-readable view. Search engines and AI crawlers read the XML source directly.</p>
    <table>
        <tr>
            <th>URL</th>
            <th>Last modified</th>
            <th>Change frequency</th>
            <th>Priority</th>
            <th>AI title / summary</th>
        </tr>
        <xsl:for-each select="sitemap:urlset/sitemap:url">
            <tr>
                <td><a href="{sitemap:loc}"><xsl:value-of select="sitemap:loc"/></a></td>
                <td><xsl:value-of select="sitemap:lastmod"/></td>
                <td><xsl:value-of select="sitemap:changefreq"/></td>
                <td><xsl:value-of select="sitemap:priority"/></td>
                <td>
                    <strong><xsl:value-of select="ai:title"/></strong>
                    <br/>
                    <small><xsl:value-of select="ai:summary"/></small>
                </td>
            </tr>
        </xsl:for-each>
    </table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>