Hello Marco,
What you are trying to do is to create inline SVG in an HTML page like you 
would do in XSL-FO files. This is possible, but your solution would need a 
different approach per browser. However, I think that it would be a much easier 
solution to create one more page that just creates the SVG image. You would 
refer to this image from the HTML page that you create (by using the 'src' 
attribute).
This could look something like:
<embed src="cocoon/mymapgenerator.xml" width="625" height="392.5" 
type="image/svg+xml" />
Be sure to set the correct content type in the page that generates the image
You could pass parameters to the page that creates the image to make the image 
generation dynamic.
I hope this helps!
Björn
________________________________________
Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Verzonden: dinsdag 13 juni 2006 18:01
Aan: [email protected]
Onderwerp: adding an SVG element to xhtml

Hi,

when generating a pdf in which I want to include an SVG element, I can do it 
like that:

....
<fo:instream-foreign-object>
                     <svg  xmlns=" http://www.w3.org/2000/svg"; width="150px" 
height="177px" viewBox="0 0 150 177"                                            
                         xml:space="preserve">
       
                           <svg:image x="0" y="0" width="150px" height="177px"
                                   xlink:href=" 
http://localhost:8080/cocoon/map.jpg";>
                           </svg:image>
                         
                         <g id="arrow" style="fill: white; stroke: blue;"> 
                            <line stroke-width="3" x1="{$r_pfeil}" y1="{$hk}" 
x2="{$rk}" y2="{$hk}" /> 
                            <polygon points="{$rk} {$hk}, {$r_pf} {$h_pf2}, 
{$r_pf} {$h_pf}" /> 
                           </g>                          
                          <circle cx="91" cy="44" r="2" style="fill: white; 
stroke: black;"/>
                          <circle cx="56" cy="89" r="2" style="fill: white; 
stroke: black;"/> 
                          <circle cx="101" cy="84" r="2" style="fill: white; 
stroke: black;"/>
                          <circle cx="42" cy="43" r="2" style="fill: white; 
stroke: black;"/> 
                          <circle cx="72" cy="128" r="2" style="fill: white; 
stroke: black;"/>
                        <text style="font-size: 10; font-weight: bold;" x="94" 
y="49">place a</text> 
                        <text style="font-size: 10; font-weight: bold;" x="58" 
y="94">place b</text>
                                      </svg>
                </fo:instream-foreign-object> 

now, I want to include the same object in my xhtml file, (generate xml file, 
transform xsl-->output=xhtml).

I am wondering, what the syntax is like; that does not seem to work:
<
object  type="image/svg+xml">
   <svg  xmlns="http://www.w3.org/2000/svg"; width="150px"
        height="177px" viewBox="0 0 150 177"    xml:space="preserve">

                           
                   <svg:image x="0" y="0" width="150px" height="177px"
                          xlink:href="
http://localhost:8080/cocoon/map.jpg";>
                    </svg:image>
                    ...
                    ....
<object>
plus, do I need to add s.th in the sitemap?

Just FYI, my aim is to display a map (the map.jpg in the svg:image tag) and 
draw an arrow into the map, depending on the chosen place. place a and place b 
(in the text tag) are static, the arrow is generated dynamically 

Thank you very much
Marco


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to