PDA

View Full Version : Dreamweaver and SVG


Zodiac
09-09-2005, 04:25 PM
Hej guys!

Started to use DW today. Love it so far, but I can't open SVG-Files (Scalable Vector Graphics).

Is it possible to do that with DW or do I have to use another Editor?

kate
09-09-2005, 04:46 PM
Hya,

Audience -- The Holy Grail
Both SVG and Flash are growing and maturing as products. Both are scalable to small computer devices, such as Palm Pilots, and robust enough to be part of Websites that receive millions of hits. But there has to be a bottom line, and it simply comes down to this: the Flash player is pre-installed on most operating systems and is accessible [10] to greater than 97% of the people who use the Web; the latest version of Adobe's SVG viewer only became available at the beginning of November 2001, and still has a limited penetration rate. In addition, viewing SVG files requires the download of a hefty 2.3 Mb plugin (as currently there are no Web browsers that natively support SVG). This is large when compared to the 219 Kb plugin for Flash.

Even though SVG is based upon the successful XML format, it currently has a very limited user base. The single reason for creating a Website is to allow the greatest number of users to interact with your content -- if they can't see it, they won't be bale to interact with it.

While SVG does show some great promise and may well be an exciting technology, the current limits to its penetration mean that, for the foreseeable future, Flash will remain the most popular and viable vector program.


Now you could maybe use XML as in this example:

In comparison, SVG is still a new contender. SVG is based on XML, the eXtensible Mark-up Language, which means that it can be very easily scripted. The following code is SVG for a rectangle.

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg width="500" height="500">
<rect x="111" y="78" width="187" height="160"
style="fill:rgb(192,192,255);stroke:rgb(0,0,128);s troke-width:1"/>
</svg>


Good luck!

:D

Zodiac
09-09-2005, 05:01 PM
Hej Kate!

I think there is a little misunderstanding between us!

I don't want to know WHAT SVG is (coz I already know ;-)), I like to tell Dreamweaver what SVG is! Coz whenever I try to open an SVG with Dreamweaver it tells me that it can't because theres is no editor related to .svg!
By the way, syntax-highlighting would be lovely!

thx

kate
09-09-2005, 05:31 PM
Hya,

Never come accross such a question so did a search for you. that was just to 'tide you over' till domedia or ranjan answered your question.

I have since posted at Macromedia as I only have 'basic tutorials'.

:)

Probably because few browsers support it.

> Is there a workaround for adding these files..?

I believe SVG is just a text file, is it not?

-Darrel

Zodiac
09-10-2005, 01:17 PM
Hej Kate!

I know that SVG is just a simple textfile. I can open it with dreamweaver in the code view. But I want dw to give me a simple syntaxhighlighting for svg. s svg is just xml, can't I tell DW to use the same syntaxhl for svg as the onr for xml?

cheers,
seb

domedia
09-11-2005, 01:40 AM
zodiac, look at the tutorial we have on adding .inc and .phtml files to DW. You might be successful following the same steps for .svg :)
http://www.dreamweaverclub.com/dreamweaver-phtml-inc.php ('http://www.dreamweaverclub.com/dreamweaver-phtml-inc.php')

ps. kate, If I were to guess you have no experience writing svg files, would I be wrong ;)

kate
09-11-2005, 07:29 AM
No,

I do'nt. but then where did I say I did domedia. I have made it clear more than once I have only experience of '<span style='color:red'>Basic tutorials</span> I come here mearly to help where I can. because zodiac got no response from you and you are after all admin I just did what I could while you answered. even to posting at Macromedia in your absence.

I thought maybe ranjan may as moderator would have answered so again whilst one of you did I did what I could. If as you say you have run Dreamweaver newsgroups I would expect you to know a hell of a lot more than I who has only known Dreamweaver for a few months as apposed to your years.

Kate.

domedia
09-11-2005, 04:06 PM
I think you overlooked the smiley in my post kate, it was not meant to be sarcastic. You're at great help here, and you're absolutely appreciated!

ranjan
09-11-2005, 06:02 PM
Dreamweaver allows you to import DTDs and schemas using its tag editor. Once a DTD or schema is imported DW uses them to provide you with code hints in code view exactly the way you get code hints for (X)HTML

Check your help files to know how to use the tag library editor.


Importing tags from XML files
You can import tags from an XML Document Type Definition (DTD) file or a schema.

To import tags from an XML DTD or schema:
Open the Tag Library editor (Edit > Tag Libraries).
Click the Plus (+) button and select DTD Schema > Import XML DTD or Schema File.
Enter the filename or URL of the DTD or schema file.
Enter the prefix to be used with the tags.
Note: A prefix is used to identify a tag in the code as part of a particular tag library. Some tag libraries donít use prefixes.

Click OK.



SVG 1 DTD

http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd ('http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd')

UPDATE: Dreamweaver help notes on importing DTD and SVG DTD URL added