You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Juan Jose Pablos <ch...@che-che.com> on 2004/04/13 01:50:32 UTC
svg error
Si,
I have been digging on this error:
ERROR (2004-04-12) 21:10.09:651 [sitemap] (/images/project.png)
PoolThread-4/TraxErrorHandler:
Error in TraxTransformer:
file:/var/tmp/fs/src/documentation/content/xdocs/images/project.svg;
Line 5; Column 41;
; SystemID:
file:/var/tmp/fs/src/documentation/content/xdocs/images/project.svg;
Line#: 5; Column#: 41
javax.xml.transform.TransformerException
it happens when you request a http://localhost:8888/images/project.png file.
For a PNG file there is a chain of call-resources
(pipe-svg2png-resource,transform-project2text,generate-resource) under
resources.xmap
on these call there is:
<map:generate src="cocoon:/skin/skinconf.xml" />
That reads a skinconf.xml and transform it to make sure that there is
not element missing on the configuration file.
By mistake this last style sheet produce a wrong skinconf file so
produce the initial error. you can check the wrong skinconf under
http://localhost:8888/skin/skinconf.xml
Now, the question is: why do we need to check for missing elements on a
skin configuration file for a png file?
would not be better to do all these checking on build time rather than
on run time?
Cheers,
Cheche (who feels that sometimes we talk too much theoretical crap
instead of looking on our code.)
Re: svg error
Posted by Nicola Ken Barozzi <ni...@apache.org>.
Juan Jose Pablos wrote:
...
> There is not need to have a xsl there, so there is not need to write it,
> so there is not need to run forrest again and again.
>
> ok, lets go back and think: could you *show me* what is the use case for
> this?
A skin can do two things: check if a value is there in every single
place it's used, or have a default value injected in.
The primary use case was for colors: I need to use a color sometimes in
many places in a skin, and checking if the value exists every time is
overkill. Instead I put there a default value and the skin uses that.
Overmore, some skins also need /variations/ of the colors, so I created
a transformer that also adds these values to the colors if it doesn't
find them.
This was the primary use case for it, and the reason I added it. It's
all in the code, and the reason why I said you were not understanding
the code.
In any case this has other good side effects: we could *remove* the DTD
from skinconf and supply default values for all the "required" tags.
This will make skinconf always backward compatible without any big effort.
Also, the skins can enhabce the user skinconf. In my company I have
created a blyko skin, that adds the blyko copyright and logo, so that
any blyko pubblication that uses that skin does not need to specify it.
For Apache we would create an Apache skin from the Forrest one, without
actually dwelving in the page transformation xslts and always remaining
compatible with subsequent Forrest skin releases.
I hope this answers your questions and makes you stop bugging me ;-P
--
Nicola Ken Barozzi nicolaken@apache.org
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
Re: svg error
Posted by Juan Jose Pablos <ch...@che-che.com>.
Nicola,
>
> Please stop it and *understand* the code you are talking about before
> making noise.
That is why I make noise, because when I understand it, I did not like
it at all.
So not only I do understand the code, I found already a bug on it.
>
> I'm -1 to changing it as it would increase the time to write the xsls
> enourmously as we would have to relaunch Forrest at every change to see
> the effect. And again, they don't only check that the skinconf is full,
> but set default values. Do you get it now?
>
There is not need to have a xsl there, so there is not need to write it,
so there is not need to run forrest again and again.
ok, lets go back and think: could you *show me* what is the use case for
this?
If I am wrong then I will fix the bug and shut up.
Cheers,
Cheche
Re: svg error
Posted by Nicola Ken Barozzi <ni...@apache.org>.
Juan Jose Pablos wrote:
...
> are you saying that there is not transformation?
> on resources.xmap:
> <map:match pattern="**skin/skinconf.xml">
> <map:generate src="{project:skinconf}" />
> <map:select type="exists">
> <map:when
> test="{project:skins-dir}{forrest:skin}/skinconf.xsl">
> <map:transform
> src="{project:skins-dir}{forrest:skin}/skinconf.xsl"/>
> </map:when>
> </map:select>
> <map:select type="exists">
> <map:when
> test="{forrest:home}context/skins/{forrest:skin}/skinconf.xsl">
> <map:transform
> src="{forrest:home}context/skins/{forrest:skin}/skinconf.xsl"/>
> </map:when>
> </map:select>
> <map:transform
> src="{forrest:home}context/skins/common/skinconf.xsl"/>
> <map:transform type="skinconf"/>
> <map:serialize type="xml" />
> </map:match>
Please stop it and *understand* the code you are talking about before
making noise.
I'm -1 to changing it as it would increase the time to write the xsls
enourmously as we would have to relaunch Forrest at every change to see
the effect. And again, they don't only check that the skinconf is full,
but set default values. Do you get it now?
--
Nicola Ken Barozzi nicolaken@apache.org
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
Re: svg error
Posted by Juan Jose Pablos <ch...@che-che.com>.
Nicola Ken Barozzi escribió:
> Juan Jose Pablos wrote:
> ...
>
>> on these call there is:
>> <map:generate src="cocoon:/skin/skinconf.xml" />
>
>
> This is used when you need to make svgs from the skinconf, like for
> example the rounded corners that are generated from the color profile.
>
Yes, I know that but
>> That reads a skinconf.xml and transform it to make sure that there is
>> not element missing on the configuration file.
>
>
> Not really (see above).
are you saying that there is not transformation?
on resources.xmap:
<map:match pattern="**skin/skinconf.xml">
<map:generate src="{project:skinconf}" />
<map:select type="exists">
<map:when
test="{project:skins-dir}{forrest:skin}/skinconf.xsl">
<map:transform
src="{project:skins-dir}{forrest:skin}/skinconf.xsl"/>
</map:when>
</map:select>
<map:select type="exists">
<map:when
test="{forrest:home}context/skins/{forrest:skin}/skinconf.xsl">
<map:transform
src="{forrest:home}context/skins/{forrest:skin}/skinconf.xsl"/>
</map:when>
</map:select>
<map:transform
src="{forrest:home}context/skins/common/skinconf.xsl"/>
<map:transform type="skinconf"/>
<map:serialize type="xml" />
</map:match>
>
>> By mistake this last style sheet produce a wrong skinconf file so
>> produce the initial error. you can check the wrong skinconf under
>> http://localhost:8888/skin/skinconf.xml
>>
>> Now, the question is: why do we need to check for missing elements on
>> a skin configuration file for a png file?
>
>
> That's not the point (see above).
¿?¿?¿?¿?¿?¿ So you rather check for missing elements plus producing a
wrong xml file?
>
>> would not be better to do all these checking on build time rather than
>> on run time?
>
>
> No. Cocoon caches what it needs to.
There is not need to relay on cache, when you know for sure that the
document has been validate previously.
>> Cheers,
>> Cheche (who feels that sometimes we talk too much theoretical crap
>> instead of looking on our code.)
>
>
> Nicola Ken, who feels that adding more checks to our "simple" build when
> there is no real need for it is wasting time.
>
simple??? removing that check on resources.xmap make it more simple.
should I remove it or you prefer a vote.
Cheers,
Cheche
Re: svg error
Posted by Nicola Ken Barozzi <ni...@apache.org>.
Juan Jose Pablos wrote:
...
> on these call there is:
> <map:generate src="cocoon:/skin/skinconf.xml" />
This is used when you need to make svgs from the skinconf, like for
example the rounded corners that are generated from the color profile.
> That reads a skinconf.xml and transform it to make sure that there is
> not element missing on the configuration file.
Not really (see above).
> By mistake this last style sheet produce a wrong skinconf file so
> produce the initial error. you can check the wrong skinconf under
> http://localhost:8888/skin/skinconf.xml
>
> Now, the question is: why do we need to check for missing elements on a
> skin configuration file for a png file?
That's not the point (see above).
> would not be better to do all these checking on build time rather than
> on run time?
No. Cocoon caches what it needs to.
> Cheers,
> Cheche (who feels that sometimes we talk too much theoretical crap
> instead of looking on our code.)
Nicola Ken, who feels that adding more checks to our "simple" build when
there is no real need for it is wasting time.
--
Nicola Ken Barozzi nicolaken@apache.org
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------