forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g4 <ja...@root10.net>
Subject Re: [PATCH] Variables in SVG
Date Tue, 15 Jul 2003 09:42:32 GMT
Hi Juan,
Yes I'll check out, I wont be able to do so till later on. I will do it 
though ;)

On Tuesday, Jul 15, 2003, at 09:13 Europe/London, Juan Jose Pablos 
wrote:

> Jason,
>
> This patch would work if you add id="group-name" or id="project-name" 
> like this:
>
> <text id="project-name" />
>
> Would anyone review this patch?
>
> Cheers
>
> Cheche
>
>
> ,eg4 wrote:
>> Hi List,
>> Quick question, how would I put variables into SVG, so that for 
>> example I could have $Group Logo in SVG text?
>> Jason Lane
>> Developer
>> Root10 developments
>
> Index: src/resources/conf/resources.xmap
> ===================================================================
> RCS file: 
> /home/cvspublic/xml-forrest/src/resources/conf/resources.xmap,v
> retrieving revision 1.1
> diff -u -r1.1 resources.xmap
> --- src/resources/conf/resources.xmap	5 Jul 2003 13:01:02 -0000	1.1
> +++ src/resources/conf/resources.xmap	15 Jul 2003 08:10:38 -0000
> @@ -88,6 +88,7 @@
>          <map:select type="exists">
>            <map:when test="resources/images/{1}.svg">
>              <map:generate src="resources/images/{1}.svg" />
> +	    <map:transform 
> src="resources/stylesheets/svg2svg-renamelogo.xsl" />
>              <map:serialize type="svg2png" />
>            </map:when>
>            <map:otherwise>
> <?xml version="1.0"?>
>
> <!--+
>     | Replace the <text id"display-name" /> with either 
> project-name|group-name.
>     |
>     | Author: Juan Jose Pablos "cheche@apache.org"
>     |
>     | Add <map:transform 
> src="resources/stylesheets/svg2svg-renamelogo.xsl" />
>     | on resources.xmap and id="xxx-name" on the svg file to work.
>     | CVS $Revision: $
>     +-->
>
> <xsl:stylesheet version="1.0" 
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
>   <xsl:param name="config-file" select="'../../skinconf.xml'"/>
>   <xsl:variable name="config" 
> select="document($config-file)/skinconfig"/>
>    <xsl:variable name="project-name"
>       select="$config/project-name"/>
>    <xsl:variable name="group-name"
>       select="$config/group-name"/>
>
>    <xsl:template match="node() [@id='project-name']">
>    <xsl:copy >
>       <xsl:apply-templates select="@*"/>
>    <xsl:value-of select="$project-name"/>
>    </xsl:copy>
>   </xsl:template>
>
>    <xsl:template match="node() [@id='group-name']">
>    <xsl:copy >
>       <xsl:apply-templates select="@*"/>
>    <xsl:value-of select="$group-name"/>
>    </xsl:copy>
>   </xsl:template>
>
>    <xsl:template match="@*|*|text()|processing-instruction()" 
> priority="-1">
>      <xsl:copy>
>       <xsl:apply-templates 
> select="@*|*|text()|processing-instruction()"/>
>   </xsl:copy>
>    </xsl:template>
>
>
> </xsl:stylesheet>
>
>
Jason Lane

Developer
Root10 developments


Mime
View raw message