XML Elves

XML Elves

<community>of XML and SVG Developers</community>


Use of SVG in XHTML doc with use of namespace declaration

This is a discussion on Use of SVG in XHTML doc with use of namespace declaration within the SVG Questions forums, part of the SVG Forums category; hi friends, There are three ways of defining SVG in a Web document: 1.as a standalone SVG page 2. as ...


Go Back   XML Elves > SVG Forums > SVG Questions

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Notices


Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-11-2005, 01:24 AM
Kavitha
Guest
 
Posts: n/a
Default Use of SVG in XHTML doc with use of namespace declaration

hi friends,

There are three ways of defining SVG in a Web document:
1.as a standalone SVG page
2. as an embedded element
3.in an XHTML document with a namespace declaration

Can anyone send an example of the third way of using SVG's and I heard that the third way is the most efficient when compared to the above two . what's the reason?

Any plugins extra needed to run the XHTML doc with namespace declaration...


Please Clarify me...
Kavitha.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-11-2005, 04:26 AM
Anonymous
Guest
 
Posts: n/a
Default Use of SVG in XHTML doc with use of namespace declaration

This example run in Mozilla with SVG buid in it
( give xml as extension to your file ... )
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" >
<body>
<svg:svg>
<svg:g style="fill-opacity:0.3;">
<svg:circle cx="6cm" cy="2cm" r="100" style="fill:red; stroke:none; stroke-width:0.01cm" transform="translate(0,50)" />
<svg:circle cx="6cm" cy="2cm" r="100" style="fill:blue; stroke:none; stroke-width:0.01cm" transform="translate(70,150)" />
<svg:circle cx="6cm" cy="2cm" r="100" style="fill:green; stroke:none; stroke-width:0.01cm" transform="translate(-70,150)"/>
</svg:g>
</svg:svg>
</body>
</html>

If you want to use IE, with ASV6 beta you have to add to code
<object id="AdobeSVG"
CLASSID="clsid:78156a80-c6a1-4bbf-8e6a-3cd390eeb4e2">
</object>
<?import namespace="svg" implementation="#AdobeSVG"?>
but
for IE with Adobe plugin, it's not the solution ...

Michel
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-11-2005, 04:42 AM
Kavitha
Guest
 
Posts: n/a
Default Use of SVG in XHTML doc with use of namespace declaration

hi michel,
I am working in IE6.0 with Adobe SVG viewer.
The below code try.xml is not displaying svg images. It's simply showing xml tags in the browser. what should I do inorder to display images of SVG?

<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" >
<body>
<object id="AdobeSVG"
CLASSID="clsid:78156a80-c6a1-4bbf-8e6a-3cd390eeb4e2">
</object>
<?import namespace="svg" implementation="#AdobeSVG"?>
<svg:svg>
<svg:g style="fill-opacity:0.3;">
<svg:circle cx="6cm" cy="2cm" r="100" style="fill:red; stroke:none; stroke-width:0.01cm" transform="translate(0,50)" />
<svg:circle cx="6cm" cy="2cm" r="100" style="fill:blue; stroke:none; stroke-width:0.01cm" transform="translate(70,150)" />
<svg:circle cx="6cm" cy="2cm" r="100" style="fill:green; stroke:none; stroke-width:0.01cm" transform="translate(-70,150)"/>
</svg:g>
</svg:svg>
</body>
</html>

Thanks
Kavitha
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-11-2005, 05:11 AM
Julia
Guest
 
Posts: n/a
Default Use of SVG in XHTML doc with use of namespace declaration

Which one is the best way of implementing SVG of the above 3 methods?
and the reason for it...
Thanks,
Julia
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-11-2005, 08:56 AM
Anonymous
Guest
 
Posts: n/a
Default Use of SVG in XHTML doc with use of namespace declaration

Quote:
I am working in IE6.0 with Adobe SVG viewer.
The below code try.xml is not displaying svg images. It's simply showing xml tags in the browser. what should I do inorder to display images of SVG?
In IE, name your file try.htm and this will run with Adobe SVG Viewer VERSION 6 BETA only.

Michel
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 07-11-2005, 09:02 AM
Anonymous
Guest
 
Posts: n/a
Default Use of SVG in XHTML doc with use of namespace declaration

Quote:
Which one is the best way of implementing SVG of the above 3 methods?
and the reason for it...
All depend of your browser ...
For IE with ASV3 or 6 you can use embed tag in HTML or SVG standalone ( don't forget mime type on your server )
If you don't want to reinvent the wheel by creating widgets in standalone svg, you can use HTML forms to interact with your embedded svg.
With IE + ASV6 beta, you can have some communication problems html <-> svg

For Mozilla, svg fragment with namespace in xml file seem better and more natural.

Michel
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
declaration, doc, namespace, svg, xhtml


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -6. The time now is 07:39 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0

Canon Ink Cartridges
Your Canon ink cartridges are cheaper online.

Hard Disk Drive Data Recovery North West
Professional data recovery! Professional service! Visit the above link.

ink cartridges Free UK Delivery on ink cartridges such as Canon, Dell, Epson, hp & Lexmark.

1 2 3 4 5 6 7 8 9 10