App-Changelog2x

 view release on metacpan or  search on metacpan

lib/App/Changelog2x.pm  view on Meta::CPAN

#
###############################################################################
sub transform_changelog
{
    my ($self, $xmlin, $xmlout, $style, $params) = @_;
    $params ||= {}; # In case they didn't pass any

    our $parser = XML::LibXML->new();
    our $xslt   = XML::LibXSLT->new();

    $parser->expand_xinclude(1);
    $xslt->register_function(URI, 'format-date',
                             sub { $self->format_date(@_) });
    $xslt->register_function(URI, 'credits',
                             sub { $self->credits(@_) });

    our (%params, $xsltc, $source, $stylesheet, $result);

    # If the template isn't already an absolute path, use the root-dir and add
    # the "changelog2" prefix and ".xslt" suffix
    unless ($style =~ /^<\?xml/)

lib/App/changelog2x/common-xhtml.xslt  view on Meta::CPAN

  -->
  <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" />
      <xsl:value-of select="$indent" />
      <xsl:text>Generated on </xsl:text>
      <xsl:value-of select="$now" />
      <xsl:value-of select="$newline" />



( run in 1.785 second using v1.01-cache-2.11-cpan-97f6503c9c8 )