You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Christoph Wieseke <vi...@gmx.net> on 2004/06/08 18:54:07 UTC

Generated SVG -> CSS/Stylesheet Processing Instruction Problem

hi all,

i got some strange problem, maybe someone has made
this experience before and know a solution.

i generate a dynamic svg document via xsl-transformer
and write it to disk with the source-write transformer,
for later delivery to the client.

so my problem is that i can't insert anything in the svg
file to reference an external css stylesheet.

i tried:
<xsl:processing-instruction name="xml-stylesheet">href="mystyle.css"
type="text/css"</xsl:processing-instruction>

which should be the common way, but if i check the
generated svg file, it only contains two PI's
the regulary <?xml...  one and the generated
stylesheet one. but nothing else.
by the way my opera and IE seem to crash.

without the
<xsl:processing-instruction name="xml-stylesheet">href="mystyle.css"
type="text/css"</xsl:processing-instruction>
my svg and the browser is fine.

so my question: is there maybe another way to get the genarated
svg file refernce an external css or is there a way to get
the PI for the stylesheet written into the svg in a clean way.

is this  a possible problem of the source write transformer?
in one test the transformer reported the element (the pi) should not
been there, but i cant the remember the configuration.

my svg get's delivered by that:
<map:match pattern="*.svg">
	<map:generate type="file" src="maps/{1}.svg"/>
	<map:serialize type="svgxml"/>
</map:match>

i even tried a simple reader, no difference here.

bye the way i use cocoon 2.1.3 on windows with tomcat 5.0.19
behind an apache2.


thanks for taking troubles.
Christoph

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Generated SVG -> CSS/Stylesheet Processing Instruction Problem

Posted by Joerg Heinicke <jo...@gmx.de>.
On 09.06.2004 22:35, Christoph Wieseke wrote:

> hi joerg,
> 
> thanks for your help and yes you were right, it wasn't
> necessary to write the svg file to disk before delivering it
> to the client. was a logical confusion by me :-)
> no more problem's with the PI's now

Good to hear.

> unfortunaly if lost my needed request parameters because of this.

??

> i'm afraid i have to ask the maillist again...

That's what the lists are about ;-)

Joerg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Generated SVG -> CSS/Stylesheet Processing Instruction Problem

Posted by Christoph Wieseke <vi...@gmx.net>.
hi joerg,

thanks for your help and yes you were right, it wasn't
necessary to write the svg file to disk before delivering it
to the client. was a logical confusion by me :-)
no more problem's with the PI's now

unfortunaly if lost my needed request parameters because of this.
i'm afraid i have to ask the maillist again...

thanks again
bye, christoph


On Tue, 08 Jun 2004 19:19:53 +0200, Joerg Heinicke <jo...@gmx.de>  
wrote:

> On 08.06.2004 18:54, Christoph Wieseke wrote:
>
>> i generate a dynamic svg document via xsl-transformer
>> and write it to disk with the source-write transformer,
>> for later delivery to the client.
>>  so my problem is that i can't insert anything in the svg
>> file to reference an external css stylesheet.
>>  i tried:
>> <xsl:processing-instruction name="xml-stylesheet">href="mystyle.css"
>> type="text/css"</xsl:processing-instruction>
>>  which should be the common way, but if i check the
>> generated svg file, it only contains two PI's
>> the regulary <?xml...  one and the generated
>> stylesheet one. but nothing else.
>> by the way my opera and IE seem to crash.
>>  without the
>> <xsl:processing-instruction name="xml-stylesheet">href="mystyle.css"
>> type="text/css"</xsl:processing-instruction>
>> my svg and the browser is fine.
>>  so my question: is there maybe another way to get the genarated
>> svg file refernce an external css or is there a way to get
>> the PI for the stylesheet written into the svg in a clean way.
>
> It's the correct way and AFAIK the only one.
>
>> is this  a possible problem of the source write transformer?
>
> Don't know. Try it out by not writing to disk but delivering it  
> immediately to the client.
>
> Is the generation of the SVG that time-consuming that it makes sense to  
> write it to disk? I would avoid it if possible and let the Cocoon  
> caching make its job.
>
> Joerg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Generated SVG -> CSS/Stylesheet Processing Instruction Problem

Posted by Joerg Heinicke <jo...@gmx.de>.
On 08.06.2004 18:54, Christoph Wieseke wrote:

> i generate a dynamic svg document via xsl-transformer
> and write it to disk with the source-write transformer,
> for later delivery to the client.
> 
> so my problem is that i can't insert anything in the svg
> file to reference an external css stylesheet.
> 
> i tried:
> <xsl:processing-instruction name="xml-stylesheet">href="mystyle.css"
> type="text/css"</xsl:processing-instruction>
> 
> which should be the common way, but if i check the
> generated svg file, it only contains two PI's
> the regulary <?xml...  one and the generated
> stylesheet one. but nothing else.
> by the way my opera and IE seem to crash.
> 
> without the
> <xsl:processing-instruction name="xml-stylesheet">href="mystyle.css"
> type="text/css"</xsl:processing-instruction>
> my svg and the browser is fine.
> 
> so my question: is there maybe another way to get the genarated
> svg file refernce an external css or is there a way to get
> the PI for the stylesheet written into the svg in a clean way.

It's the correct way and AFAIK the only one.

> is this  a possible problem of the source write transformer?

Don't know. Try it out by not writing to disk but delivering it 
immediately to the client.

Is the generation of the SVG that time-consuming that it makes sense to 
write it to disk? I would avoid it if possible and let the Cocoon 
caching make its job.

Joerg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org