view release on metacpan or search on metacpan
---
name: App-Changelog2x
version: 0.11
author:
- 'Randy J. Ray <rjray@blackperl.com>'
abstract: A script to generate XHTML and text from ChangeLogML XML
license: perl
resources:
license: http://dev.perl.org/licenses/
build_requires:
Module::Build: 0.28
Test::More: 0.80
requires:
DateTime: 0.45
DateTime::Format::ISO8601: 0.06
Exporter: 5.57
App::Changelog2x - Utilities to transform ChangeLogML using Perl
Version: 0.11
WHAT IS IT
This package is a sample application using Perl, that transforms project
change-log data written as ChangeLogML into various types of output. It
can produce clean XHTML output, as well as plain-text that closely resembles
traditional "Changes" files.
USING App::Changelog2x
See the docs for the changelog2x script that is installed along with the
module.
BUILDING/INSTALLING
bin/changelog2x view on Meta::CPAN
=head1 DESCRIPTION
This script is a simple example of transforming B<ChangeLogML> mark-up into
user-friendly formats. The application itself does very little work; it's
purpose is mainly to process and handle the command-line options, then
delegate the actual work to the B<App::Changelog2x> (L<App::Changelog2x>)
module.
B<changelog2x> installs with a set of sample XSLT stylesheets, as well as the
XML Schema definition of B<ChangeLogML>. These stylesheets allow conversion
to valid XHTML (with comprehensive use of CSS classes for styling), a
plain-text format based on typical C<ChangeLog> files in use, and a variety
of snippets useful for inclusion or embedding within other documents.
=head1 OPTIONS
There are two distinct groups of options: application options that are used by
B<changelog2x>, and stylesheet options that are passed through to the XSLT
processor for use/recognition by the processor itself. The latter group of
options control such things as URLs for CSS, sorting order, etc.
bin/changelog2x view on Meta::CPAN
Some of the options only apply to certain of the stylesheets. This is denoted
by listing the templates that the option affects in square brackets after the
option-type.
=over 4
=item --notoc (boolean) [ html ]
This is a boolean option. If given, it disables the generation of the
shortcut-links at the top of the full-page XHTML rendition of the ChangeLogML
file.
=item --versions STRING [ div, dl, html, text, ul ]
A string that specifies which release-versions should be processed. By default,
all C<< <release> >> blocks are processed. If this parameter is given, it
acts as a sort of filter to limit the set of releases. The acceptable values
for the string are:
=over 8
bin/changelog2x view on Meta::CPAN
end, this option allows the user to specify an explicit CSS style-name to give
to the containing elements that are generated. In the case of the
C<htmlnewest> stylesheet, this is a C<< <div> >>. In the case of
C<htmlversion>, it is a C<< <span> >>. See the documentation below
(L</"Template Option Values">) for the default class names for each of the
templates.
=item --css URL [ html ]
Specifies a URL to be used as the basic CSS stylesheet when rendering a
complete XHTML document. If given, a C<< <link> >> element is created in the
document's C<< <head> >> section with the C<rel> attribute set to
C<stylesheet>, the C<type> attribute set to C<text/css> and the C<href>
attribute set to the value of this parameter. No checking is done on the URL,
and no constraints are applied. The URL may be absolute, relative, etc.
The only distinction between this parameter and the next one, is that this one
will occur first in the C<< <head> >> block, and thus be first in the CSS
cascade model.
=item --color URL [ html ]
bin/changelog2x view on Meta::CPAN
This element occurs I<after> any content specified in the C<headcontent> (or
appliction option C<headcontentfile>) is included in the output. Thus, it can
safely refer to any functions, etc. defined in that content.
=item --headcontent STRING [ html ]
=item --bodycontent STRING [ html ]
These options allow for the user to provide arbitrary content for the C<<
<head> >> and/or C<< <body> >> sections of the XHTML document, when rendering
a full document with the C<html> template.
Realizing that the generalized stylesheets provided by this package won't fit
every user's needs, these options are a sort of "wildcard" pass to include
anything that can't be achieved by the existing stylesheet-targeted
parameters. Note that as command-line arguments, they are limited as to how
complex the values can be. Hence the C<headcontentfile> and C<bodycontentfile>
options, which are handled by the application before processing is handed off
to B<XML::LibXSLT>. Also note that the file-oriented options to the
application will override any values passed in via either of these options.
bin/changelog2x view on Meta::CPAN
C<name=value>, where C<name> is the name the parameter will have when passed
to the XSLT processor, and C<value> will be the content of the parameter.
=back
=head2 Template Option Values
This application installs with (at present) nine pre-defined stylesheets
available for use. These are the potential values of the C<template> option
to the application (the default being C<html>). The stylesheets fall into
two groups: XHTML and plain-text.
=head3 XHTML templates
These templates produce content that is either complete, valid XHTML, or
snippets that are conformant and should be easily included in larger
documents:
=over 4
=item html
This is the default stylesheet, which generates a complete XHTML document.
The C<< <body> >> tag and all its children will have a CSS classes associated
with them that indicate the hierarchy to some extent, and allow for
comprehensive styling via CSS.
The structure of the document is basically:
HEAD
headcontent parameter
<title>
CSS parameters
bin/changelog2x view on Meta::CPAN
This stylesheet renders a structure similar to the above, except that it only
produces the C<< <div >> element that contains the release blocks. Referring
to the structure above, this is the C<< <div> >> that immediately follows the
first C<< <hr> >>. An XML comment is included with some information on the
version of the stylesheet used, as well as tools. However, no visible content
is included (i.e., no "footer" as follows the second C<< <hr> >> in the layout
above).
=item ul
Like the previous stylesheet, this produces an XHTML fragment suitable for
inclusion in a larger document. However, it differs in that the outermost
container is not a C<< <div> >>, but instead a C<< <ul> >>. The containing
C<< <ul> >> is assigned a different CSS class than the C<< <ul> >> containers
used for change-blocks. Each release-block is rendered within one C<< <li> >>
child-element (which is also assigned a distinct class from the similar
elements used within the change-blocks). This stylesheet also includes some
diagnostic information as an XML/XHTML comment, but does not include it in
any visible elements.
=item dl
As with the previous two stylesheets, this produces an XHTML fragment for
inclusion in other documents. In this case, the outermost container element is
a C<< <dl> >>. The structure of this template's output is also somewhat
different: where the previous two rendered each release-block in the same
manner as the whole-document stylesheet, this stylesheet moves the
pseudo-heading line that contains the word "Version" followed by the release's
version number into the C<< <dt> >> element, and renders the remainder of the
release block in the C<< <dd> >> element. As with the others, the stylesheet
also includes some diagnostic information as an XML/XHTML comment, but does
not include it in any visible elements.
=item htmlnewest
This is a special variation of the C<div> stylesheet, that contains exactly
one release-block, that of the most-recent release (as sorted by date). The
outermost container is a C<< <div> >> element whose CSS class dfaults to the
same class used for the top-most container in the other templates. However,
the user may specify a different CSS class with the C<class> stylesheet
parameter (see L</"Stylesheet Options">), if they wish to have this XHTML
bin/changelog2x view on Meta::CPAN
This is similar to the previous stylesheet, but only renders a single
C<< <span> >> tag containing the version-string of the newest release (as
sorted by date). The element is assigned a CSS class whose name fits within
the general naming scheme of other CSS classes used in these templates. As
with the previous, the class can be specified by the user via the C<class>
parameter.
=back
For all varieties of XHTML output, any elements in C<< <description> >> blocks
that belong to the namespace set aside by the W3C for XHTML
(C<http://www.w3.org/1999/xhtml>) are copied into the output verbatim, except
that a C<class> attribute is added to allow the user to include CSS style
information with the rest of the changelog-related CSS declarations. If the
element already has a C<class> attribute, it is copied over and the new class
name added at the end of the existing content. The new class name is created
by appending the tag name to the string C<changelog-html->. Thus, an element
C<p> gets the class C<changelog-html-p>. For example (assuming that the
C<xhtml> prefix has been declared to reference the XHTML namespace), the
following content:
<xhtml:a href="http://perl.org">perl.org</xhtml:a>
yields this output:
<a href="http://perl.org" class="changelog-html-a">perl.org</a>
The following content (which already has a C<class> attribute):
bin/changelog2x view on Meta::CPAN
This template is the plain-text counterpart to C<htmlversion>. It outputs just
the version-string of the most-recent release. It does I<not> output a newline
character, so that the result of this can be saved to a file that can be later
inserted into other files without bringing in a potentially-unwanted
line-break. (As opposed to the output of the C<textnewest> stylesheet, above,
which ends in a fully-formatted paragraph for which an ending newline makes
sense.)
=back
All stylesheets that generate plain-text will strip XHTML elements out of
the output while retaining the text content they have. Thus, a construct like
the example used above:
<xhtml:a href="http://www.perl.org">perl.org</xhtml:a>
will output as plain text simply:
perl.org
Null elements such as C<< <br /> >> or C<< <p></p> >> will not add anything
to the output.
As with the XHTML templates, XML tags that are not part of ChangeLogML or
XHTML are removed completely. Their present is tolerated, however, to allow
for future integration of additional metadata.
=head2 CSS Class Hierarchy
To illustrate the hierarchy of classes used to allow CSS styling, the diagram
from earlier is revisited and revised:
<body class="changelog">
<h1 class="changelog-title" />
<div class="changelog-abstract" />
The files in this directory are sample applications (other than the
changelog2x script) and sample CSS stylesheets that can be used with
the XHTML output styles.
The changelog2x script allows two CSS files to be specified (not counting
the open-ended 'headcontent' or 'headcontentfile' command-line parameters).
The main one, specified with the '--css' option, is assumed to be general
styling, fonts, spacing, etc. The second, specified via '--color', can be
used to select a color-scheme defined using the same class names and applied
via the cascade mode.
FILES:
changelogml.css
This is a basic set of styles for the XHTML content, with no colors
explicitly specified. It sets up fonts, spacing, etc. The fonts preference
is for the Deja Vu Sans family, falling back to Bitstream Vera Sans,
Helvetica, then finally Arial. No specific font is given for fixed-width
text in the filenames, but the table-of-contents links are styled to use
Deja Vu Sans Mono, falling back to Bitstream Vera Sans Mono, Courier New
and finally monospace. The <ul> containers used for listing filenames have
the <li> tags styled to use the "»" character in place of the traditional
bullet.
black-white.css
lib/App/changelog2x/ChangeLogML.xsd view on Meta::CPAN
<xsd:restriction base="xsd:string">
<xsd:pattern value="\d+(\.\d+)*" />
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType id="informationType" name="informationType" mixed="true">
<xsd:annotation>
<xsd:documentation>
An informationType is an open-ended container type that allows
mixed-content which can include elements from other XML namespaces.
This allows users to include Dublin Core metadata, XHTML tags, etc. as
desired within the <description> and similar blocks. It also
allows for open-ended extension of ChangeLogML with things such as
source-control specification, etc.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence maxOccurs="unbounded" minOccurs="0">
<xsd:any processContents="lax" />
</xsd:sequence>
<xsd:attribute name="source" type="xsd:anyURI" use="optional">
<xsd:annotation>
lib/App/changelog2x/changelog2div.xslt view on Meta::CPAN
<?xml version="1.0" encoding="UTF-8"?>
<!--
:tabSize=2:indentSize=2:wrap=hard:
$Id: changelog2div.xslt 8 2009-01-19 06:46:50Z rjray $
This XSLT stylesheet transforms ChangeLogML content into a XHTML
fragment whose top-level element is a "div". The container is given
an ID attribute of "changelog-container", and a class that follows in
the pattern of all the changelog-derived XHTML elements.
The template recognizes the following input parameters:
versions
A list of one or more version-strings against which the @version
attribute of a release is checked before it is processed. The
special value "all" (the default value) means to process all
releases, and the special value "first" means to process only the
first version seen (sensitive to sorting order).
order
lib/App/changelog2x/changelog2div.xslt view on Meta::CPAN
This snippet contains most of the core XHTML-generation templates. It will
also be used by the stylesheets that generate only div's, ul's, etc.
Some will use xsl:import rather than xsl:include so as to override some
functionality, but for this stylesheet everything is needed as-is.
-->
<xsl:include href="common-xhtml.xslt" />
<!--
This snippet-file contains common variable declarations (date at the moment,
the "credits" string to identify the processor) and non-content templates
such as the date-formatter (which only returns a string, no XHTML or
plain-text-specific material).
-->
<xsl:include href="common.xslt" />
<xsl:strip-space elements="*" />
<xsl:output method="xml" indent="no" omit-xml-declaration="yes" />
<!--
The "versions" parameter controls which releases go into the output. Valid
values are "all" (default), "first" or a list of one-or-more specific
lib/App/changelog2x/changelog2div.xslt view on Meta::CPAN
strings, to allow for multiple dots and/or alphabetic characters. Keep this
in mind before complaining that 0.15 sorted before 0.4...
-->
<xsl:param name="order" select="'descending'" />
<!-- Here is where actual "real" processing begins... -->
<!--
For this stylesheet, the desired output is just the div-container that
itself contains all the release-divs (possibly trimmed down by the
'versions' parameter). None of the rest of the XHTML boilerplate is
needed.
-->
<xsl:template match="/">
<xsl:call-template name="insert-comment">
<xsl:with-param name="id"><![CDATA[$Id: changelog2div.xslt 8 2009-01-19 06:46:50Z rjray $]]></xsl:with-param>
</xsl:call-template>
<div xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
id="changelog-container" class="changelog-container-div"><xsl:value-of select="$newline" />
<xsl:for-each select="cl:changelog//cl:release">
<xsl:sort select="@date" data-type="text" order="{$order}" />
lib/App/changelog2x/changelog2dl.xslt view on Meta::CPAN
<?xml version="1.0" encoding="UTF-8"?>
<!--
:tabSize=2:indentSize=2:wrap=hard:
$Id: changelog2dl.xslt 8 2009-01-19 06:46:50Z rjray $
This XSLT stylesheet transforms ChangeLogML content into a XHTML
fragment whose top-level element is a "dl". The container is given
an ID attribute of "changelog-container", and a class that follows in
the pattern of all the changelog-derived XHTML elements. This container
differs slightly from the other XHTML fragment-generators, as the
revision-banner (the pseudo-title text) is made the content of the "dt"
element, rather than being contained within the main release-div. The
release-div is the content of the "dd" element, and is identical to the
release-div of all the other fragment-styles, save for the absence of
the revision-banner.
The template recognizes the following input parameters:
versions
A list of one or more version-strings against which the @version
lib/App/changelog2x/changelog2dl.xslt view on Meta::CPAN
<!--
This snippet contains most of the core XHTML-generation templates. For this
stylesheet, use "import" rather than "include" so that we can override the
template for cl:release.
-->
<xsl:import href="common-xhtml.xslt" />
<!--
This snippet-file contains common variable declarations (date at the moment,
the "credits" string to identify the processor) and non-content templates
such as the date-formatter (which only returns a string, no XHTML or
plain-text-specific material).
-->
<xsl:include href="common.xslt" />
<xsl:strip-space elements="*" />
<xsl:output method="xml" indent="no" omit-xml-declaration="yes" />
<!--
The "versions" parameter controls which releases go into the output. Valid
values are "all" (default), "first" or a list of one-or-more specific
lib/App/changelog2x/changelog2dl.xslt view on Meta::CPAN
strings, to allow for multiple dots and/or alphabetic characters. Keep this
in mind before complaining that 0.15 sorted before 0.4...
-->
<xsl:param name="order" select="'descending'" />
<!-- Here is where actual "real" processing begins... -->
<!--
For this stylesheet, the desired output is a dl container that itself
contains all the release-divs (possibly trimmed down by the 'versions'
parameter) as the dt/dd children. None of the rest of the XHTML boilerplate
is needed.
-->
<xsl:template match="/">
<xsl:call-template name="insert-comment">
<xsl:with-param name="id"><![CDATA[$Id: changelog2dl.xslt 8 2009-01-19 06:46:50Z rjray $]]></xsl:with-param>
</xsl:call-template>
<dl xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
id="changelog-container" class="changelog-container-dl"><xsl:value-of select="$newline" />
<xsl:for-each select="cl:changelog//cl:release">
<xsl:sort select="@date" data-type="text" order="{$order}" />
lib/App/changelog2x/changelog2html.xslt view on Meta::CPAN
This snippet contains most of the core XHTML-generation templates. It will
also be used by the stylesheets that generate only div's, ul's, etc.
Some will use xsl:import rather than xsl:include so as to override some
functionality, but for this stylesheet everything is needed as-is.
-->
<xsl:include href="common-xhtml.xslt" />
<!--
This snippet-file contains common variable declarations (date at the moment,
the "credits" string to identify the processor) and non-content templates
such as the date-formatter (which only returns a string, no XHTML or
plain-text-specific material).
-->
<xsl:include href="common.xslt" />
<xsl:strip-space elements="*" />
<xsl:output method="html" indent="no"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" />
<!--
The "versions" parameter controls which releases go into the output. Valid
values are "all" (default), "first" or a list of one-or-more specific
values, comma-separated, that are tested against the "version" attribute of
each <release> tag/block.
-->
<xsl:param name="versions" select="'all'" />
<!--
lib/App/changelog2x/changelog2html.xslt view on Meta::CPAN
<!--
These two parameters allow for generic large-scale content additions in
the <head> and <body> blocks. No testing or checking is done on them.
-->
<xsl:param name="headcontent" />
<xsl:param name="bodycontent" />
<!--
This template is the start of it all, matching at root and handling the
set-up of the overall XHTML document. It picks over the top-most elements
of the ChangeLog being processed to create title, abstract, etc. Then it
passes off the child-elements to the templates that were pulled in via
the inclusion of common-xhtml.xslt.
-->
<xsl:template match="/">
<xsl:variable name="suppress_toc">
<xsl:choose>
<xsl:when test="($notoc = '') and ($versions = 'all') and (count(/cl:changelog//cl:release) > 1)">
<xsl:value-of select="''" />
</xsl:when>
lib/App/changelog2x/changelog2htmlnewest.xslt view on Meta::CPAN
<?xml version="1.0" encoding="UTF-8"?>
<!--
:tabSize=2:indentSize=2:wrap=hard:
$Id: changelog2htmlnewest.xslt 8 2009-01-19 06:46:50Z rjray $
This XSLT stylesheet transforms ChangeLogML content into a XHTML
fragment whose top-level element is a "div". The container is given
an ID attribute of "changelog-container", and a class that either
follows in the pattern of all the changelog-derived XHTML elements or
is provided by the user. The content of the top-level div is just one
release-div, that of the newest release as sorted by the @date
attributes.
The template recognizes only the following input parameter:
class
Allows the user to specify the CSS class for the top-level div. If
this is not passed, then the default class is "changelog-container-div".
-->
lib/App/changelog2x/changelog2htmlnewest.xslt view on Meta::CPAN
This snippet contains most of the core XHTML-generation templates. It will
also be used by the stylesheets that generate only div's, ul's, etc.
Some will use xsl:import rather than xsl:include so as to override some
functionality, but for this stylesheet everything is needed as-is.
-->
<xsl:include href="common-xhtml.xslt" />
<!--
This snippet-file contains common variable declarations (date at the moment,
the "credits" string to identify the processor) and non-content templates
such as the date-formatter (which only returns a string, no XHTML or
plain-text-specific material).
-->
<xsl:include href="common.xslt" />
<xsl:strip-space elements="*" />
<xsl:output method="xml" indent="no" omit-xml-declaration="yes" />
<!--
The "class" parameter controls the CSS class assigned to the outer-most
containing div element. The rest of the content uses the same set of
lib/App/changelog2x/changelog2htmlversion.xslt view on Meta::CPAN
This snippet contains most of the core XHTML-generation templates. It will
also be used by the stylesheets that generate only div's, ul's, etc.
Some will use xsl:import rather than xsl:include so as to override some
functionality, but for this stylesheet everything is needed as-is.
-->
<xsl:include href="common-xhtml.xslt" />
<!--
This snippet-file contains common variable declarations (date at the moment,
the "credits" string to identify the processor) and non-content templates
such as the date-formatter (which only returns a string, no XHTML or
plain-text-specific material).
-->
<xsl:include href="common.xslt" />
<xsl:strip-space elements="*" />
<xsl:output method="xml" indent="no" omit-xml-declaration="yes" />
<!--
The "class" parameter controls the CSS class assigned to the outer-most
containing div element. The rest of the content uses the same set of
lib/App/changelog2x/changelog2text.xslt view on Meta::CPAN
This snippet contains most of the core text-generation templates. It will
also be used by the stylesheets that generate only partial content. Some
may use xsl:import rather than xsl:include so as to override some
functionality, but for this stylesheet everything is needed as-is.
-->
<xsl:include href="common-text.xslt" />
<!--
This snippet-file contains common variable declarations (date at the moment,
the "credits" string to identify the processor) and non-content templates
such as the date-formatter (which only returns a string, no XHTML or
plain-text-specific material).
-->
<xsl:include href="common.xslt" />
<xsl:strip-space elements="*" />
<xsl:output method="text" indent="no"/>
<!--
The "versions" parameter controls which releases go into the output. Valid
values are "all" (default), "first" or a list of one-or-more specific
lib/App/changelog2x/changelog2textnewest.xslt view on Meta::CPAN
This snippet contains most of the core text-generation templates. It will
also be used by the stylesheets that generate only partial content. Some
may use xsl:import rather than xsl:include so as to override some
functionality, but for this stylesheet everything is needed as-is.
-->
<xsl:include href="common-text.xslt" />
<!--
This snippet-file contains common variable declarations (date at the moment,
the "credits" string to identify the processor) and non-content templates
such as the date-formatter (which only returns a string, no XHTML or
plain-text-specific material).
-->
<xsl:include href="common.xslt" />
<xsl:strip-space elements="*" />
<xsl:output method="text" indent="no"/>
<!--
This template starts the process, at the root of the ChangeLogML document.
For this style, we only want the newest of the releases, with none of the
lib/App/changelog2x/changelog2textversion.xslt view on Meta::CPAN
This snippet contains most of the core text-generation templates. It will
also be used by the stylesheets that generate only partial content. Some
may use xsl:import rather than xsl:include so as to override some
functionality, but for this stylesheet everything is needed as-is.
-->
<xsl:include href="common-text.xslt" />
<!--
This snippet-file contains common variable declarations (date at the moment,
the "credits" string to identify the processor) and non-content templates
such as the date-formatter (which only returns a string, no XHTML or
plain-text-specific material).
-->
<xsl:include href="common.xslt" />
<xsl:strip-space elements="*" />
<xsl:output method="text" indent="no"/>
<!-- Actual content processing begins here -->
<!--
lib/App/changelog2x/changelog2ul.xslt view on Meta::CPAN
<?xml version="1.0" encoding="UTF-8"?>
<!--
:tabSize=2:indentSize=2:wrap=hard:
$Id: changelog2ul.xslt 8 2009-01-19 06:46:50Z rjray $
This XSLT stylesheet transforms ChangeLogML content into a XHTML
fragment whose top-level element is a "ul". The container is given
an ID attribute of "changelog-container", and a class that follows in
the pattern of all the changelog-derived XHTML elements. Each of the
per-release "div" blocks are contained with "li" elements.
The template recognizes the following input parameters:
versions
A list of one or more version-strings against which the @version
attribute of a release is checked before it is processed. The
special value "all" (the default value) means to process all
releases, and the special value "first" means to process only the
first version seen (sensitive to sorting order).
lib/App/changelog2x/changelog2ul.xslt view on Meta::CPAN
This snippet contains most of the core XHTML-generation templates. It will
also be used by the stylesheets that generate only div's, ul's, etc.
Some will use xsl:import rather than xsl:include so as to override some
functionality, but for this stylesheet everything is needed as-is.
-->
<xsl:include href="common-xhtml.xslt" />
<!--
This snippet-file contains common variable declarations (date at the moment,
the "credits" string to identify the processor) and non-content templates
such as the date-formatter (which only returns a string, no XHTML or
plain-text-specific material).
-->
<xsl:include href="common.xslt" />
<xsl:strip-space elements="*" />
<xsl:output method="xml" indent="no" omit-xml-declaration="yes" />
<!--
The "versions" parameter controls which releases go into the output. Valid
values are "all" (default), "first" or a list of one-or-more specific
lib/App/changelog2x/changelog2ul.xslt view on Meta::CPAN
strings, to allow for multiple dots and/or alphabetic characters. Keep this
in mind before complaining that 0.15 sorted before 0.4...
-->
<xsl:param name="order" select="'descending'" />
<!-- Here is where actual "real" processing begins... -->
<!--
For this stylesheet, the desired output is a ul container that itself
contains all the release-divs (possibly trimmed down by the 'versions'
parameter) as the li's. None of the rest of the XHTML boilerplate is
needed.
-->
<xsl:template match="/">
<xsl:call-template name="insert-comment">
<xsl:with-param name="id"><![CDATA[$Id: changelog2ul.xslt 8 2009-01-19 06:46:50Z rjray $]]></xsl:with-param>
</xsl:call-template>
<ul xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
id="changelog-container" class="changelog-container-ul"><xsl:value-of select="$newline" />
<xsl:for-each select="cl:changelog//cl:release">
<xsl:sort select="@date" data-type="text" order="{$order}" />
lib/App/changelog2x/common-xhtml.xslt view on Meta::CPAN
<?xml version="1.0" encoding="UTF-8"?>
<!--
:tabSize=2:indentSize=2:wrap=hard:
$Id: common-xhtml.xslt 8 2009-01-19 06:46:50Z rjray $
This XSLT stylesheet contains all the operations/templates that are
common to the XHTML stylesheets.
-->
<xsl:stylesheet version="1.0"
xmlns:cl="http://www.blackperl.com/2009/01/ChangeLogML"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns="http://www.w3.org/1999/xhtml">
<!--
The source-control identifying string for this component, used in some
credits-comments.
-->
<xsl:variable name="common-xhtml-id">
<xsl:text><![CDATA[$Id: common-xhtml.xslt 8 2009-01-19 06:46:50Z rjray $]]></xsl:text>
</xsl:variable>
<!--
This template creates a simple XML/XHTML comment block that contains the
current date/time stamp from the global parameter "$now", the string of
app/library information from the global "$credits", and whatever the caller
passed in the parameter "id" (usually the "Id" keyword from the version-
control system, expanded for the calling file).
-->
<xsl:template name="insert-comment">
<xsl:param name="id" select="''" />
<xsl:param name="indent" select="' '" />
<xsl:comment>
<xsl:value-of select="$newline" />
lib/App/changelog2x/common.xslt view on Meta::CPAN
<?xml version="1.0" encoding="UTF-8"?>
<!--
:tabSize=2:indentSize=2:wrap=hard:
$Id: common.xslt 4 2009-01-07 13:02:06Z rjray $
This XSLT stylesheet contains all the operations/templates that are
common to both XHTML and plain-text stylesheets. Mostly this is
focused on date-formatting and the "credits" string (the list of
software components responsible for the XSLT processing).
-->
<xsl:stylesheet version="1.0"
xmlns:cl="http://www.blackperl.com/2009/01/ChangeLogML"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:date="http://exslt.org/dates-and-times"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns="http://www.w3.org/1999/xhtml"
extension-element-prefixes="date">