Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Working with the web 101



Take a look at the Wiki at svg.org, and in particular the page about SVG and HTML:

   http://wiki.svg.org/SVG_and_HTML

Because SVG is a form of XML, it can only be embedded directly in an XML file. HTML is not XML; XHTML is. So if you need to use SVG in plain HTML, you would put the SVG in a separate file, and reference it using an OBJECT tag.

Geoff

On 1 Nov 2006, at 02:33, Scott Thompson wrote:

Forgive me if I take you back to "web programming 101" but I am curious about a behavior I'm seeing and would appreciate a pointer to the documentation where I can learn more.

I've created an html file that has an embedded SVG element:

<?xml version="1.0" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
</head>
<body>
<hr />
<svg width="5cm" height="4cm" version="1.0" xmlns="http:// www.w3.org/2000/svg">
<rect fill="blue" stroke="none" x="0.5cm" y="0.5cm" width="2cm" height="1cm"/>
</svg>
</body>
</html>


the SVG content was more or less shamelessly copied from the SVG site at w3c.

If I save this in a file with a ".html" extension, the SVG is not rendered in the daily build of WebKit or in Firefox. However, if I give it a ".xhtml" extension, it appears to do what I want.

I've searched w3.com and the list archives to no avail. I don't have a problem with the behavior, but I'm trying to learn and I would like to learn more about WHY the browsers behave this way. Can someone point me to the relevant section of whichever spec sets this out as the correct behavior?

Scott

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webkitsdk-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webkitsdk-dev/geoff%40n- generate.com


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webkitsdk-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webkitsdk-dev/email@hidden

This email sent to email@hidden
References: 
 >Working with the web 101 (From: Scott Thompson <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.