vrijdag 7 september 2007

Having fun with XAML (Silverlight) and SVG

Rationale
When I first became acquainted with Microsoft's XAML format (october 2005), my primary platform was Windows 2000. Support, examples and clip art were limited. It was then that I started to write an XSL-transformation from SVG to XAML, targeted at the 2003 namespace supported by a 3rd party tool, Xamlon. It came with its own pecularities, but hey, it worked (even on Windows 2000)! In order to test some files incompatible with Xamlon, I also wrote the reverse, a XAML to SVG transformation. This also worked with some more complex examples, like the samples for Microsoft Expression. Giraffes, parrots and hippos flooded my screen. Then I got busy with other things and let it rest...

2007
Recent developments like Silverlight, Andreia Gaita's SVG2XAML (part of Moonlight, the Mono port of Silverlight) and Sam Ruby's SVG to Silverlight Workbench, revived my interest in my own shelved pet project. I had to remove some 2003 namespace "artifacts", like RectangleTop and RectangleWidth. ID, TransformDecorator and Text became x:Key, RenderTransform and TextBlock, respectively. Attributes for shapes like Ellipse also changed slightly.

Consequences
This allowed some interesting techniques like:
- SVG on Internet Explorer, without the ASV (Adobe SVG Viewer) plugin required (the example also works on Mozilla with Silverlight installed)
- XAML/Silverlight on Mozilla, without the Silverlight plugin installed (doesn't work on IE, but that's a mimetype issue)

Examples
- Colored toucan (SVG to XAML)







- GreenFrond (XAML to SVG)









How can you help?
The XSLs need testing, code coverage and conformance tests. Bug reports are more than welcome. And there are many concepts and constructs that still need a counterpart, for instance filters and base64 encoded images in XAML. Some more posts on these, and some implementation issues are to follow in the next days.
Feel free to email your comments.

Updates
20071009 20:57: XMLs and XSLs must be read with async = false, corrected in Transform.js
20071013 22:42: Changes to xaml2svg.xsl, shapes.xsl, properties.xsl, bugs filed by Inkscape developers

35 opmerkingen:

mkoswell zei

Thanks ever so much, very useful article. If you do not mind, please visit my article related to travel to Pandeglang district in Banten, Indonesia at Kenali dan Kunjungi Objek Wisata di Pandeglang

Best regards

admincrazy zei

Interesting post. I have been wondering about this issue,so thanks for posting. I’ll likely be coming back to your blog. Keep up great writing.

Kenali dan Kunjungi Objek Wisata di Pandeglang | Blog SEO | cah bagoes | oes tsetnoc | blogger

bitheads zei

I don’t know If I said it already, but this so good stuff keep up the good work. I read a lot of blogs on a daily basis and for the most part Belajar seo blogspot just wanted to make a quick comment to say I’m glad I found your blog. Thanks.

Best regards
Seo Motivation Oes tsetnoc

venn99 zei

naperville dentist
aurora dentist
online pharmacy
chicago movers
make money online
make money
internet tips
free tips online
online tips
tips
work from home
video tips
Shopping Tips
Car Tips
Computer Tips
Travel Tips
Finance Tips
cash gifting
cash gifting programs
gifting
buy backlinks
backlinks
How To Build A Grill Out Of A 55 Gallon Drum
How To View Private Facebook Profiles
How To Cure Sleep Paralysis
What Are The Causes Of Sleep Paralysis
How To Get On Facebook At School
How To Detect Spyware
Totally Free Spyware Removal Programs
Where To Find The Best Spyware Software
how to build a subwoofer box for your car
ab workout routine
making of love

davidbieber80 zei

The XSLs need testing, code coverage and conformance tests. Bug reports are more than welcome. And there are many concepts and constructs that still need a counterpart, for instance filters and base64 encoded images in XAML.
jump higher Electronic Cigarette reverse phone detective tava tea error fix

Dean zei

That is really very good article. I am glad to know. Thanks!payday loan direct lender

payday zei

I think depending on the image your mileage may vary.

I have svg document, but when I printed it to XPS using Inkscape, the XAML used an ‘ImageBrush’ to render a png of the original image. payday loan lenders

Whitney zei

Hey, Thanks for sharing such a nice post..... payday loan lenders

Ned zei

Great ....You have beautifully presented your thought in this blog post.cash advance

khan22 zei

I got lot of useful information from this site. I recommended every one to read this site,Great articles. Thanks for sharing!
San Diego Podiatrist

blog zei

