view xsls/dirmap.xsls @ 1202:2d3dd37a0fc8

Fixed the pubDate element spelling. While most feed readers happily ignore the improper lowercase spelling of the element, some feed validators and aggregators are picky and mark the feed as broken.
author Konstantin Pavlov <thresh@nginx.com>
date Thu, 22 May 2014 14:44:42 +0400
parents 333eccb8a7f6
children
line wrap: on
line source

<!--
  Copyright (C) Nginx, Inc.
  -->

X:stylesheet {

X:output method="text";

X:strip-space elements="*";

X:template = "link" {
    !{@id}
    X:text{ }
    !{substring-before(@doc, '.xml')}
    X:text{.html#}
    !{@id}
    X:text{;&#10;}
}

X:template = "link[@id = 'include']" {
    X:text{\\}
    !{@id}
    X:text{ }
    !{substring-before(@doc, '.xml')}
    X:text{.html#}
    !{@id}
    X:text{;&#10;}
}

X:template = "link[starts-with(@id, 'var_')]" {
    X:text{$}
    !{substring-after(@id, 'var_')}
    X:text{ }
    !{substring-before(@doc, '.xml')}
    X:text{.html#}
    !{@id}
    X:text{;&#10;}
}

X:template = "links | varlinks" {
    X:for-each "link", X:sort "@id" {
        X:if "count(preceding-sibling::link[@id = current()/@id]) = 0" {
            !! ".";
        }
    }
}

}