PLDB
Languages Features Calendar About Lists Add Language
GitHub icon

SVG

SVG

SVG, aka Scalable Vector Graphics, is a text markup language created in 2001.

Scalable Vector Graphics (SVG) is an XML-based vector image format for two-dimensional graphics with support for interactivity and animation. The SVG specification is an open standard developed by the World Wide Web Consortium (W3C) since 1999. SVG images and their behaviors are defined in XML text files. Read more on Wikipedia...

#139on PLDB 21Years Old 6.4kUsers

Example code from hello-world:

<?xml version="1.0" encoding="utf-8" standalone="no"?> <svg width="240" height="100" viewBox="0 0 240 100" zoomAndPan="disable" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Hello World</title> <g> <text x="10" y="50">Hello World</text> <animate attributeName='opacity' values='0;1' dur='4s' fill='freeze' begin="0s"/> </g> </svg>

Example code from the Hello World Collection:

<?xml version="1.0" encoding="utf-8" standalone="no"?> <!-- Hello World in SVG --> <svg width="240" height="100" viewBox="0 0 240 100" zoomAndPan="disable" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Hello World</title> <g> <text x="10" y="50">Hello World</text> <animate attributeName='opacity' values='0;1' dur='4s' fill='freeze' begin="0s"/> </g> </svg>

Example code from Wikipedia:

<?xml version="1.0" encoding="UTF-8" ?> <svg xmlns="http://www.w3.org/2000/svg" version="1.1"> <rect x="25" y="25" width="200" height="200" fill="lime" stroke-width="4" stroke="pink" /> <circle cx="125" cy="125" r="75" fill="orange" /> <polyline points="50,150 50,200 200,200 200,100" stroke="red" stroke-width="4" fill="none" /> <line x1="50" y1="50" x2="200" y2="200" stroke="blue" stroke-width="4" /> </svg>

Language features

Feature Supported Example Token
Comments
MultiLine Comments
Semantic Indentation ϴ
Line Comments ϴ

Books about SVG on goodreads

title author year reviews ratings rating
Svg Programming: The Graphical Web Kurt Cagle 2002 1 4 4.50
Fundamentals of SVG Programming Oswald Campesato 2003 0 2 4.00

Article source

PLDB - Build the next great programming language. v5.0.0 - Acknowledgements · Email · GitHub