they were is a pure fiction, a fiction necessary to make the case against Dick Scruggs, Sidney Backstrom and Zach Scruggs -- a fiction necessary for the government to win the war.
Plus Size Sarong

Bristol zei

thanks a lot for your valuable sharing ,right from the beginning till end it was really very informative .i can witness the experience and steps you have taken to accomplish this wonderful work.
http://necista-savjest.blogspot.com/2009/03/yep-here-are-second-and-third-release.html

Bristol zei

I think you’ve made some truly interesting points. Not too many people would actually think about this the way you just did. I’m really impressed that there’s so much about this subject that’s been uncovered and you did it so well, with so much class. Good one you, man! Really great stuff
Mothers Day Flowers

water zei

I found this informative and interesting blog i think its very useful and knowledge able.I would like to thank you for the efforts you have made in writing this article.
Carbon Fiber Paddle

nasim zei

I will always give a nice thrust look in to you from my bookmark feed. Coffee I don't actually comment and don't like to spend time in typing the comment. But here I have to do this because this deserves a good like.
Dog Life Jacket

rose zei

This is a Interesting post. I have been wondering about this issue,so thanks for posting. I’ll likely be coming back to your blog. Keep up great writing.
SARONG

rose zei

They were is a pure fiction, a fiction necessary to make the case against Dick Scruggs, Sidney Backstrom and Zach Scruggs -- a fiction necessary for the government to win the war.Thank.
Austin Real Estate

man zei

I got lot of useful information from this site. I recommended every one to read this site,Great articles. Thanks for sharing!
Austin Architects

emma zei

Hi guys, I want to say thanks for this useful information, I shared it on my wall to be honnest cause I LIKE it(:

Acheter Xenical

checking zei

I will definitely share it with my other friends. Keep up the good work, I would to stay in contact with your posts.saga hair

checking zei

You have provided a great piece of information. I will definitely share it with my other friends. Keep up the good work, Not all accountants are dull,we are just the same as everyone else! Thanks for that great post, made my day! saga gold

dubaiexperies zei

I got lot of useful information from this site. I recommended every one to read this site,Great articles. Thanks for sharing!
Abilene Roofing Companies

Phil zei

Having fun with XAML, I have been googling it forrever, Thanks for posting this article.
Direct Payday loan lenders
Cash advance USA

Web design Los Angeles zei

Silver light is one of the best piece of software ever made for the web (Thanks just my opinion)
Payday loan lenders
Web Design in Los Angeles

Joanne zei

Very interesting, thanks for the technical details.


dog life jacket

leading zei

As a result of ensuring that same-sex couples receive the same treatment as opposite-sex de facto couples, the reforms may also impose burdens on some same-sex couples or reduce certain benefits they currently receive.
kid gay sex I doubt very much that PCBSD is targeted towards Windows and Mac users.
BSD of any kind is hugely unlikely to be anyones first choice after moving away from a Windows or Mac environment.
One of the more popular Linux may be, but unlikely to be PC-BSD.

I would have thought that PC-BSD would appeal to an user already fairly familiar with an Unix-like OS who wants to try something different, or wants a *BSD desktop orientated system without the hard-work tweaking it, or compiling everything from Ports.

leading zei

If you are looking for how to find a boyfriend just visit us and know about the tacts and ways to know how to find a boyfriend and how to satisfy your soulmate. You can find dating tips articles alongwith tips on how to find a boyfriend. Here you can know how to get him and how to make him happy with you and to keep him with you in a long term relation of pleasure.
To fidn a boyfriend

checking zei

if you want to know that how to get a boyfriend or how to find a boyfriend here is all the detail information about how to get a guy
How to Get a Boyfriend

How to Find a Boyfriend

How to Get a Guy

Juliette zei

Thanks for really useful tips.

http://www.edoglifejacket.co.uk/top/waterproof-dog-coats/

Juliette zei

Also meant to say thanks for sharing, has helped me out.

tiny/small waterproof dog coats

checking zei

thanks a lot for your valuable sharing ,right from the beginning till end it was really very informative .i can witness the experience and steps you have taken to accomplish this wonderful work.z-wave

dubaiexperies zei

I was very pleased to find this site.I wanted to thank you for this great read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you post.
Sarongs

leading zei

Hi i am looking for the solution of the question how to loss weight fast and quick in a natural way can you guide me please?

How to loss a weight

bye bye good night
thanks

Juliette Morgan zei

Interesting but a little over my head but thanks for sharing.

Xtra Dog fleece dog harness review

saranya zinavo zei

Many thanks to the person who made this post, this was very informative for me. Please continue this awesome work. Sincerely…
Polo tshirts