forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin <kevi...@mail.portland.co.uk>
Subject Re: skinconf text elements in group.svg
Date Mon, 11 Apr 2005 21:08:14 GMT
Hi Rick,

Thanks for your help and the discussion link below.

Kevin.

----

Rick Tessner wrote:

> On Mon, 2005-04-11 at 18:14 +0100, Kevin wrote:
> 
> 
>>My real world example skinconf.xml:
>>...
>>  <group-svg>
>>     <font>28pt</font>
>>     <text-anchor x="0%">start</text-anchor>
>>   </group-svg>
>>
>>   <project-svg>
>>     <font>28pt</font>
>>     <text-anchor x="95%">end</text-anchor>
>>   </project-svg>
>>...
> 
> 
> Hi Kevin,
> 
> I think that with what you're trying to accomplish here, you are better
> off using the full power of XSL.
> 
> The project2text.xsl is really just a simple little XSL to easily
> substitute bits from the skinconf.xml into an SVG without having to
> resort to a full XSL that transforms the entire skinconf.xsl and creates
> SVG on the back end.
> 
> In Forrest, there are currently two different methods used in generating
> SVGs:
> 
>      1. Use an XSL to transform the skinconf.xml into SVG
>      2. Write an SVG that references values in skinconf.xml via the
>         <for:*> and project2text.xsl.
> 
> The first method brings the full power of XSL  to bear.  The second is
> easier to read and understand, but less powerful in terms of what can be
> done.
> 
> There was also a few emails on the dev@forrest list this weekend about
> skinconf that may interest you as well.
> 
> In particular, the emails referenced the FOR-144 issue
> ( http://issues.cocoondev.org/browse/FOR-144 ) about an extensible skin
> configuration and defining a new format for skinconf.xml.
> 
> That issue references an email thread from last year that you may be
> interested in following as well.  That thread does bring up the issue
> that there is a DTD for the skinconif.xml.  The changes that you and I
> have been playing with do break that DTD. :)
> 
> And, that, fundamentally is what the above discussion in FOR-144 and the
> associated email thread is about.  How to make the skinconf.xml more
> extensible. :)
> 
>         <snip what="project.svg.xslt"/>
> 
> This project.svg.xslt is the first method of generating SVGs that I
> mentioned above.  And, as you've seen, it gives you a lot of control
> over what you generate.
> 
>         <snip what="project.svg using project2text.xsl"/>
> 
> 
>>It gets quite complicated. I couldn't think of a way of
>>getting @x of <text> without resorting to the way I get
>>at @value of <color> below. Also I did try and substitute
>>the whole element. ie.
> 
> 
> Exactly.  This is the second method of generating SVGs mentioned above.
> Much easier to read the project.svg and understand what it's doing but
> not as much flexibility and power as the first method using XSL
> directly.
> 
> And, no, the @attributes are not currently copied by project2text.xsl.
> 
>         <snip what="more xsl transforming the skinconf"/>
> 
> Yup, I think that XSL is probably the best way to continue with what
> you're trying to do.
> 
> Hope this helps,
> 

Mime
View raw message