Re: [docbook-apps] svg and <object> tag conflict

From
Bob Stayton <>
Date
2004-03-19T23:02:14+00:00
ID
002201c40e08$43e69a50$6501a8c0@toshiro
Thread
Re: [docbook-apps] svg and <object> tag conflict
The template that generates the object 
element with embed inside (name="process.image" in html/graphics.xsl) is a 
very large template (over 500 lines).  It has an xsl:choose case for SVG 
(<xsl:when test="@format = 'SVG'">), and it would not be difficult to 
remove the <object> element that it generates.  But it means copying 
that large template to your customization layer and making a small modification. 
That should work, but it means you will have to check each stylesheet release to 
see if that big template has changed at all, and repeat the 
process.

 

Bob Stayton
Sagehill Enterprises
DocBook 
Consulting


 

 

  
----- Original Message ----- 

  
From: 
  Day, Troy L 

  
To: '' 
  

  
Sent: Friday, March 19, 2004 6:26 
AM

  
Subject: [docbook-apps] svg and 
  <object> tag conflict

  

  

  
 

  
(How can I create an embed tag for 
  svg graphics without nesting it inside an <object> 
  tag? )

  
 

  
Perhaps some clarification of 
  'why' is in order.  I'm trying to include some complex svg graphics 
  within docbook for html transformation.  Although the svg graphic shows 
  up fine using the Adobe viewer, the svg scripting is not working.  The 
  svg software maker informed me :

  
 

  
"... the problem is, that 
  the <embed> tag is inside an <object> tag. The <object> tag 
  makes problems with svg and is not fully supported by all 
  browsers."

  
 

  
Client is Using IE 6, so a nested embed tag should 
  work (and does work for simple viewing of the svg), but the svg javascript 
  files are not working.  

  
 

  
The curious thing is that if I save the transformed 
  file as an html file then view it from the file system like 
  this:

  
 

  
C:\Inetpub\wwwroot\...\xml_translate[1].html

  
 

  
The svg and scripting 
  works fine.  It is only when the html markup is viewed from a URL like 
  this:

  
 

  
http://localhost/.../xml_translate[1].html

  
 

  
does the problem 
  occur.

  
 

  
This appears to be an 
  IE/<object> tag problem, so I want to simply use the embed tag not 
  nested within the object tag for svg graphics.  

  
 

  
Any ideas about how to 
  customize the xsl would be greatly welcome.

  
 

  
Thanks,

  
Troy