www-infrastructure-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Meyer <rme...@hotmail.co.uk>
Subject Markdown referencing perl variables
Date Thu, 10 Jul 2014 09:37:42 GMT

Following on from an earlier ticket (https://issues.apache.org/jira/browse/INFRA-7929), I
am looking for help in trying to modify FOP's path.pm file to allow mdtext files to take their
version numbers from a perl variable. I know from several examples (thrift and mina) that
this can be accomplished by replacing hardcoded values with references like the following:

Current version: {{ current_version }}

I am still unclear on the patterns aspect and which one I should be using. I have experimented
with single_narrative and snippet's without much success. The furthest I have got was to use
a sitemap which references a single mdtext file as an example. Whilst the value is replaced
in the output it is not converted to HTML and left in it's markdown format (probably caused
by an error I get during conversion):

our $current_version = "2.0";

our @patterns = (

        [qr!/index\.mdtext$!, sitemap => {
        headers => { title => "Sitemap" },
        sidenav => "xgc-sidenav.mdtext",
        footer  => "bottom.html",
        header  => "xgc-top.html",
        current_version => $current_version,

    } ],

I am very much a perl novice and so am struggling to decipher what the methods (sitemap, single_narrative,
snippet) are actually doing and require as inputs. If anyone could provide a few pointers
or maybe a simple example just to show how to replace a simple reference using one of these
methods I would be most grateful. 

We already have some predefined patterns which I'd need to change but hopefully provide the
same result: http://svn.apache.org/repos/asf/xmlgraphics/site/trunk/lib/path.pm

Many thanks,

Robert Meyer (Apache FOP project)
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message