Code

Extensions. New SVG to FXG export extension (see Bug #625140, Support export to FXG).
authorJazzyNico <nicoduf@yahoo.fr>
Tue, 21 Dec 2010 20:35:55 +0000 (21:35 +0100)
committerJazzyNico <nicoduf@yahoo.fr>
Tue, 21 Dec 2010 20:35:55 +0000 (21:35 +0100)
po/POTFILES.in
po/inkscape.pot
share/extensions/Makefile.am
share/extensions/svg2fxg.inx [new file with mode: 0755]
share/extensions/svg2fxg.xsl [new file with mode: 0755]

index f7a26e27a8290d4d93df93fa5c2a70d4be896235..2e12527d5c0aff97097da227d4a9be27d30f26ba 100644 (file)
 [type: gettext/xml] share/extensions/split.inx
 [type: gettext/xml] share/extensions/straightseg.inx
 [type: gettext/xml] share/extensions/summersnight.inx
+[type: gettext/xml] share/extensions/svg2fxg.inx
 [type: gettext/xml] share/extensions/svg2xaml.inx
 [type: gettext/xml] share/extensions/svg_and_media_zip_output.inx
 [type: gettext/xml] share/extensions/svgcalendar.inx
index 16a8627efaf3f0c98643a8a6d58ac8f215add2b7..f8e274d46db0b97fbad953e7fd0efdddbe647361 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: inkscape-devel@lists.sourceforge.net\n"
-"POT-Creation-Date: 2010-12-15 22:51+0100\n"
+"POT-Creation-Date: 2010-12-21 21:33+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -42,7 +42,7 @@ msgstr ""
 #: ../share/extensions/edge3d.inx.h:6 ../share/extensions/flatten.inx.h:3
 #: ../share/extensions/fractalize.inx.h:2
 #: ../share/extensions/interp_att_g.inx.h:12
-#: ../share/extensions/markers_strokepaint.inx.h:2
+#: ../share/extensions/markers_strokepaint.inx.h:3
 #: ../share/extensions/perspective.inx.h:1
 #: ../share/extensions/pixelsnap.inx.h:1
 #: ../share/extensions/radiusrand.inx.h:5
@@ -228,7 +228,7 @@ msgstr ""
 #: ../share/extensions/jessyInk_video.inx.h:1
 #: ../share/extensions/jessyInk_view.inx.h:3
 #: ../share/extensions/lindenmayer.inx.h:23
-#: ../share/extensions/lorem_ipsum.inx.h:1 ../share/extensions/measure.inx.h:3
+#: ../share/extensions/lorem_ipsum.inx.h:1 ../share/extensions/measure.inx.h:2
 #: ../share/extensions/pathalongpath.inx.h:5
 #: ../share/extensions/pathscatter.inx.h:6
 #: ../share/extensions/radiusrand.inx.h:1 ../share/extensions/scour.inx.h:5
@@ -443,7 +443,7 @@ msgid "Visual"
 msgstr ""
 
 #: ../share/extensions/dimension.inx.h:5 ../share/extensions/dots.inx.h:13
-#: ../share/extensions/handles.inx.h:2 ../share/extensions/measure.inx.h:20
+#: ../share/extensions/handles.inx.h:2 ../share/extensions/measure.inx.h:19
 msgid "Visualize Path"
 msgstr ""
 
@@ -1551,7 +1551,6 @@ msgid "End Value:"
 msgstr ""
 
 #: ../share/extensions/interp_att_g.inx.h:5
-#: ../src/ui/dialog/fill-and-stroke.cpp:57
 msgid "Fill"
 msgstr ""
 
@@ -2225,7 +2224,7 @@ msgstr ""
 #: ../share/extensions/text_randomcase.inx.h:1
 #: ../share/extensions/text_replace.inx.h:4
 #: ../share/extensions/text_titlecase.inx.h:1
-#: ../share/extensions/text_uppercase.inx.h:1 ../src/dialogs/text-edit.cpp:378
+#: ../share/extensions/text_uppercase.inx.h:1 ../src/dialogs/text-edit.cpp:383
 #: ../src/selection-describer.cpp:68
 #: ../src/ui/dialog/inkscape-preferences.cpp:548 ../src/verbs.cpp:2510
 #: ../share/extensions/text_sentencecase.inx.h:2
@@ -2240,53 +2239,71 @@ msgid ""
 msgstr ""
 
 #: ../share/extensions/markers_strokepaint.inx.h:1
+msgid "Assign alpha"
+msgstr ""
+
+#: ../share/extensions/markers_strokepaint.inx.h:2
 msgid "Color Markers to Match Stroke"
 msgstr ""
 
-#: ../share/extensions/measure.inx.h:1
-#: ../share/extensions/gcodetools_all_in_one.inx.h:8
-#: ../share/extensions/gcodetools_area.inx.h:5
-msgid "Area"
+#: ../share/extensions/markers_strokepaint.inx.h:4
+msgid "Replace marker fill with:"
+msgstr ""
+
+#: ../share/extensions/markers_strokepaint.inx.h:5
+msgid "fill color"
+msgstr ""
+
+#: ../share/extensions/markers_strokepaint.inx.h:6
+msgid "stroke color"
+msgstr ""
+
+#: ../share/extensions/markers_strokepaint.inx.h:7
+msgid "transparency"
+msgstr ""
+
+#: ../share/extensions/markers_strokepaint.inx.h:8
+msgid "white"
 msgstr ""
 
-#: ../share/extensions/measure.inx.h:2
+#: ../share/extensions/measure.inx.h:1
 msgid "Font size (px):"
 msgstr ""
 
-#: ../share/extensions/measure.inx.h:4
+#: ../share/extensions/measure.inx.h:3
 msgid "Length"
 msgstr ""
 
 #. <param name="unit" type="string" _gui-text="Unit {km|m|cm|mm|in|px|pt}">mm</param>
-#: ../share/extensions/measure.inx.h:6
+#: ../share/extensions/measure.inx.h:5
 msgid "Length Unit:"
 msgstr ""
 
-#: ../share/extensions/measure.inx.h:7
+#: ../share/extensions/measure.inx.h:6
 msgid "Measure"
 msgstr ""
 
-#: ../share/extensions/measure.inx.h:8
+#: ../share/extensions/measure.inx.h:7
 msgid "Measure Path"
 msgstr ""
 
-#: ../share/extensions/measure.inx.h:9
+#: ../share/extensions/measure.inx.h:8
 msgid "Measurement Type: "
 msgstr ""
 
-#: ../share/extensions/measure.inx.h:10
+#: ../share/extensions/measure.inx.h:9
 msgid "Offset (px):"
 msgstr ""
 
-#: ../share/extensions/measure.inx.h:11
+#: ../share/extensions/measure.inx.h:10
 msgid "Precision:"
 msgstr ""
 
-#: ../share/extensions/measure.inx.h:12
+#: ../share/extensions/measure.inx.h:11
 msgid "Scale Factor (Drawing:Real Length) = 1:"
 msgstr ""
 
-#: ../share/extensions/measure.inx.h:14
+#: ../share/extensions/measure.inx.h:13
 #, no-c-format
 msgid ""
 "This effect measures the length, or area, of the selected path and adds it "
@@ -2303,6 +2320,11 @@ msgid ""
 "0.03%."
 msgstr ""
 
+#: ../share/extensions/measure.inx.h:20
+msgctxt "measure extension"
+msgid "Area"
+msgstr ""
+
 #: ../share/extensions/motion.inx.h:1 ../share/extensions/restack.inx.h:1
 #: ../src/widgets/toolbox.cpp:5124
 msgid "Angle:"
@@ -2888,7 +2910,7 @@ msgstr ""
 #: ../share/extensions/printing-marks.inx.h:16
 #: ../src/ui/dialog/align-and-distribute.cpp:1033
 #: ../src/ui/dialog/filedialogimpl-gtkmm.cpp:1415
-#: ../src/widgets/desktop-widget.cpp:1686
+#: ../src/widgets/desktop-widget.cpp:1704
 msgid "Selection"
 msgstr ""
 
@@ -3307,6 +3329,18 @@ msgstr ""
 msgid "Envelope"
 msgstr ""
 
+#: ../share/extensions/svg2fxg.inx.h:1
+msgid "Adobe's XML Graphics file format"
+msgstr ""
+
+#: ../share/extensions/svg2fxg.inx.h:2
+msgid "FXG Output"
+msgstr ""
+
+#: ../share/extensions/svg2fxg.inx.h:3
+msgid "Flash XML Graphics (*.fxg)"
+msgstr ""
+
 #: ../share/extensions/svg2xaml.inx.h:1 ../share/extensions/xaml2svg.inx.h:1
 msgid "Microsoft XAML (*.xaml)"
 msgstr ""
@@ -3372,7 +3406,7 @@ msgid ""
 "December"
 msgstr ""
 
-#: ../share/extensions/svgcalendar.inx.h:10 ../src/dialogs/text-edit.cpp:224
+#: ../share/extensions/svgcalendar.inx.h:10 ../src/dialogs/text-edit.cpp:229
 msgid "Layout"
 msgstr ""
 
@@ -4035,7 +4069,7 @@ msgstr ""
 msgid "Area (px^2): "
 msgstr ""
 
-#: ../share/extensions/dxf_outlines.py:36
+#: ../share/extensions/dxf_outlines.py:37
 msgid ""
 "Failed to import the numpy or numpy.linalg modules. These modules are "
 "required by this extension. Please install them and try again."
@@ -4255,12 +4289,12 @@ msgstr ""
 msgid "No matching node for expression: %s"
 msgstr ""
 
-#: ../share/extensions/markers_strokepaint.py:41
+#: ../share/extensions/markers_strokepaint.py:49
 #, python-format
 msgid "No style attribute found for id: %s"
 msgstr ""
 
-#: ../share/extensions/markers_strokepaint.py:56
+#: ../share/extensions/markers_strokepaint.py:72
 #, python-format
 msgid "unable to locate marker: %s"
 msgstr ""
@@ -5827,7 +5861,7 @@ msgstr ""
 
 #: ../share/filters/filters.svg.h:162
 #: ../src/ui/dialog/align-and-distribute.cpp:1032
-#: ../src/widgets/desktop-widget.cpp:1682
+#: ../src/widgets/desktop-widget.cpp:1700
 msgid "Drawing"
 msgstr ""
 
@@ -10161,13 +10195,13 @@ msgstr ""
 
 #: ../src/dialogs/object-attributes.cpp:51
 #: ../src/dialogs/object-attributes.cpp:59 ../src/ui/dialog/guides.cpp:44
-#: ../src/widgets/desktop-widget.cpp:509 ../src/widgets/toolbox.cpp:1544
+#: ../src/widgets/desktop-widget.cpp:515 ../src/widgets/toolbox.cpp:1544
 msgid "X:"
 msgstr ""
 
 #: ../src/dialogs/object-attributes.cpp:52
 #: ../src/dialogs/object-attributes.cpp:60 ../src/ui/dialog/guides.cpp:45
-#: ../src/widgets/desktop-widget.cpp:512 ../src/widgets/toolbox.cpp:1562
+#: ../src/widgets/desktop-widget.cpp:518 ../src/widgets/toolbox.cpp:1562
 msgid "Y:"
 msgstr ""
 
@@ -10261,152 +10295,152 @@ msgstr ""
 msgid "Start the check"
 msgstr ""
 
-#: ../src/dialogs/text-edit.cpp:201
+#: ../src/dialogs/text-edit.cpp:206
 msgid "Font"
 msgstr ""
 
-#: ../src/dialogs/text-edit.cpp:238
+#: ../src/dialogs/text-edit.cpp:243
 msgid "Align lines left"
 msgstr ""
 
 #. TRANSLATORS: `Center' here is a verb.
-#: ../src/dialogs/text-edit.cpp:253
+#: ../src/dialogs/text-edit.cpp:258
 msgid "Center lines"
 msgstr ""
 
-#: ../src/dialogs/text-edit.cpp:267
+#: ../src/dialogs/text-edit.cpp:272
 msgid "Align lines right"
 msgstr ""
 
-#: ../src/dialogs/text-edit.cpp:281
+#: ../src/dialogs/text-edit.cpp:286
 msgid "Justify lines"
 msgstr ""
 
-#: ../src/dialogs/text-edit.cpp:303 ../src/widgets/toolbox.cpp:7606
+#: ../src/dialogs/text-edit.cpp:308 ../src/widgets/toolbox.cpp:7606
 msgid "Horizontal text"
 msgstr ""
 
-#: ../src/dialogs/text-edit.cpp:317 ../src/widgets/toolbox.cpp:7613
+#: ../src/dialogs/text-edit.cpp:322 ../src/widgets/toolbox.cpp:7613
 msgid "Vertical text"
 msgstr ""
 
-#: ../src/dialogs/text-edit.cpp:332
+#: ../src/dialogs/text-edit.cpp:337
 msgid "Line spacing:"
 msgstr ""
 
-#: ../src/dialogs/text-edit.cpp:425
+#: ../src/dialogs/text-edit.cpp:430
 msgid "Set as default"
 msgstr ""
 
-#: ../src/dialogs/text-edit.cpp:668 ../src/text-context.cpp:1519
+#: ../src/dialogs/text-edit.cpp:680 ../src/text-context.cpp:1519
 msgid "Set text style"
 msgstr ""
 
-#: ../src/dialogs/xml-tree.cpp:156
+#: ../src/dialogs/xml-tree.cpp:158
 msgid "<b>Click</b> to select nodes, <b>drag</b> to rearrange."
 msgstr ""
 
-#: ../src/dialogs/xml-tree.cpp:167
+#: ../src/dialogs/xml-tree.cpp:169
 msgid "<b>Click</b> attribute to edit."
 msgstr ""
 
-#: ../src/dialogs/xml-tree.cpp:171
+#: ../src/dialogs/xml-tree.cpp:173
 #, c-format
 msgid ""
 "Attribute <b>%s</b> selected. Press <b>Ctrl+Enter</b> when done editing to "
 "commit changes."
 msgstr ""
 
-#: ../src/dialogs/xml-tree.cpp:267
+#: ../src/dialogs/xml-tree.cpp:271
 msgid "Drag to reorder nodes"
 msgstr ""
 
-#: ../src/dialogs/xml-tree.cpp:287
+#: ../src/dialogs/xml-tree.cpp:291
 msgid "New element node"
 msgstr ""
 
-#: ../src/dialogs/xml-tree.cpp:309
+#: ../src/dialogs/xml-tree.cpp:313
 msgid "New text node"
 msgstr ""
 
-#: ../src/dialogs/xml-tree.cpp:330 ../src/dialogs/xml-tree.cpp:1412
+#: ../src/dialogs/xml-tree.cpp:334 ../src/dialogs/xml-tree.cpp:1423
 msgid "Duplicate node"
 msgstr ""
 
-#: ../src/dialogs/xml-tree.cpp:351
+#: ../src/dialogs/xml-tree.cpp:355
 msgid "nodeAsInXMLdialogTooltip|Delete node"
 msgstr ""
 
-#: ../src/dialogs/xml-tree.cpp:367 ../src/dialogs/xml-tree.cpp:1574
+#: ../src/dialogs/xml-tree.cpp:371 ../src/dialogs/xml-tree.cpp:1585
 msgid "Unindent node"
 msgstr ""
 
-#: ../src/dialogs/xml-tree.cpp:382 ../src/dialogs/xml-tree.cpp:1553
+#: ../src/dialogs/xml-tree.cpp:386 ../src/dialogs/xml-tree.cpp:1564
 msgid "Indent node"
 msgstr ""
 
-#: ../src/dialogs/xml-tree.cpp:394 ../src/dialogs/xml-tree.cpp:1506
+#: ../src/dialogs/xml-tree.cpp:398 ../src/dialogs/xml-tree.cpp:1517
 msgid "Raise node"
 msgstr ""
 
-#: ../src/dialogs/xml-tree.cpp:406 ../src/dialogs/xml-tree.cpp:1523
+#: ../src/dialogs/xml-tree.cpp:410 ../src/dialogs/xml-tree.cpp:1534
 msgid "Lower node"
 msgstr ""
 
-#: ../src/dialogs/xml-tree.cpp:451 ../src/dialogs/xml-tree.cpp:1447
+#: ../src/dialogs/xml-tree.cpp:455 ../src/dialogs/xml-tree.cpp:1458
 msgid "Delete attribute"
 msgstr ""
 
 #. TRANSLATORS: "Attribute" is a noun here
-#: ../src/dialogs/xml-tree.cpp:496
+#: ../src/dialogs/xml-tree.cpp:500
 msgid "Attribute name"
 msgstr ""
 
 #. TRANSLATORS: "Set" is a verb here
-#: ../src/dialogs/xml-tree.cpp:516 ../src/widgets/sp-attribute-widget.cpp:161
+#: ../src/dialogs/xml-tree.cpp:520 ../src/widgets/sp-attribute-widget.cpp:161
 #: ../src/widgets/sp-attribute-widget.cpp:768
 msgid "Set attribute"
 msgstr ""
 
 #. TRANSLATORS: "Set" is a verb here
-#: ../src/dialogs/xml-tree.cpp:518
+#: ../src/dialogs/xml-tree.cpp:522
 msgid "Set"
 msgstr ""
 
 #. TRANSLATORS: "Attribute" is a noun here
-#: ../src/dialogs/xml-tree.cpp:541
+#: ../src/dialogs/xml-tree.cpp:545
 msgid "Attribute value"
 msgstr ""
 
-#: ../src/dialogs/xml-tree.cpp:877
+#: ../src/dialogs/xml-tree.cpp:888
 msgid "Drag XML subtree"
 msgstr ""
 
-#: ../src/dialogs/xml-tree.cpp:1314
+#: ../src/dialogs/xml-tree.cpp:1325
 msgid "New element node..."
 msgstr ""
 
-#: ../src/dialogs/xml-tree.cpp:1336
+#: ../src/dialogs/xml-tree.cpp:1347
 msgid "Cancel"
 msgstr ""
 
-#: ../src/dialogs/xml-tree.cpp:1344
+#: ../src/dialogs/xml-tree.cpp:1355
 msgid "Create"
 msgstr ""
 
-#: ../src/dialogs/xml-tree.cpp:1378
+#: ../src/dialogs/xml-tree.cpp:1389
 msgid "Create new element node"
 msgstr ""
 
-#: ../src/dialogs/xml-tree.cpp:1394
+#: ../src/dialogs/xml-tree.cpp:1405
 msgid "Create new text node"
 msgstr ""
 
-#: ../src/dialogs/xml-tree.cpp:1429
+#: ../src/dialogs/xml-tree.cpp:1440
 msgid "nodeAsInXMLinHistoryDialog|Delete node"
 msgstr ""
 
-#: ../src/dialogs/xml-tree.cpp:1476
+#: ../src/dialogs/xml-tree.cpp:1487
 msgid "Change attribute"
 msgstr ""
 
@@ -10687,11 +10721,11 @@ msgstr ""
 msgid "Bounding box side midpoint"
 msgstr ""
 
-#: ../src/display/snap-indicator.cpp:176 ../src/ui/tool/node.cpp:1192
+#: ../src/display/snap-indicator.cpp:176 ../src/ui/tool/node.cpp:1251
 msgid "Smooth node"
 msgstr ""
 
-#: ../src/display/snap-indicator.cpp:179 ../src/ui/tool/node.cpp:1191
+#: ../src/display/snap-indicator.cpp:179 ../src/ui/tool/node.cpp:1250
 msgid "Cusp node"
 msgstr ""
 
@@ -11640,7 +11674,6 @@ msgstr ""
 
 #: ../src/extension/internal/filter/drop-shadow.h:38
 #: ../src/extension/internal/filter/drop-shadow.h:98
-#: ../src/ui/widget/object-composite-settings.cpp:63
 msgid "Opacity (%):"
 msgstr ""
 
@@ -13160,7 +13193,7 @@ msgstr ""
 #: ../src/ui/dialog/align-and-distribute.cpp:1031
 #: ../src/ui/dialog/document-properties.cpp:117
 #: ../src/ui/dialog/filedialogimpl-gtkmm.cpp:1411
-#: ../src/widgets/desktop-widget.cpp:1678
+#: ../src/widgets/desktop-widget.cpp:1696
 msgid "Page"
 msgstr ""
 
@@ -17683,6 +17716,10 @@ msgstr ""
 msgid "No file selected"
 msgstr ""
 
+#: ../src/ui/dialog/fill-and-stroke.cpp:57
+msgid "_Fill"
+msgstr ""
+
 #: ../src/ui/dialog/fill-and-stroke.cpp:58
 msgid "Stroke _paint"
 msgstr ""
@@ -19622,7 +19659,7 @@ msgstr ""
 
 #. Zoom
 #: ../src/ui/dialog/inkscape-preferences.cpp:478 ../src/verbs.cpp:2514
-#: ../src/widgets/desktop-widget.cpp:488
+#: ../src/widgets/desktop-widget.cpp:494
 msgid "Zoom"
 msgstr ""
 
@@ -22074,83 +22111,91 @@ msgid ""
 "node, click to select (more: Shift, Ctrl+Alt)"
 msgstr ""
 
-#: ../src/ui/tool/multi-path-manipulator.cpp:246
+#: ../src/ui/tool/multi-path-manipulator.cpp:317
 msgid "Retract handles"
 msgstr ""
 
-#: ../src/ui/tool/multi-path-manipulator.cpp:246
+#: ../src/ui/tool/multi-path-manipulator.cpp:317 ../src/ui/tool/node.cpp:247
 msgid "Change node type"
 msgstr ""
 
-#: ../src/ui/tool/multi-path-manipulator.cpp:254
+#: ../src/ui/tool/multi-path-manipulator.cpp:325
 msgid "Straighten segments"
 msgstr ""
 
-#: ../src/ui/tool/multi-path-manipulator.cpp:256
+#: ../src/ui/tool/multi-path-manipulator.cpp:327
 msgid "Make segments curves"
 msgstr ""
 
-#: ../src/ui/tool/multi-path-manipulator.cpp:263
+#: ../src/ui/tool/multi-path-manipulator.cpp:334
 msgid "Add nodes"
 msgstr ""
 
-#: ../src/ui/tool/multi-path-manipulator.cpp:269
+#: ../src/ui/tool/multi-path-manipulator.cpp:340
 msgid "Duplicate nodes"
 msgstr ""
 
-#: ../src/ui/tool/multi-path-manipulator.cpp:331
+#: ../src/ui/tool/multi-path-manipulator.cpp:402
 #: ../src/widgets/toolbox.cpp:1371
 msgid "Join nodes"
 msgstr ""
 
-#: ../src/ui/tool/multi-path-manipulator.cpp:338
+#: ../src/ui/tool/multi-path-manipulator.cpp:409
 #: ../src/widgets/toolbox.cpp:1382
 msgid "Break nodes"
 msgstr ""
 
-#: ../src/ui/tool/multi-path-manipulator.cpp:345
+#: ../src/ui/tool/multi-path-manipulator.cpp:416
 msgid "Delete nodes"
 msgstr ""
 
-#: ../src/ui/tool/multi-path-manipulator.cpp:663
+#: ../src/ui/tool/multi-path-manipulator.cpp:734
 msgid "Move nodes"
 msgstr ""
 
-#: ../src/ui/tool/multi-path-manipulator.cpp:666
+#: ../src/ui/tool/multi-path-manipulator.cpp:737
 msgid "Move nodes horizontally"
 msgstr ""
 
-#: ../src/ui/tool/multi-path-manipulator.cpp:670
+#: ../src/ui/tool/multi-path-manipulator.cpp:741
 msgid "Move nodes vertically"
 msgstr ""
 
-#: ../src/ui/tool/multi-path-manipulator.cpp:674
-#: ../src/ui/tool/multi-path-manipulator.cpp:677
+#: ../src/ui/tool/multi-path-manipulator.cpp:745
+#: ../src/ui/tool/multi-path-manipulator.cpp:748
 msgid "Rotate nodes"
 msgstr ""
 
-#: ../src/ui/tool/multi-path-manipulator.cpp:681
-#: ../src/ui/tool/multi-path-manipulator.cpp:687
+#: ../src/ui/tool/multi-path-manipulator.cpp:752
+#: ../src/ui/tool/multi-path-manipulator.cpp:758
 msgid "Scale nodes uniformly"
 msgstr ""
 
-#: ../src/ui/tool/multi-path-manipulator.cpp:684
+#: ../src/ui/tool/multi-path-manipulator.cpp:755
 msgid "Scale nodes"
 msgstr ""
 
-#: ../src/ui/tool/multi-path-manipulator.cpp:691
+#: ../src/ui/tool/multi-path-manipulator.cpp:762
 msgid "Scale nodes horizontally"
 msgstr ""
 
-#: ../src/ui/tool/multi-path-manipulator.cpp:695
+#: ../src/ui/tool/multi-path-manipulator.cpp:766
 msgid "Scale nodes vertically"
 msgstr ""
 
-#: ../src/ui/tool/multi-path-manipulator.cpp:699
+#: ../src/ui/tool/multi-path-manipulator.cpp:770
+msgid "Skew nodes horizontally"
+msgstr ""
+
+#: ../src/ui/tool/multi-path-manipulator.cpp:774
+msgid "Skew nodes vertically"
+msgstr ""
+
+#: ../src/ui/tool/multi-path-manipulator.cpp:778
 msgid "Flip nodes horizontally"
 msgstr ""
 
-#: ../src/ui/tool/multi-path-manipulator.cpp:702
+#: ../src/ui/tool/multi-path-manipulator.cpp:781
 msgid "Flip nodes vertically"
 msgstr ""
 
@@ -22205,33 +22250,33 @@ msgctxt "Node tool tip"
 msgid "Drag to select objects to edit"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:207
+#: ../src/ui/tool/node.cpp:222
 msgid "Cusp node handle"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:208
+#: ../src/ui/tool/node.cpp:223
 msgid "Smooth node handle"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:209
+#: ../src/ui/tool/node.cpp:224
 msgid "Symmetric node handle"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:210
+#: ../src/ui/tool/node.cpp:225
 msgid "Auto-smooth node handle"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:341
+#: ../src/ui/tool/node.cpp:400
 msgctxt "Path handle tip"
 msgid "more: Shift, Ctrl, Alt"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:343
+#: ../src/ui/tool/node.cpp:402
 msgctxt "Path handle tip"
 msgid "more: Ctrl, Alt"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:349
+#: ../src/ui/tool/node.cpp:408
 #, c-format
 msgctxt "Path handle tip"
 msgid ""
@@ -22239,24 +22284,24 @@ msgid ""
 "increments while rotating both handles"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:354
+#: ../src/ui/tool/node.cpp:413
 #, c-format
 msgctxt "Path handle tip"
 msgid ""
 "<b>Ctrl+Alt</b>: preserve length and snap rotation angle to %g° increments"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:360
+#: ../src/ui/tool/node.cpp:419
 msgctxt "Path handle tip"
 msgid "<b>Shift+Alt</b>: preserve handle length and rotate both handles"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:363
+#: ../src/ui/tool/node.cpp:422
 msgctxt "Path handle tip"
 msgid "<b>Alt</b>: preserve handle length while dragging"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:370
+#: ../src/ui/tool/node.cpp:429
 #, c-format
 msgctxt "Path handle tip"
 msgid ""
@@ -22264,67 +22309,67 @@ msgid ""
 "handles"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:374
+#: ../src/ui/tool/node.cpp:433
 #, c-format
 msgctxt "Path handle tip"
 msgid "<b>Ctrl</b>: snap rotation angle to %g° increments, click to retract"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:379
+#: ../src/ui/tool/node.cpp:438
 msgctxt "Path hande tip"
 msgid "<b>Shift</b>: rotate both handles by the same angle"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:386
+#: ../src/ui/tool/node.cpp:445
 #, c-format
 msgctxt "Path handle tip"
 msgid "<b>Auto node handle</b>: drag to convert to smooth node (%s)"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:389
+#: ../src/ui/tool/node.cpp:448
 #, c-format
 msgctxt "Path handle tip"
 msgid "<b>%s</b>: drag to shape the segment (%s)"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:405
+#: ../src/ui/tool/node.cpp:464
 #, c-format
 msgctxt "Path handle tip"
 msgid "Move handle by %s, %s; angle %.2f°, length %s"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:1145
+#: ../src/ui/tool/node.cpp:1204
 msgctxt "Path node tip"
 msgid "<b>Shift</b>: drag out a handle, click to toggle selection"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:1147
+#: ../src/ui/tool/node.cpp:1206
 msgctxt "Path node tip"
 msgid "<b>Shift</b>: click to toggle selection"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:1152
+#: ../src/ui/tool/node.cpp:1211
 msgctxt "Path node tip"
 msgid "<b>Ctrl+Alt</b>: move along handle lines, click to delete node"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:1155
+#: ../src/ui/tool/node.cpp:1214
 msgctxt "Path node tip"
 msgid "<b>Ctrl</b>: move along axes, click to change node type"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:1159
+#: ../src/ui/tool/node.cpp:1218
 msgctxt "Path node tip"
 msgid "<b>Alt</b>: sculpt nodes"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:1167
+#: ../src/ui/tool/node.cpp:1226
 #, c-format
 msgctxt "Path node tip"
 msgid "<b>%s</b>: drag to shape the path (more: Shift, Ctrl, Alt)"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:1170
+#: ../src/ui/tool/node.cpp:1229
 #, c-format
 msgctxt "Path node tip"
 msgid ""
@@ -22332,7 +22377,7 @@ msgid ""
 "(more: Shift, Ctrl, Alt)"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:1173
+#: ../src/ui/tool/node.cpp:1232
 #, c-format
 msgctxt "Path node tip"
 msgid ""
@@ -22340,83 +22385,83 @@ msgid ""
 "Shift, Ctrl, Alt)"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:1181
+#: ../src/ui/tool/node.cpp:1240
 #, c-format
 msgctxt "Path node tip"
 msgid "Move node by %s, %s"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:1193
+#: ../src/ui/tool/node.cpp:1252
 msgid "Symmetric node"
 msgstr ""
 
-#: ../src/ui/tool/node.cpp:1194
+#: ../src/ui/tool/node.cpp:1253
 msgid "Auto-smooth node"
 msgstr ""
 
-#: ../src/ui/tool/path-manipulator.cpp:797
+#: ../src/ui/tool/path-manipulator.cpp:749
 msgid "Scale handle"
 msgstr ""
 
-#: ../src/ui/tool/path-manipulator.cpp:821
+#: ../src/ui/tool/path-manipulator.cpp:773
 msgid "Rotate handle"
 msgstr ""
 
 #. We need to call MPM's method because it could have been our last node
-#: ../src/ui/tool/path-manipulator.cpp:1331 ../src/widgets/toolbox.cpp:1360
+#: ../src/ui/tool/path-manipulator.cpp:1283 ../src/widgets/toolbox.cpp:1360
 msgid "Delete node"
 msgstr ""
 
-#: ../src/ui/tool/path-manipulator.cpp:1339
+#: ../src/ui/tool/path-manipulator.cpp:1291
 msgid "Cycle node type"
 msgstr ""
 
-#: ../src/ui/tool/path-manipulator.cpp:1354
+#: ../src/ui/tool/path-manipulator.cpp:1306
 msgid "Drag handle"
 msgstr ""
 
-#: ../src/ui/tool/path-manipulator.cpp:1363
+#: ../src/ui/tool/path-manipulator.cpp:1315
 msgid "Retract handle"
 msgstr ""
 
-#: ../src/ui/tool/transform-handle-set.cpp:137
+#: ../src/ui/tool/transform-handle-set.cpp:139
 msgctxt "Transform handle tip"
 msgid "<b>Shift+Ctrl</b>: scale uniformly about the rotation center"
 msgstr ""
 
-#: ../src/ui/tool/transform-handle-set.cpp:139
+#: ../src/ui/tool/transform-handle-set.cpp:141
 msgctxt "Transform handle tip"
 msgid "<b>Ctrl:</b> scale uniformly"
 msgstr ""
 
-#: ../src/ui/tool/transform-handle-set.cpp:144
+#: ../src/ui/tool/transform-handle-set.cpp:146
 msgctxt "Transform handle tip"
 msgid ""
 "<b>Shift+Alt</b>: scale using an integer ratio about the rotation center"
 msgstr ""
 
-#: ../src/ui/tool/transform-handle-set.cpp:146
+#: ../src/ui/tool/transform-handle-set.cpp:148
 msgctxt "Transform handle tip"
 msgid "<b>Shift</b>: scale from the rotation center"
 msgstr ""
 
-#: ../src/ui/tool/transform-handle-set.cpp:149
+#: ../src/ui/tool/transform-handle-set.cpp:151
 msgctxt "Transform handle tip"
 msgid "<b>Alt</b>: scale using an integer ratio"
 msgstr ""
 
-#: ../src/ui/tool/transform-handle-set.cpp:151
+#: ../src/ui/tool/transform-handle-set.cpp:153
 msgctxt "Transform handle tip"
 msgid "<b>Scale handle</b>: drag to scale the selection"
 msgstr ""
 
-#: ../src/ui/tool/transform-handle-set.cpp:156
+#: ../src/ui/tool/transform-handle-set.cpp:158
 #, c-format
 msgctxt "Transform handle tip"
 msgid "Scale by %.2f%% x %.2f%%"
 msgstr ""
 
-#: ../src/ui/tool/transform-handle-set.cpp:311
+#: ../src/ui/tool/transform-handle-set.cpp:313
 #, c-format
 msgctxt "Transform handle tip"
 msgid ""
@@ -22424,18 +22469,18 @@ msgid ""
 "increments"
 msgstr ""
 
-#: ../src/ui/tool/transform-handle-set.cpp:314
+#: ../src/ui/tool/transform-handle-set.cpp:316
 msgctxt "Transform handle tip"
 msgid "<b>Shift</b>: rotate around the opposite corner"
 msgstr ""
 
-#: ../src/ui/tool/transform-handle-set.cpp:318
+#: ../src/ui/tool/transform-handle-set.cpp:320
 #, c-format
 msgctxt "Transform handle tip"
 msgid "<b>Ctrl</b>: snap angle to %f° increments"
 msgstr ""
 
-#: ../src/ui/tool/transform-handle-set.cpp:320
+#: ../src/ui/tool/transform-handle-set.cpp:322
 msgctxt "Transform handle tip"
 msgid ""
 "<b>Rotation handle</b>: drag to rotate the selection around the rotation "
@@ -22443,13 +22488,13 @@ msgid ""
 msgstr ""
 
 #. event
-#: ../src/ui/tool/transform-handle-set.cpp:325
+#: ../src/ui/tool/transform-handle-set.cpp:327
 #, c-format
 msgctxt "Transform handle tip"
 msgid "Rotate by %.2f°"
 msgstr ""
 
-#: ../src/ui/tool/transform-handle-set.cpp:419
+#: ../src/ui/tool/transform-handle-set.cpp:421
 #, c-format
 msgctxt "Transform handle tip"
 msgid ""
@@ -22457,36 +22502,36 @@ msgid ""
 "increments"
 msgstr ""
 
-#: ../src/ui/tool/transform-handle-set.cpp:422
+#: ../src/ui/tool/transform-handle-set.cpp:424
 msgctxt "Transform handle tip"
 msgid "<b>Shift</b>: skew about the rotation center"
 msgstr ""
 
-#: ../src/ui/tool/transform-handle-set.cpp:426
+#: ../src/ui/tool/transform-handle-set.cpp:428
 #, c-format
 msgctxt "Transform handle tip"
 msgid "<b>Ctrl</b>: snap skew angle to %f° increments"
 msgstr ""
 
-#: ../src/ui/tool/transform-handle-set.cpp:429
+#: ../src/ui/tool/transform-handle-set.cpp:431
 msgctxt "Transform handle tip"
 msgid ""
 "<b>Skew handle</b>: drag to skew (shear) selection about the opposite handle"
 msgstr ""
 
-#: ../src/ui/tool/transform-handle-set.cpp:435
+#: ../src/ui/tool/transform-handle-set.cpp:437
 #, c-format
 msgctxt "Transform handle tip"
 msgid "Skew horizontally by %.2f°"
 msgstr ""
 
-#: ../src/ui/tool/transform-handle-set.cpp:438
+#: ../src/ui/tool/transform-handle-set.cpp:440
 #, c-format
 msgctxt "Transform handle tip"
 msgid "Skew vertically by %.2f°"
 msgstr ""
 
-#: ../src/ui/tool/transform-handle-set.cpp:479
+#: ../src/ui/tool/transform-handle-set.cpp:497
 msgctxt "Transform handle tip"
 msgid "<b>Rotation center</b>: drag to change the origin of transforms"
 msgstr ""
@@ -22496,7 +22541,7 @@ msgid "_Blend mode:"
 msgstr ""
 
 #: ../src/ui/widget/filter-effect-chooser.cpp:26
-msgid "Blur:"
+msgid "_Blur:"
 msgstr ""
 
 #: ../src/ui/widget/layer-selector.cpp:115
@@ -22523,11 +22568,15 @@ msgstr ""
 msgid "MetadataLicence|Other"
 msgstr ""
 
-#: ../src/ui/widget/object-composite-settings.cpp:173
+#: ../src/ui/widget/object-composite-settings.cpp:63
+msgid "_Opacity (%):"
+msgstr ""
+
+#: ../src/ui/widget/object-composite-settings.cpp:174
 msgid "Change blur"
 msgstr ""
 
-#: ../src/ui/widget/object-composite-settings.cpp:213
+#: ../src/ui/widget/object-composite-settings.cpp:214
 #: ../src/ui/widget/selected-style.cpp:858
 #: ../src/ui/widget/selected-style.cpp:1152
 msgid "Change opacity"
@@ -24044,7 +24093,7 @@ msgid "Lower the current layer"
 msgstr ""
 
 #: ../src/verbs.cpp:2440
-msgid "Duplicate Current Layer"
+msgid "D_uplicate Current Layer"
 msgstr ""
 
 #: ../src/verbs.cpp:2441
@@ -25010,74 +25059,74 @@ msgstr ""
 msgid "Pattern offset"
 msgstr ""
 
-#: ../src/widgets/desktop-widget.cpp:384
+#: ../src/widgets/desktop-widget.cpp:390
 msgid "Zoom drawing if window size changes"
 msgstr ""
 
-#: ../src/widgets/desktop-widget.cpp:508
+#: ../src/widgets/desktop-widget.cpp:514
 msgid "Cursor coordinates"
 msgstr ""
 
-#: ../src/widgets/desktop-widget.cpp:523
+#: ../src/widgets/desktop-widget.cpp:529
 msgid "Z:"
 msgstr ""
 
 #. display the initial welcome message in the statusbar
-#: ../src/widgets/desktop-widget.cpp:558
+#: ../src/widgets/desktop-widget.cpp:564
 msgid ""
 "<b>Welcome to Inkscape!</b> Use shape or freehand tools to create objects; "
 "use selector (arrow) to move or transform them."
 msgstr ""
 
-#: ../src/widgets/desktop-widget.cpp:624
+#: ../src/widgets/desktop-widget.cpp:642
 #, c-format
 msgid "%s: %d (outline) - Inkscape"
 msgstr ""
 
-#: ../src/widgets/desktop-widget.cpp:626
+#: ../src/widgets/desktop-widget.cpp:644
 #, c-format
 msgid "%s: %d (no filters) - Inkscape"
 msgstr ""
 
-#: ../src/widgets/desktop-widget.cpp:628
+#: ../src/widgets/desktop-widget.cpp:646
 #, c-format
 msgid "%s: %d (print colors preview) - Inkscape"
 msgstr ""
 
-#: ../src/widgets/desktop-widget.cpp:630
+#: ../src/widgets/desktop-widget.cpp:648
 #, c-format
 msgid "%s: %d - Inkscape"
 msgstr ""
 
-#: ../src/widgets/desktop-widget.cpp:634
+#: ../src/widgets/desktop-widget.cpp:652
 #, c-format
 msgid "%s (outline) - Inkscape"
 msgstr ""
 
-#: ../src/widgets/desktop-widget.cpp:636
+#: ../src/widgets/desktop-widget.cpp:654
 #, c-format
 msgid "%s (no filters) - Inkscape"
 msgstr ""
 
-#: ../src/widgets/desktop-widget.cpp:638
+#: ../src/widgets/desktop-widget.cpp:656
 #, c-format
 msgid "%s (print colors preview) - Inkscape"
 msgstr ""
 
-#: ../src/widgets/desktop-widget.cpp:640
+#: ../src/widgets/desktop-widget.cpp:658
 #, c-format
 msgid "%s - Inkscape"
 msgstr ""
 
-#: ../src/widgets/desktop-widget.cpp:802
+#: ../src/widgets/desktop-widget.cpp:820
 msgid "Color-managed display is <b>enabled</b> in this window"
 msgstr ""
 
-#: ../src/widgets/desktop-widget.cpp:804
+#: ../src/widgets/desktop-widget.cpp:822
 msgid "Color-managed display is <b>disabled</b> in this window"
 msgstr ""
 
-#: ../src/widgets/desktop-widget.cpp:859
+#: ../src/widgets/desktop-widget.cpp:877
 #, c-format
 msgid ""
 "<span weight=\"bold\" size=\"larger\">Save changes to document \"%s\" before "
@@ -25086,11 +25135,11 @@ msgid ""
 "If you close without saving, your changes will be discarded."
 msgstr ""
 
-#: ../src/widgets/desktop-widget.cpp:866 ../src/widgets/desktop-widget.cpp:923
+#: ../src/widgets/desktop-widget.cpp:884 ../src/widgets/desktop-widget.cpp:941
 msgid "Close _without saving"
 msgstr ""
 
-#: ../src/widgets/desktop-widget.cpp:915
+#: ../src/widgets/desktop-widget.cpp:933
 #, c-format
 msgid ""
 "<span weight=\"bold\" size=\"larger\">The file \"%s\" was saved with a "
@@ -25099,7 +25148,7 @@ msgid ""
 "Do you want to save this file as Inkscape SVG?"
 msgstr ""
 
-#: ../src/widgets/desktop-widget.cpp:926
+#: ../src/widgets/desktop-widget.cpp:944
 msgid "_Save as SVG"
 msgstr ""
 
@@ -27785,6 +27834,11 @@ msgstr ""
 msgid "All in one"
 msgstr ""
 
+#: ../share/extensions/gcodetools_all_in_one.inx.h:8
+#: ../share/extensions/gcodetools_area.inx.h:5
+msgid "Area"
+msgstr ""
+
 #: ../share/extensions/gcodetools_all_in_one.inx.h:9
 #: ../share/extensions/gcodetools_area.inx.h:6
 msgid "Area artefacts"
index f735f2ff249b7dfb4fcc59d0023cba25018f6564..e659da012591f5da04524a5efc3002a86746a2ad 100644 (file)
@@ -168,6 +168,7 @@ otherstuff = \
        aisvg.xslt \
        colors.xml \
        jessyInk_video.svg \
+    svg2fxg.xsl \
        svg2xaml.xsl \
        xaml2svg.xsl
 
@@ -293,6 +294,7 @@ modules = \
        split.inx \
        straightseg.inx \
        summersnight.inx \
+    svg2fxg.inx \
        svg2xaml.inx \
        svg_and_media_zip_output.inx \
        svgcalendar.inx \
diff --git a/share/extensions/svg2fxg.inx b/share/extensions/svg2fxg.inx
new file mode 100755 (executable)
index 0000000..e2f9761
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
+    <_name>FXG Output</_name>
+    <id>org.inkscape.output.fxg</id>
+    <output>
+        <extension>.fxg</extension>
+        <mimetype>text/xml+fxg</mimetype>
+        <_filetypename>Flash XML Graphics (*.fxg)</_filetypename>
+        <_filetypetooltip>Adobe's XML Graphics file format</_filetypetooltip>
+    </output>
+    <xslt>
+        <file reldir="extensions">svg2fxg.xsl</file>
+    </xslt>
+</inkscape-extension>
diff --git a/share/extensions/svg2fxg.xsl b/share/extensions/svg2fxg.xsl
new file mode 100755 (executable)
index 0000000..7f80965
--- /dev/null
@@ -0,0 +1,2975 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Authors:
+  Nicolas Dufour <nicoduf@yahoo.fr>
+  
+Copyright (c) 2010 authors
+
+Released under GNU GPL, read the file 'COPYING' for more information
+-->
+
+<xsl:stylesheet version="1.0"
+xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+xmlns:xlink="http://www.w3.org/1999/xlink"
+xmlns:xs="http://www.w3.org/2001/XMLSchema"
+xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+xmlns="http://ns.adobe.com/fxg/2008"
+xmlns:fxg="http://ns.adobe.com/fxg/2008"
+xmlns:d="http://ns.adobe.com/fxg/2008/dt"
+xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+xmlns:exsl="http://exslt.org/common"
+xmlns:math="http://exslt.org/math"
+xmlns:libxslt="http://xmlsoft.org/XSLT/namespace"
+xmlns:svg="http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd"
+exclude-result-prefixes="rdf xlink xs exsl libxslt"
+extension-element-prefixes="math">
+
+<xsl:strip-space elements="*" />
+<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
+
+<!-- 
+  // Containers //
+
+  * Root templace
+  * Graphic attributes
+  * Groups
+-->
+
+<!-- 
+  // Root template //
+-->
+<xsl:template match="/">
+    <xsl:apply-templates mode="forward" />
+</xsl:template>
+<!--
+  // Graphic //
+  First SVG element is converted to Graphic
+-->
+<xsl:template mode="forward" match="/*[name(.) = 'svg']" priority="1">
+  <Graphic>
+    <xsl:attribute name="version">2.0</xsl:attribute>
+    <xsl:if test="@width and not(contains(@width, '%'))">
+      <xsl:attribute name="viewWidth">
+        <xsl:call-template name="convert_unit">
+          <xsl:with-param name="convert_value" select="@width" />
+        </xsl:call-template>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@height and not(contains(@height, '%'))">
+      <xsl:attribute name="viewHeight">
+        <xsl:call-template name="convert_unit">
+          <xsl:with-param name="convert_value" select="@height" />
+        </xsl:call-template>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@width and not(contains(@width, '%')) and @height and not(contains(@height, '%'))">
+      <mask>
+        <Group>
+          <Rect>
+            <xsl:attribute name="width">
+              <xsl:call-template name="convert_unit">
+                <xsl:with-param name="convert_value" select="@width" />
+              </xsl:call-template>
+            </xsl:attribute>
+            <xsl:attribute name="height">
+              <xsl:call-template name="convert_unit">
+                <xsl:with-param name="convert_value" select="@height" />
+              </xsl:call-template>
+            </xsl:attribute>
+            <fill>
+              <SolidColor color="#ffffff" alpha="1"/>
+            </fill>
+          </Rect>
+        </Group>
+      </mask>
+    </xsl:if>
+    <xsl:apply-templates mode="forward" />
+  </Graphic>
+</xsl:template>
+
+<!--
+  // inner SVG elements //
+  Converted to groups
+-->
+<xsl:template mode="forward" match="*[name(.) = 'svg']">
+  <Group>
+    <xsl:if test="@x">
+      <xsl:attribute name="x">
+          <xsl:call-template name="convert_unit">
+            <xsl:with-param name="convert_value" select="@x" />
+          </xsl:call-template>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@y">
+      <xsl:attribute name="y">
+        <xsl:call-template name="convert_unit">
+          <xsl:with-param name="convert_value" select="@y" />
+        </xsl:call-template>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@width and not(contains(@width, '%')) and @height and not(contains(@height, '%'))">
+      <xsl:attribute name="maskType"><xsl:value-of select="'clip'"/></xsl:attribute>
+      <mask>
+        <Group>
+          <Rect>
+            <xsl:attribute name="width">
+              <xsl:call-template name="convert_unit">
+                <xsl:with-param name="convert_value" select="@width" />
+              </xsl:call-template>
+            </xsl:attribute>
+            <xsl:attribute name="height">
+              <xsl:call-template name="convert_unit">
+                <xsl:with-param name="convert_value" select="@height" />
+              </xsl:call-template>
+            </xsl:attribute>
+            <fill>
+              <SolidColor color="#ffffff" alpha="1"/>
+            </fill>
+          </Rect>
+        </Group>
+      </mask>
+    </xsl:if>
+    <xsl:apply-templates mode="forward" />
+  </Group>
+</xsl:template>
+
+<!--
+  // Groups //
+  (including layers)
+  
+  FXG's Group doesn't support other elements attributes (such as font-size, etc.) 
+-->
+<xsl:template mode="forward" match="*[name(.) = 'g']">
+  <xsl:variable name="object">
+    <Group>
+      <xsl:if test="@style and contains(@style, 'display:none')">
+        <xsl:attribute name="Visibility">Collapsed</xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@width and not(contains(@width, '%'))">
+        <xsl:attribute name="width">
+          <xsl:call-template name="convert_unit">
+            <xsl:with-param name="convert_value" select="@width" />
+          </xsl:call-template>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@height and not(contains(@height, '%'))">
+        <xsl:attribute name="height">
+          <xsl:call-template name="convert_unit">
+            <xsl:with-param name="convert_value" select="@height" />
+          </xsl:call-template>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@x">
+        <xsl:attribute name="x">
+            <xsl:call-template name="convert_unit">
+              <xsl:with-param name="convert_value" select="@x" />
+            </xsl:call-template>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@y">
+        <xsl:attribute name="y">
+          <xsl:call-template name="convert_unit">
+            <xsl:with-param name="convert_value" select="@y" />
+          </xsl:call-template>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:apply-templates mode="object_opacity" select="." />
+      <xsl:apply-templates mode="id" select="." />
+      
+      <xsl:apply-templates mode="layer_blend" select="." />
+      <xsl:apply-templates mode="filter_effect" select="." />
+      <xsl:apply-templates mode="forward" select="*" />
+    </Group>
+  </xsl:variable>
+  
+  <xsl:variable name="clipped_object">
+    <xsl:apply-templates mode="clip" select="." >
+      <xsl:with-param name="object" select="$object" />
+      <xsl:with-param name="clip_type" select="'clip'" />
+    </xsl:apply-templates>
+  </xsl:variable>
+
+  <xsl:variable name="masked_object">
+    <xsl:apply-templates mode="clip" select="." >
+      <xsl:with-param name="object" select="$clipped_object" />
+      <xsl:with-param name="clip_type" select="'mask'" />
+    </xsl:apply-templates>
+  </xsl:variable>
+  
+  <xsl:choose>
+    <xsl:when test="@transform">
+    <Group>
+      <xsl:call-template name="object_transform">
+        <xsl:with-param name="object" select="$masked_object" />
+        <xsl:with-param name="transform" select="@transform" />
+      </xsl:call-template>
+    </Group>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$masked_object" />
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- 
+  // Transforms //
+  All the matrix, translate, rotate... stuff.
+  * Parse objects transform
+  * Object transform
+  * Parse gradient transform  
+  * Gradient transform
+  
+  Not supported by FXG:
+  * Skew transform.
+  * Multiple values rotation.
+-->
+
+<!-- 
+  // Parse object transform //
+-->
+<xsl:template name="parse_object_transform">
+  <xsl:param name="input" />  
+    <xsl:choose>
+  <!-- Matrix transform -->
+    <xsl:when test="starts-with($input, 'matrix(')">
+      <transform>
+      <Transform>
+      <matrix>
+        <Matrix>
+          <xsl:variable name="matrix" select="normalize-space(translate(substring-before(substring-after($input, 'matrix('), ')'), ',', ' '))" />
+          <xsl:variable name="a" select="substring-before($matrix, ' ')"/>
+          <xsl:variable name="ra" select="substring-after($matrix, ' ')"/>
+          <xsl:variable name="b" select="substring-before($ra, ' ')"/>
+          <xsl:variable name="rb" select="substring-after($ra, ' ')"/>
+          <xsl:variable name="c" select="substring-before($rb, ' ')"/>
+          <xsl:variable name="rc" select="substring-after($rb, ' ')"/>
+          <xsl:variable name="d" select="substring-before($rc, ' ')"/>
+          <xsl:variable name="rd" select="substring-after($rc, ' ')"/>
+          <xsl:variable name="tx" select="substring-before($rd, ' ')"/>
+          <xsl:variable name="ty" select="substring-after($rd, ' ')"/>
+          <xsl:attribute name="a"><xsl:value-of select="$a" /></xsl:attribute>
+          <xsl:attribute name="b"><xsl:value-of select="$b" /></xsl:attribute>
+          <xsl:attribute name="c"><xsl:value-of select="$c" /></xsl:attribute>
+          <xsl:attribute name="d"><xsl:value-of select="$d" /></xsl:attribute>
+          <xsl:attribute name="tx"><xsl:value-of select='format-number($tx, "#.##")' /></xsl:attribute>
+          <xsl:attribute name="ty"><xsl:value-of select='format-number($ty, "#.##")' /></xsl:attribute>
+        </Matrix>
+      </matrix>
+      </Transform>
+      </transform>  
+    </xsl:when>
+
+  <!-- Scale transform -->
+    <xsl:when test="starts-with($input, 'scale(')">
+      <xsl:variable name="scale" select="normalize-space(translate(substring-before(substring-after($input, 'scale('), ')'), ',', ' '))" />
+      <xsl:choose>
+        <xsl:when test="contains($scale, ' ')">
+          <xsl:attribute name="scaleX">
+            <xsl:value-of select="substring-before($scale, ' ')" />
+          </xsl:attribute>
+          <xsl:attribute name="scaleY">
+            <xsl:value-of select="substring-after($scale, ' ')" />
+          </xsl:attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:attribute name="scaleX">
+            <xsl:value-of select="$scale" />
+          </xsl:attribute>
+          <xsl:attribute name="scaleY">
+            <xsl:value-of select="$scale" />
+          </xsl:attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+  
+  <!-- Rotate transform -->
+    <xsl:when test="starts-with($input, 'rotate(')">
+      <xsl:variable name="rotate" select="normalize-space(translate(substring-before(substring-after($input, 'rotate('), ')'), ',', ' '))" />
+      <xsl:attribute name="rotation">
+        <xsl:choose>
+          <xsl:when test="contains($rotate, ' ')">
+            <xsl:value-of select="substring-before($rotate, ' ')" />
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$rotate" />
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+      <xsl:if test="@rx">
+        <xsl:attribute name="CenterX">
+          <xsl:value-of select="@rx" />
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@ry">
+        <xsl:attribute name="CenterY">
+          <xsl:value-of select="@ry" />
+        </xsl:attribute>
+      </xsl:if>
+    </xsl:when>
+  
+  <!-- Translate transform -->
+    <xsl:when test="starts-with($input, 'translate(')">
+      <xsl:variable name="translate" select="normalize-space(translate(substring-before(substring-after($input, 'translate('), ')'), ',', ' '))" />
+      <xsl:choose>
+        <xsl:when test="contains($translate, ' ')">
+          <xsl:attribute name="x">
+            <xsl:value-of select="substring-before($translate, ' ')" />
+          </xsl:attribute>
+          <xsl:attribute name="y">
+            <xsl:value-of select="substring-after($translate, ' ')" />
+          </xsl:attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:attribute name="x">
+            <xsl:value-of select="$translate" />
+          </xsl:attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+<!-- 
+  // Object transform //
+  FXG needs a separate group for each transform type in the transform attribute (scale+translate != translate+scale)
+-->
+<xsl:template name="object_transform">
+  <xsl:param name="object" />  
+  <xsl:param name="transform" />
+
+  <xsl:variable name="values" select="normalize-space(translate($transform, ',', ' '))" />
+  <xsl:choose>
+    <xsl:when test="contains($values, ') ')">
+      <xsl:call-template name="parse_object_transform">
+        <xsl:with-param name="input" select="concat(substring-before($values, ') '), ')')" />
+      </xsl:call-template>
+      <xsl:variable name="values2" select="substring-after($values, ') ')" />
+      <Group>
+      <xsl:choose>
+        <xsl:when test="contains($values2, ') ')">
+          <xsl:call-template name="parse_object_transform">
+            <xsl:with-param name="input" select="concat(substring-before($values2, ') '), ')')" />
+          </xsl:call-template>
+          <xsl:variable name="values3" select="substring-after($values2, ') ')" />
+          <Group>
+            <xsl:call-template name="parse_object_transform">
+              <xsl:with-param name="input" select="concat($values3, ')')" />
+            </xsl:call-template>
+            <xsl:copy-of select="$object" />
+          </Group>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="parse_object_transform">
+            <xsl:with-param name="input" select="$values2" />
+          </xsl:call-template>
+          <xsl:copy-of select="$object" />
+        </xsl:otherwise>
+      </xsl:choose>
+      </Group>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="parse_object_transform">
+        <xsl:with-param name="input" select="$values" />
+      </xsl:call-template>
+      <xsl:copy-of select="$object" />
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- 
+  // Parse gradient transform //
+-->
+<xsl:template name="parse_gradient_transform">
+  <xsl:param name="input" />  
+  <xsl:param name="type" />
+  <xsl:choose>
+  <!-- Scale transform -->
+    <xsl:when test="starts-with($input, 'scale(')">
+      <xsl:variable name="scale" select="normalize-space(translate(substring-before(substring-after($input, 'scale('), ')'), ',', ' '))" />
+      <xsl:choose>
+        <xsl:when test="$type='radial'">
+          <xsl:choose>
+            <xsl:when test="contains($scale, ' ')">
+              <xsl:attribute name="scaleX">
+                <xsl:value-of select="substring-before($scale, ' ')" />
+              </xsl:attribute>
+              <xsl:attribute name="scaleY">
+                <xsl:value-of select="substring-after($scale, ' ')" />
+              </xsl:attribute>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:attribute name="scaleX">
+                <xsl:value-of select="$scale" />
+              </xsl:attribute>
+              <xsl:attribute name="scaleY">
+                <xsl:value-of select="$scale" />
+              </xsl:attribute>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:attribute name="scaleX">
+            <xsl:value-of select="$scale" />
+          </xsl:attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    
+  <!-- Rotate transform -->
+    <xsl:when test="starts-with($input, 'rotate(')">
+      <xsl:variable name="rotate" select="normalize-space(translate(substring-before(substring-after($input, 'rotate('), ')'), ',', ' '))" />
+      <xsl:attribute name="rotation">
+        <xsl:choose>
+          <xsl:when test="contains($rotate, ' ')">
+            <xsl:value-of select="substring-before($rotate, ' ')" />
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$rotate" />
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+    </xsl:when>
+    
+  <!-- Translate transform -->
+    <xsl:when test="starts-with($input, 'translate(')">
+      <xsl:variable name="translate" select="normalize-space(translate(substring-before(substring-after($input, 'translate('), ')'), ',', ' '))" />
+      <xsl:choose>
+        <xsl:when test="contains($translate, ' ')">
+          <xsl:attribute name="x">
+            <xsl:value-of select="substring-before($translate, ' ')" />
+          </xsl:attribute>
+          <xsl:attribute name="y">
+            <xsl:value-of select="substring-after($translate, ' ')" />
+          </xsl:attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:attribute name="x">
+            <xsl:value-of select="$translate" />
+          </xsl:attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+<!-- 
+  // Gradient transform //
+  Not implemented yet
+  Gradient positioning and tranformation are very different in FXG
+-->
+<xsl:template name="gradient_transform">
+  <xsl:param name="transform" />
+  <xsl:param name="type" />
+  
+  <xsl:if test="contains($transform, 'translate')">
+    <xsl:call-template name="parse_gradient_transform">
+      <xsl:with-param name="input" select="concat('translate(', substring-before(substring-after($transform, 'translate('), ')'), ')')" />
+      <xsl:with-param name="type" select="$type" />
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+<!--
+  // Resources (defs) //
+
+  * Resources ids
+  * Generic defs template
+  * Defs gradients
+  * Layers blend mode
+  * Generic filters template
+  * Filter effects
+  * Linked filter effects
+  * Linear gradients
+  * Radial gradients
+  * Gradient stops list
+  * Gradient stop
+  * Clipping
+-->
+
+<!-- 
+  // Resources ids //
+-->
+<xsl:template mode="resources" match="*">
+  <!-- should be in-depth -->
+  <xsl:if test="ancestor::*[name(.) = 'defs']"><xsl:attribute name="id"><xsl:value-of select="@id" /></xsl:attribute></xsl:if>
+</xsl:template>
+
+<!--
+  // Generic defs template //
+-->
+<xsl:template mode="forward" match="defs">
+<!-- Ignoring defs, do nothing  
+  <xsl:apply-templates mode="forward" />
+-->
+</xsl:template>
+
+<!--
+  // Defs gradients //
+  ignored
+-->
+<xsl:template mode="forward" match="*[name(.) = 'linearGradient' or name(.) = 'radialGradient']">
+
+</xsl:template>
+
+<!-- 
+  // Layers blend mode //
+
+  Partial support
+  Looks good with normal, multiply, and darken
+-->
+<xsl:template mode="layer_blend" match="*">
+  <xsl:if test="@inkscape:groupmode='layer' and @style and contains(@style, 'filter:url(#')">
+    <xsl:variable name="id" select="substring-before(substring-after(@style, 'filter:url(#'), ')')" />
+    <xsl:for-each select="//*[@id=$id]">
+      <xsl:if test="name(child::node()) = 'feBlend'">
+        <xsl:attribute name="blendMode">
+          <xsl:value-of select="child::node()/@mode"/>
+        </xsl:attribute>
+      </xsl:if>
+    </xsl:for-each>
+  </xsl:if>
+</xsl:template>
+
+<!--
+  // Generic filters template //
+  Limited to one filter (can be improved)
+-->
+<xsl:template mode="forward" match="*[name(.) = 'filter']">
+  <xsl:if test="count(*) = 1">
+    <xsl:apply-templates mode="forward" />
+  </xsl:if> 
+</xsl:template>
+
+<!--
+  // GaussianBlur filter effects //
+  Blur values approximated with d = floor(s * 3*sqrt(2*pi)/4 + 0.5) from:
+    http://www.w3.org/TR/SVG/filters.html#feGaussianBlurElement
+  Blur quality=2 recommended by the FXG specifications:
+    http://opensource.adobe.com/wiki/display/flexsdk/FXG+2.0+Specification#FXG2.0Specification-FilterEffects
+-->
+<xsl:template mode="forward" match="*[name(.) = 'feGaussianBlur']">
+  <xsl:if test="name(.)='feGaussianBlur'">
+    <filters>
+      <BlurFilter>
+        <xsl:attribute name="quality">2</xsl:attribute>
+        <xsl:if test="@stdDeviation">
+          <xsl:variable name="blur" select="normalize-space(translate(@stdDeviation, ',', ' '))" />
+          <xsl:choose>
+            <xsl:when test="not(contains($blur, ' '))">
+              <xsl:attribute name="blurX">
+                <xsl:value-of select="floor($blur * 1.88 + 0.5)" />
+              </xsl:attribute>
+              <xsl:attribute name="blurY">
+                <xsl:value-of select="floor($blur * 1.88 + 0.5)" />
+              </xsl:attribute>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:attribute name="blurX">
+                <xsl:value-of select="floor(substring-before($blur, ' ') * 1.88 + 0.5)" />
+              </xsl:attribute>
+              <xsl:attribute name="blurY">
+                <xsl:value-of select="floor(substring-after($blur, ' ') * 1.88 + 0.5)" />
+              </xsl:attribute>
+            </xsl:otherwise>
+          </xsl:choose>          
+        </xsl:if>
+      </BlurFilter>
+    </filters>
+  </xsl:if>
+</xsl:template>
+
+<!--
+  // Linked filter effect //
+  Only supports blurs
+-->
+<xsl:template mode="filter_effect" match="*">
+  <xsl:variable name="id">
+    <xsl:choose>
+      <xsl:when test="@filter and starts-with(@filter, 'url(#')">
+        <xsl:value-of select="substring-before(substring-after(@filter, 'url(#'), ')')" />
+      </xsl:when>
+      <xsl:when test="@style and contains(@style, 'filter:url(#')">
+        <xsl:value-of select="substring-before(substring-after(@style, 'filter:url(#'), ')')" />
+      </xsl:when>
+    </xsl:choose>
+  </xsl:variable>
+
+  <xsl:for-each select="//*[@id=$id]">
+    <xsl:apply-templates mode="forward" />
+  </xsl:for-each>
+</xsl:template>
+
+<!--
+  // Linear gradient //
+  Full convertion to FXG would require some math.
+-->
+<xsl:template name="linearGradient">
+  <xsl:param name="id" />
+  <xsl:for-each select="//*[@id=$id]">
+    <xsl:if test="@id">
+      <xsl:attribute name="id">
+        <xsl:value-of select="@id" />
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@spreadMethod">
+      <xsl:attribute name="spreadMethod">
+        <xsl:choose>
+          <xsl:when test="@spreadMethod = 'pad'">pad</xsl:when>
+          <xsl:when test="@spreadMethod = 'reflect'">reflect</xsl:when>
+          <xsl:when test="@spreadMethod = 'repeat'">repeat</xsl:when>
+        </xsl:choose>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@color-interpolation">
+      <xsl:attribute name="interpolationMethod">
+        <xsl:choose>
+          <xsl:when test="@color-interpolation = 'linearRGB'">linearRGB</xsl:when>
+          <xsl:otherwise>rgb</xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@x1 and @x2 and @y1 and @y2 and function-available('math:atan')">
+      <xsl:attribute name="rotation">
+        <xsl:value-of select="57.3 * math:atan((@y2 - @y1) div (@x2 - @x1))" />
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@gradientTransform">
+      <xsl:call-template name="gradient_transform">
+        <xsl:with-param name="transform" select="@gradientTransform" />
+        <xsl:with-param name="type" select="linear" />
+      </xsl:call-template>
+    </xsl:if> 
+    <xsl:choose>
+      <xsl:when test="@xlink:href">
+        <xsl:variable name="reference_id" select="@xlink:href" />
+        <xsl:call-template name="gradientStops" >
+          <xsl:with-param name="id">
+            <xsl:value-of select="substring-after($reference_id, '#')" />
+          </xsl:with-param>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise><xsl:apply-templates mode="forward" /></xsl:otherwise>
+    </xsl:choose>
+  </xsl:for-each>
+</xsl:template>
+
+<!--
+  // Radial gradient //
+    
+  Full convertion to FXG would require some math.
+-->
+<xsl:template name="radialGradient">
+  <xsl:param name="id" />
+  <xsl:for-each select="//*[@id=$id]">
+    <xsl:if test="@id">
+      <xsl:attribute name="id">
+        <xsl:value-of select="@id" />
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@spreadMethod">
+      <xsl:attribute name="spreadMethod">
+        <xsl:choose>
+          <xsl:when test="@spreadMethod = 'pad'">pad</xsl:when>
+          <xsl:when test="@spreadMethod = 'reflect'">reflect</xsl:when>
+          <xsl:when test="@spreadMethod = 'repeat'">repeat</xsl:when>
+        </xsl:choose>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@color-interpolation">
+      <xsl:attribute name="interpolationMethod">
+        <xsl:choose>
+          <xsl:when test="@color-interpolation = 'linearRGB'">linearRGB</xsl:when>
+          <xsl:otherwise>rgb</xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@gradientTransform">
+      <xsl:call-template name="gradient_transform">
+        <xsl:with-param name="transform" select="@gradientTransform" />
+        <xsl:with-param name="type" select="radial" />
+      </xsl:call-template>
+    </xsl:if>
+    <xsl:choose>
+      <xsl:when test="@xlink:href">
+        <xsl:variable name="reference_id" select="@xlink:href" />
+        <xsl:call-template name="gradientStops" >
+          <xsl:with-param name="id">
+            <xsl:value-of select="substring-after($reference_id, '#')" />
+          </xsl:with-param>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise><xsl:apply-templates mode="forward" /></xsl:otherwise>
+    </xsl:choose>
+  </xsl:for-each>
+</xsl:template>
+
+<!--
+  // Gradient stops list //
+  
+  TODO: Find a way to test the existence of the node-set
+-->
+<xsl:template name="gradientStops">
+  <xsl:param name="id" />
+  <xsl:variable name="stops">
+    <xsl:for-each select="//*[@id=$id]">
+      <xsl:apply-templates mode="forward" />
+    </xsl:for-each>
+  </xsl:variable>
+  <xsl:choose>
+    <xsl:when test="not($stops)">
+      <GradientEntry>
+        <xsl:attribute name="alpha">0</xsl:attribute>
+      </GradientEntry>
+    </xsl:when>
+    <xsl:otherwise><xsl:copy-of select="$stops" /></xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!--
+  // Gradient stop //
+-->
+<xsl:template mode="forward" match="*[name(.) = 'stop']">
+  <GradientEntry>
+    <!--xsl:apply-templates mode="stop_opacity" select="." /-->
+    <xsl:apply-templates mode="stop_color" select="." />
+    <xsl:apply-templates mode="offset" select="." />
+    <xsl:apply-templates mode="forward" />
+  </GradientEntry>
+</xsl:template>
+
+<!--
+  // Clipping and masking//
+-->
+<xsl:template mode="clip" match="*">
+  <xsl:param name="object" />
+  <xsl:param name="clip_type" />
+
+  <xsl:choose>
+    <xsl:when test="$clip_type='clip' and @clip-path and contains(@clip-path, 'url')">
+      <Group>
+        <xsl:attribute name="maskType"><xsl:value-of select="'clip'"/></xsl:attribute>
+        <mask>
+          <Group>
+            <xsl:variable name="clip_id" select="substring-before(substring-after(@clip-path, 'url(#'), ')')"/>
+            <xsl:for-each select="//*[@id=$clip_id]">
+              <xsl:if test="not(@clipPathUnits) or @clipPathUnits != 'objectBoundingBox'">
+                <xsl:apply-templates mode="forward" />
+              </xsl:if>
+            </xsl:for-each>
+          </Group>
+        </mask>
+        <xsl:copy-of select="$object"/>
+      </Group>
+    </xsl:when>
+    <xsl:when test="$clip_type='mask' and @mask and contains(@mask, 'url')">
+      <Group>
+        <xsl:attribute name="maskType"><xsl:value-of select="'alpha'"/></xsl:attribute>
+        <mask>
+          <Group>
+            <xsl:variable name="mask_id" select="substring-before(substring-after(@mask, 'url(#'), ')')"/>
+            <xsl:for-each select="//*[@id=$mask_id]">
+              <xsl:if test="not(@maskUnits) or @maskUnits != 'objectBoundingBox'">
+                <xsl:apply-templates mode="forward" />
+              </xsl:if>
+            </xsl:for-each>
+          </Group>
+        </mask>
+        <xsl:copy-of select="$object"/>
+      </Group>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$object" />
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!--
+  // Misc templates //
+
+  * Id converter
+  * Decimal to hexadecimal converter
+  * Unit to pixel converter
+  * Switch
+  * Unknows tags
+  * Object description (not supported)
+  * Title and description (not supported)
+  * Symbols (not supported)
+  * Use (not supported)
+  * RDF and foreign objects (not supported)
+  * Misc ignored stuff (markers, patterns, styles)
+-->
+
+<!--
+  // Id converter //
+  Removes "-" from the original id
+  (Not sure FXG really needs it)
+-->
+<xsl:template mode="id" match="*">
+  <xsl:if test="@id">
+    <xsl:attribute name="id"><xsl:value-of select="translate(@id, '- ', '')" /></xsl:attribute>
+  </xsl:if>
+</xsl:template>
+
+<!--
+  // Decimal to hexadecimal converter //
+-->
+<xsl:template name="to_hex">
+  <xsl:param name="convert" />
+  <xsl:value-of select="concat(substring('0123456789ABCDEF', 1 + floor(round($convert) div 16), 1), substring('0123456789ABCDEF', 1 + round($convert) mod 16, 1))" />
+</xsl:template>
+
+<!-- 
+  // Unit to pixel converter //
+  Values with units (except %) are converted to pixels and rounded.
+  Unknown units are kept.
+  em, ex and % not implemented
+-->
+<xsl:template name="convert_unit">
+  <xsl:param name="convert_value" />
+  <xsl:choose>
+    <xsl:when test="contains($convert_value, 'px')">
+      <xsl:value-of select="round(translate($convert_value, 'px', ''))" />
+    </xsl:when>
+    <xsl:when test="contains($convert_value, 'pt')">
+      <xsl:value-of select="round(translate($convert_value, 'pt', '') * 1.25)" />
+    </xsl:when>
+    <xsl:when test="contains($convert_value, 'pc')">
+      <xsl:value-of select="round(translate($convert_value, 'pc', '') * 15)" />
+    </xsl:when>
+    <xsl:when test="contains($convert_value, 'mm')">
+      <xsl:value-of select="round(translate($convert_value, 'mm', '') * 3.543307)" />
+    </xsl:when>
+    <xsl:when test="contains($convert_value, 'cm')">
+      <xsl:value-of select="round(translate($convert_value, 'cm', '') * 35.43307)" />
+    </xsl:when>
+    <xsl:when test="contains($convert_value, 'in')">
+      <xsl:value-of select="round(translate($convert_value, 'in', '') * 90)" />
+    </xsl:when>
+    <xsl:when test="contains($convert_value, 'ft')">
+      <xsl:value-of select="round(translate($convert_value, 'ft', '') * 1080)" />
+    </xsl:when>
+    <xsl:when test="not(string(number($convert_value))='NaN')">
+      <xsl:value-of select="round($convert_value)" />
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$convert_value" />
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!--
+  // Switch //
+-->
+<xsl:template mode="forward" match="*[name(.) = 'switch']">
+  <xsl:apply-templates mode="forward" />
+</xsl:template>
+
+<!-- 
+  // Unknown tags //
+  With generic and mode="forward" templates
+-->
+<xsl:template match="*">
+  <xsl:comment><xsl:value-of select="concat('Unknown tag: ', name(.))" /></xsl:comment>
+</xsl:template>
+
+<xsl:template mode="forward" match="*">
+  <xsl:comment><xsl:value-of select="concat('Unknown tag: ', name(.))" /></xsl:comment>
+</xsl:template>
+
+<!-- 
+  // Object description //
+-->
+<xsl:template mode="desc" match="*">
+
+</xsl:template>
+
+<!-- 
+  // Title and description //
+  Title is ignored and desc is converted to Tag in the mode="desc" template
+-->
+<xsl:template mode="forward" match="*[name(.) = 'title' or name(.) = 'desc']">
+
+</xsl:template>
+
+<!--
+  // Symbols //
+-->
+<xsl:template mode="forward" match="*[name(.) = 'symbol']">
+
+</xsl:template>
+
+<!--
+  // Use //
+  Could be implemented via librairies
+  (but since it is not supported by Inkscape, not implemented yet)
+-->
+<xsl:template mode="forward" match="*[name(.) = 'use']">
+
+</xsl:template>
+
+<!--
+  // RDF and foreign objects //
+-->
+<xsl:template mode="forward" match="rdf:RDF | *[name(.) = 'foreignObject']">
+
+</xsl:template>
+
+<!--
+  // Misc ignored stuff (markers, patterns, styles) //
+-->
+<xsl:template mode="forward" match="*[name(.) = 'marker' or name(.) = 'pattern' or name(.) = 'style']">
+
+</xsl:template>
+
+<!--
+  // Colors and patterns //
+
+  * Generic color template
+  * Object opacity
+  * Fill
+  * Fill opacity
+  * Fill rule
+  * Generic fill template
+  * Stroke
+  * Stroke opacity
+  * Generic stroke template
+  * Stroke width
+  * Stroke mitterlimit
+  * Stroke dasharray (not supported in FXG)
+  * Stroke dashoffset (not supported in FXG)
+  * Linejoin SVG to FxG converter
+  * Stroke linejoin
+  * Linecap SVG to FXG converter
+  * Stroke linecap
+  * Gradient stop
+  * Gradient stop opacity
+  * Gradient stop offset
+-->
+
+<!--
+  // Generic color template //
+-->
+<xsl:template name="template_color">
+  <xsl:param name="colorspec" />
+  <xsl:choose>
+    <xsl:when test="starts-with($colorspec, 'rgb(') and not(contains($colorspec , '%'))">
+      <xsl:value-of select="'#'" />
+      <xsl:call-template name="to_hex">
+        <xsl:with-param name="convert">
+          <xsl:value-of select="substring-before(substring-after($colorspec, 'rgb('), ',')" />
+        </xsl:with-param>
+      </xsl:call-template>
+      <xsl:call-template name="to_hex">
+        <xsl:with-param name="convert">
+          <xsl:value-of select="substring-before(substring-after(substring-after($colorspec, 'rgb('), ','), ',')" />
+        </xsl:with-param>
+      </xsl:call-template>
+      <xsl:call-template name="to_hex">
+        <xsl:with-param name="convert">
+          <xsl:value-of select="substring-before(substring-after(substring-after(substring-after($colorspec, 'rgb('), ','), ','), ')')" />
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="starts-with($colorspec, 'rgb(') and contains($colorspec , '%')">
+      <xsl:value-of select="'#'" />
+      <xsl:call-template name="to_hex">
+        <xsl:with-param name="convert">
+          <xsl:value-of select="number(substring-before(substring-after($colorspec, 'rgb('), '%,')) * 255 div 100" />
+        </xsl:with-param>
+      </xsl:call-template>
+      <xsl:call-template name="to_hex">
+        <xsl:with-param name="convert">
+          <xsl:value-of select="number(substring-before(substring-after(substring-after($colorspec, 'rgb('), ','), '%,')) * 255 div 100" />
+        </xsl:with-param>
+      </xsl:call-template>
+      <xsl:call-template name="to_hex">
+        <xsl:with-param name="convert">
+          <xsl:value-of select="number(substring-before(substring-after(substring-after(substring-after($colorspec, 'rgb('), ','), ','), '%)')) * 255 div 100" />
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="starts-with($colorspec, '#')">
+      <xsl:value-of select="'#'" />
+      <xsl:choose>
+        <xsl:when test="string-length(substring-after($colorspec, '#')) = 3">
+          <xsl:variable name="colorspec3">
+            <xsl:value-of select="translate(substring-after($colorspec, '#'), 'abcdefgh', 'ABCDEFGH')" />
+          </xsl:variable>
+          <xsl:value-of select="concat(substring($colorspec3, 1, 1), substring($colorspec3, 1, 1))" />
+          <xsl:value-of select="concat(substring($colorspec3, 2, 1), substring($colorspec3, 2, 1))" />
+          <xsl:value-of select="concat(substring($colorspec3, 3, 1), substring($colorspec3, 3, 1))" />
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="translate(substring-after($colorspec, '#'), 'abcdefgh', 'ABCDEFGH')" />
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:variable name="named_color_hex" select="document('colors.xml')/colors/color[@name = translate($colorspec, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')]/@hex" />
+      <xsl:choose>
+        <xsl:when test="$named_color_hex and $named_color_hex != ''">
+          <xsl:value-of select="'#'" />
+          <xsl:value-of select="substring-after($named_color_hex, '#')" />
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$colorspec" />
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!--
+  // Object opacity //
+-->
+<xsl:template mode="object_opacity" match="*">
+  <xsl:if test="@opacity or (@style and (contains(@style, ';opacity:') or starts-with(@style, 'opacity:')))">
+    <xsl:variable name="value">
+    <xsl:choose>
+      <xsl:when test="@opacity">
+        <xsl:value-of select="@opacity" />
+      </xsl:when>
+      <xsl:when test="@style and contains(@style, ';opacity:')">
+        <xsl:variable name="Opacity" select="substring-after(@style, ';opacity:')" />
+        <xsl:choose>
+          <xsl:when test="contains($Opacity, ';')">
+            <xsl:value-of select="substring-before($Opacity, ';')" />
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$Opacity" />
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:when test="@style and starts-with(@style, 'opacity:')">
+        <xsl:variable name="Opacity" select="substring-after(@style, 'opacity:')" />
+        <xsl:choose>
+          <xsl:when test="contains($Opacity, ';')">
+            <xsl:value-of select="substring-before($Opacity, ';')" />
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$Opacity" />
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:when test="name(..) = 'g' or name(..) = 'svg'">
+        <xsl:apply-templates mode="object_opacity" select="parent::*" />
+      </xsl:when>
+      <xsl:otherwise>1</xsl:otherwise>
+    </xsl:choose>
+    </xsl:variable>
+    <xsl:attribute name="alpha">
+    <xsl:choose>
+      <xsl:when test="$value &lt; 0">0</xsl:when>
+      <xsl:when test="$value &gt; 1">1</xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$value" />
+      </xsl:otherwise>
+    </xsl:choose>
+    </xsl:attribute>
+  </xsl:if>
+</xsl:template>
+
+<!--
+  // Fill //
+-->
+<xsl:template mode="fill" match="*">
+  <xsl:variable name="value">
+    <xsl:choose>
+      <xsl:when test="@fill">
+        <xsl:value-of select="@fill" />
+      </xsl:when>
+      <xsl:when test="@style and contains(@style, 'fill:')">
+        <xsl:variable name="Fill" select="normalize-space(substring-after(@style, 'fill:'))" />
+        <xsl:choose>
+          <xsl:when test="contains($Fill, ';')">
+            <xsl:value-of select="substring-before($Fill, ';')" />
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$Fill" />
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:when test="name(..) = 'g' or name(..) = 'svg'">
+        <xsl:apply-templates mode="fill" select="parent::*"/>
+      </xsl:when>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:if test="$value">
+    <!-- Removes unwanted characters in the color link (TODO: export to a specific template)-->
+    <xsl:value-of select="normalize-space(translate($value, '&quot;', ''))" />
+  </xsl:if>
+</xsl:template>
+
+<!--
+  // Fill opacity //
+-->
+<xsl:template mode="fill_opacity" match="*">
+  <xsl:variable name="value">
+  <xsl:choose>
+    <xsl:when test="@fill-opacity">
+      <xsl:value-of select="@fill-opacity" />
+    </xsl:when>
+    <xsl:when test="@style and contains(@style, 'fill-opacity:')">
+      <xsl:variable name="Opacity" select="substring-after(@style, 'fill-opacity:')" />
+      <xsl:choose>
+        <xsl:when test="contains($Opacity, ';')">
+          <xsl:value-of select="substring-before($Opacity, ';')" />
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$Opacity" />
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:when test="name(..) = 'g' or name(..) = 'svg'">
+      <xsl:apply-templates mode="fill_opacity" select="parent::*" />
+    </xsl:when>
+    <xsl:otherwise>1</xsl:otherwise>
+  </xsl:choose>
+  </xsl:variable>
+  <xsl:choose>
+    <xsl:when test="$value &lt; 0">0</xsl:when>
+    <xsl:when test="$value &gt; 1">1</xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$value" />
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!--
+  // Fill rule //
+-->
+<xsl:template mode="fill_rule" match="*">
+  <xsl:choose>
+    <xsl:when test="@fill-rule and (@fill-rule = 'nonzero' or @fill-rule = 'evenodd')">
+      <xsl:if test="@fill-rule = 'nonzero'">
+        <xsl:attribute name="winding">nonZero</xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@fill-rule = 'evenodd'">
+        <xsl:attribute name="winding">evenOdd</xsl:attribute>
+      </xsl:if>
+    </xsl:when>
+    <xsl:when test="@style and contains(@style, 'fill-rule:')">
+      <xsl:variable name="FillRule" select="normalize-space(substring-after(@style, 'fill-rule:'))" />
+      <xsl:choose>
+        <xsl:when test="contains($FillRule, ';')">
+          <xsl:if test="substring-before($FillRule, ';') = 'nonzero'">
+            <xsl:attribute name="winding">nonZero</xsl:attribute>
+          </xsl:if>
+          <xsl:if test="substring-before($FillRule, ';') = 'evenodd'">
+            <xsl:attribute name="winding">evenOdd</xsl:attribute>
+          </xsl:if>
+        </xsl:when>
+        <xsl:when test="$FillRule = 'nonzero'">
+          <xsl:attribute name="winding">nonZero</xsl:attribute>
+        </xsl:when>
+        <xsl:when test=" $FillRule = 'evenodd'">
+          <xsl:attribute name="winding">evenOdd</xsl:attribute>
+        </xsl:when>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:when test="name(..) = 'g' or name(..) = 'svg'">
+      <xsl:apply-templates mode="fill_rule" select="parent::*"/>
+        </xsl:when>
+    <xsl:otherwise>
+      <xsl:attribute name="winding">nonZero</xsl:attribute>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!--
+  // Generic fill template //
+-->
+<xsl:template mode="template_fill" match="*">
+  <xsl:variable name="fill"><xsl:apply-templates mode="fill" select="." /></xsl:variable>
+  <xsl:variable name="fill_opacity"><xsl:apply-templates mode="fill_opacity" select="." /></xsl:variable>
+    
+  <xsl:choose>
+    <xsl:when test="$fill != '' and $fill != 'none' and not(starts-with($fill, 'url(#'))">
+    <!-- Solid color -->
+      <fill>
+        <SolidColor>
+          <xsl:attribute name="color">
+            <xsl:call-template name="template_color">
+              <xsl:with-param name="colorspec">
+                <xsl:value-of select="$fill" />
+              </xsl:with-param>
+            </xsl:call-template>
+          </xsl:attribute>
+          <xsl:attribute name="alpha">
+            <xsl:value-of select="$fill_opacity" />
+          </xsl:attribute>
+        </SolidColor>
+      </fill>
+    </xsl:when>
+    <!-- Gradients -->
+    <xsl:when test="starts-with($fill, 'url(#')">
+      <xsl:for-each select="//*[@id=substring-before(substring-after($fill, 'url(#'), ')')]">
+        <xsl:if test="name(.) = 'linearGradient'">
+          <fill>
+            <LinearGradient>
+              <xsl:call-template name="linearGradient" >
+                <xsl:with-param name="id">
+                  <xsl:value-of select="substring-before(substring-after($fill, 'url(#'), ')')" />
+                </xsl:with-param>
+              </xsl:call-template>
+            </LinearGradient>
+          </fill>
+        </xsl:if>
+        <xsl:if test="name(.) = 'radialGradient'">
+          <fill>
+            <RadialGradient>
+              <xsl:call-template name="radialGradient" >
+                <xsl:with-param name="id">
+                  <xsl:value-of select="substring-before(substring-after($fill, 'url(#'), ')')" />
+                </xsl:with-param>
+              </xsl:call-template>
+            </RadialGradient>
+          </fill>
+        </xsl:if>
+      </xsl:for-each>
+    </xsl:when>
+    <xsl:when test="$fill = 'none'">
+    </xsl:when>
+    <xsl:otherwise>
+      <fill>
+        <SolidColor color="#ffffff" alpha="1"/>
+      </fill>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!--
+  // Stroke //
+-->
+<xsl:template mode="stroke" match="*">
+  <xsl:choose>
+    <xsl:when test="@stroke">
+      <xsl:value-of select="@stroke" />
+    </xsl:when>
+    <xsl:when test="@style and contains(@style, 'stroke:')">
+      <xsl:variable name="Stroke" select="normalize-space(substring-after(@style, 'stroke:'))" />
+      <xsl:choose>
+        <xsl:when test="contains($Stroke, ';')">
+          <xsl:value-of select="substring-before($Stroke, ';')" />
+        </xsl:when>
+        <xsl:when test="$Stroke">
+          <xsl:value-of select="$Stroke" />
+        </xsl:when>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:when test="name(..) = 'g' or name(..) = 'svg'">
+      <xsl:apply-templates mode="stroke" select="parent::*"/>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+<!--
+  // Stroke opacity //
+-->
+<xsl:template mode="stroke_opacity" match="*">
+  <xsl:variable name="value">
+  <xsl:choose>
+    <xsl:when test="@stroke-opacity"><xsl:value-of select="@stroke-opacity" /></xsl:when>
+    <xsl:when test="@style and contains(@style, 'stroke-opacity:')">
+      <xsl:variable name="Opacity" select="substring-after(@style, 'stroke-opacity:')" />
+      <xsl:choose>
+        <xsl:when test="contains($Opacity, ';')">
+          <xsl:value-of select="substring-before($Opacity, ';')" />
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$Opacity" />
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:when test="name(..) = 'g' or name(..) = 'svg'">
+      <xsl:apply-templates mode="stroke_opacity" select="parent::*" />
+    </xsl:when>
+    <xsl:otherwise>1</xsl:otherwise>
+  </xsl:choose>
+  </xsl:variable>
+  <xsl:choose>
+    <xsl:when test="$value &lt; 0">0</xsl:when>
+    <xsl:when test="$value &gt; 1">1</xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$value" />
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- 
+  // Generic stroke template //
+  
+  Not supported in FXG:
+  * stroke-dasharray
+  * stroke-dashoffset
+  
+ -->
+<xsl:template mode="template_stroke" match="*">
+  <xsl:variable name="stroke"><xsl:apply-templates mode="stroke" select="." /></xsl:variable>
+  <xsl:variable name="stroke_opacity"><xsl:apply-templates mode="stroke_opacity" select="." /></xsl:variable>
+  <xsl:variable name="stroke_width"><xsl:apply-templates mode="stroke_width" select="." /></xsl:variable>
+  <xsl:variable name="stroke_miterlimit"><xsl:apply-templates mode="stroke_miterlimit" select="." /></xsl:variable>
+  <xsl:variable name="stroke_linejoin"><xsl:apply-templates mode="stroke_linejoin" select="." /></xsl:variable>
+  <xsl:variable name="stroke_linecap"><xsl:apply-templates mode="stroke_linecap" select="." /></xsl:variable>
+
+  <!-- Solid color -->
+  <xsl:if  test="$stroke != '' and $stroke != 'none' and not(starts-with($stroke, 'url(#'))">
+    <stroke>
+      <SolidColorStroke>
+        <xsl:attribute name="color">
+          <xsl:call-template name="template_color">
+            <xsl:with-param name="colorspec">
+              <xsl:value-of select="$stroke" />
+            </xsl:with-param>
+          </xsl:call-template>
+        </xsl:attribute>
+        <xsl:attribute name="alpha">
+          <xsl:value-of select="$stroke_opacity" />
+        </xsl:attribute>
+        <xsl:attribute name="weight">
+          <xsl:value-of select="$stroke_width" />
+        </xsl:attribute>
+        <xsl:if test="$stroke_miterlimit != ''">
+          <xsl:attribute name="miterLimit">
+            <xsl:value-of select="$stroke_miterlimit" />
+          </xsl:attribute>
+        </xsl:if>
+        <xsl:attribute name="joints">
+          <xsl:value-of select="$stroke_linejoin" />
+        </xsl:attribute>
+        <xsl:attribute name="caps">
+          <xsl:value-of select="$stroke_linecap" />
+        </xsl:attribute>
+      </SolidColorStroke>  
+    </stroke>
+  </xsl:if>
+    
+  <!-- Gradients -->
+  <xsl:if test="starts-with($stroke, 'url(#')">
+    <xsl:for-each select="//*[@id=substring-before(substring-after($stroke, 'url(#'), ')')]">
+      <xsl:if test="name(.) = 'linearGradient'">
+        <stroke>
+          <LinearGradientStroke>
+            <xsl:attribute name="weight">
+              <xsl:value-of select="$stroke_width" />
+            </xsl:attribute>
+            <xsl:if test="$stroke_miterlimit != ''">
+              <xsl:attribute name="miterLimit">
+                <xsl:value-of select="$stroke_miterlimit" />
+              </xsl:attribute>
+            </xsl:if>
+            <xsl:attribute name="joints">
+              <xsl:value-of select="$stroke_linejoin" />
+            </xsl:attribute>
+            <xsl:attribute name="caps">
+              <xsl:value-of select="$stroke_linecap" />
+            </xsl:attribute>
+            <xsl:call-template name="linearGradient" >
+              <xsl:with-param name="id">
+                <xsl:value-of select="substring-before(substring-after($stroke, 'url(#'), ')')" />
+              </xsl:with-param>
+            </xsl:call-template>
+          </LinearGradientStroke>
+        </stroke>
+      </xsl:if>
+      <xsl:if test="name(.) = 'radialGradient'">
+        <stroke>
+          <RadialGradientStroke>
+            <xsl:attribute name="weight">
+              <xsl:value-of select="$stroke_width" />
+            </xsl:attribute>
+            <xsl:if test="$stroke_miterlimit != ''">
+              <xsl:attribute name="miterLimit">
+                <xsl:value-of select="$stroke_miterlimit" />
+              </xsl:attribute>
+            </xsl:if>
+            <xsl:attribute name="joints">
+              <xsl:value-of select="$stroke_linejoin" />
+            </xsl:attribute>
+            <xsl:attribute name="caps">
+              <xsl:value-of select="$stroke_linecap" />
+            </xsl:attribute>
+            <xsl:call-template name="radialGradient" >
+              <xsl:with-param name="id">
+                <xsl:value-of select="substring-before(substring-after($stroke, 'url(#'), ')')" />
+              </xsl:with-param>
+            </xsl:call-template>
+          </RadialGradientStroke>
+        </stroke>
+      </xsl:if>
+    </xsl:for-each>
+  </xsl:if>
+</xsl:template>
+
+<!--
+  // Stroke width //
+-->
+<xsl:template mode="stroke_width" match="*">
+  <xsl:choose>
+    <xsl:when test="@stroke-width">
+      <xsl:call-template name="convert_unit">
+        <xsl:with-param name="convert_value">
+          <xsl:value-of select="@stroke-width" />
+        </xsl:with-param>
+      </xsl:call-template> 
+    </xsl:when>
+    <xsl:when test="@style and contains(@style, 'stroke-width:')">
+      <xsl:call-template name="convert_unit">
+        <xsl:with-param name="convert_value">
+        <xsl:choose>
+          <xsl:when test="contains(substring-after(@style, 'stroke-width:'), ';')">
+            <xsl:value-of select="substring-before(substring-after(@style, 'stroke-width:'), ';')" />
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="substring-after(@style, 'stroke-width:')" />
+          </xsl:otherwise>
+        </xsl:choose>
+        </xsl:with-param>
+      </xsl:call-template> 
+    </xsl:when>
+    <xsl:when test="name(..) = 'g' or name(..) = 'svg'">
+      <xsl:apply-templates mode="stroke_width" select="parent::*"/>
+    </xsl:when>
+    <xsl:otherwise>1</xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!--
+  // Stroke miterlimit //
+
+  Probably not calculated the same way in SVG and FXG (same value but different result)
+-->
+<xsl:template mode="stroke_miterlimit" match="*">
+  <xsl:choose>
+    <xsl:when test="@stroke-miterlimit">
+      <xsl:value-of select="@stroke-miterlimit" />
+    </xsl:when>
+    <xsl:when test="@style and contains(@style, 'stroke-miterlimit:')">
+      <xsl:variable name="miterLimit" select="substring-after(@style, 'stroke-miterlimit:')" />
+      <xsl:choose>
+        <xsl:when test="contains($miterLimit, ';')">
+          <xsl:value-of select="substring-before($miterLimit, ';')" />
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$miterLimit" />
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:when test="name(..) = 'g' or name(..) = 'svg'">
+      <xsl:apply-templates mode="stroke_miterlimit" select="parent::*"/>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+<!-- 
+  // Stroke dasharray //
+  !! Not supported !!
+-->
+<xsl:template mode="stroke_dasharray" match="*">
+  <xsl:comment>FXG does not support dasharrays</xsl:comment>
+</xsl:template>
+
+<!-- 
+  // Stroke dashoffset //
+  !! Not supported !!
+-->
+<xsl:template mode="stroke_dashoffset" match="*">
+  <xsl:comment>FXG does not support dashoffsets</xsl:comment>
+</xsl:template>
+
+<!-- 
+  // Linejoin SVG to FXG converter //
+-->
+<xsl:template name="linejoin_svg_to_fxg">
+  <xsl:param name="linejoin" />
+  <xsl:choose>
+    <xsl:when test="$linejoin = 'bevel'">bevel</xsl:when>
+    <xsl:when test="$linejoin = 'round'">round</xsl:when>
+    <xsl:otherwise>miter</xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- 
+  // Stroke linejoin //
+-->
+<xsl:template mode="stroke_linejoin" match="*">
+  <xsl:choose>
+    <xsl:when test="@stroke-linejoin">
+      <xsl:call-template name="linejoin_svg_to_fxg">
+        <xsl:with-param name="linejoin">
+          <xsl:value-of select="@stroke-linejoin" />
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="@style and contains(@style, 'stroke-linejoin:')">
+      <xsl:variable name="joints" select="substring-after(@style, 'stroke-linejoin:')" />
+      <xsl:choose>
+        <xsl:when test="contains($joints, ';')">
+          <xsl:call-template name="linejoin_svg_to_fxg">
+            <xsl:with-param name="linejoin">
+              <xsl:value-of select="substring-before($joints, ';')" />
+            </xsl:with-param>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="linejoin_svg_to_fxg">
+            <xsl:with-param name="linejoin">
+              <xsl:value-of select="$joints" />
+            </xsl:with-param>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:when test="name(..) = 'g' or name(..) = 'svg'">
+      <xsl:apply-templates mode="stroke_linejoin" select="parent::*"/>
+    </xsl:when>
+    <xsl:otherwise>miter</xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!--
+  // Linecap SVG to FXG converter //
+  
+  Not supported in FXG:
+  * butt linecap
+-->
+<xsl:template name="linecap_svg_to_fxg">
+  <xsl:param name="linecap" />
+  <xsl:choose>
+    <xsl:when test="$linecap = 'round'">round</xsl:when>
+    <xsl:when test="$linecap = 'square'">square</xsl:when>
+    <xsl:when test="$linecap = 'butt'">round</xsl:when>
+    <xsl:otherwise>none</xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!--
+  // Stroke linecap //
+-->
+<xsl:template mode="stroke_linecap" match="*">
+  <xsl:choose>
+    <xsl:when test="@stroke-linecap">
+      <xsl:call-template name="linecap_svg_to_fxg">
+        <xsl:with-param name="linecap">
+          <xsl:value-of select="@stroke-linecap" />
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="@style and contains(@style, 'stroke-linecap:')">
+      <xsl:variable name="caps" select="substring-after(@style, 'stroke-linecap:')" />
+      <xsl:choose>
+        <xsl:when test="contains($caps, ';')">
+          <xsl:call-template name="linecap_svg_to_fxg">
+            <xsl:with-param name="linecap">
+              <xsl:value-of select="substring-before($caps, ';')" />
+            </xsl:with-param>
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="linecap_svg_to_fxg">
+            <xsl:with-param name="linecap">
+              <xsl:value-of select="$caps" />
+            </xsl:with-param>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <xsl:when test="name(..) = 'g' or name(..) = 'svg'">
+      <xsl:apply-templates mode="stroke_linecap" select="parent::*"/>
+    </xsl:when>
+    <xsl:otherwise>none</xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- 
+  // Gradient stops //
+-->
+<xsl:template mode="stop_color" match="*">
+  <xsl:variable name="Opacity">
+    <xsl:choose>
+      <xsl:when test="@stop-opacity">
+        <xsl:value-of select="@stop-opacity" />
+      </xsl:when>
+      <xsl:when test="@style and contains(@style, 'stop-opacity:')">
+        <xsl:variable name="temp_opacity" select="substring-after(@style, 'stop-opacity:')" />
+        <xsl:choose>
+          <xsl:when test="contains($temp_opacity, ';')">
+            <xsl:value-of select="substring-before($temp_opacity, ';')" />
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$temp_opacity" />
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:otherwise><xsl:value-of select="''" /></xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:variable name="hex_opacity">
+    <xsl:choose>
+      <xsl:when test="$Opacity != ''">
+        <xsl:call-template name="to_hex">
+          <xsl:with-param name="convert">
+            <xsl:value-of select="number($Opacity) * 255" />
+          </xsl:with-param>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$Opacity" />
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:variable name="stopcolor">
+    <xsl:choose>
+      <xsl:when test="@stop-color">
+        <xsl:call-template name="template_color">
+          <xsl:with-param name="colorspec">
+            <xsl:value-of select="@stop-color" />
+          </xsl:with-param>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:when test="@style and contains(@style, 'stop-color:')">
+        <xsl:variable name="Color" select="normalize-space(substring-after(@style, 'stop-color:'))" />
+        <xsl:choose>
+          <xsl:when test="contains($Color, ';')">
+            <xsl:call-template name="template_color">
+              <xsl:with-param name="colorspec">
+                <xsl:value-of select="substring-before($Color, ';')" />
+              </xsl:with-param>
+            </xsl:call-template>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:call-template name="template_color">
+              <xsl:with-param name="colorspec">
+                <xsl:value-of select="$Color" />
+              </xsl:with-param>
+            </xsl:call-template>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:when test="name(..) = 'g' or name(..) = 'svg'">
+        <xsl:apply-templates mode="stop_color" select="parent::*"/>
+      </xsl:when>
+      <xsl:otherwise>#000</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:attribute name="color">
+    <xsl:value-of select="$stopcolor" />
+  </xsl:attribute>
+  <xsl:if test="$Opacity != ''">
+    <xsl:attribute name="alpha">
+      <xsl:value-of select="$Opacity" />
+    </xsl:attribute>
+  </xsl:if>
+</xsl:template>
+
+<!--
+  // Gradient stop opacity //
+-->
+<xsl:template mode="stop_opacity" match="*">
+  <xsl:choose>
+    <xsl:when test="@stop-opacity">
+      <xsl:attribute name="Opacity">
+        <xsl:value-of select="@stop-opacity" />
+      </xsl:attribute>
+    </xsl:when>
+    <xsl:when test="@style and contains(@style, 'stop-opacity:')">
+      <xsl:variable name="Opacity" select="substring-after(@style, 'stop-opacity:')" />
+      <xsl:attribute name="opacity">
+        <xsl:choose>
+          <xsl:when test="contains($Opacity, ';')">
+            <xsl:value-of select="substring-before($Opacity, ';')" />
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$Opacity" />
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+    </xsl:when>
+    <xsl:when test="name(..) = 'g' or name(..) = 'svg'">
+      <xsl:apply-templates mode="stop_opacity" select="parent::*"/>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+<!--
+  // Gradient stop offset //
+-->
+<xsl:template mode="offset" match="*">
+  <xsl:choose>
+    <xsl:when test="@offset">
+      <xsl:attribute name="ratio">
+        <xsl:choose>
+          <xsl:when test="contains(@offset, '%')">
+            <xsl:value-of select="number(substring-before(@offset, '%')) div 100" />
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="@offset" />
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+    </xsl:when>
+    <xsl:when test="@style and contains(@style, 'offset:')">
+      <xsl:variable name="Offset" select="substring-after(@style, 'offset:')" />
+      <xsl:attribute name="ratio">
+        <xsl:choose>
+          <xsl:when test="contains($Offset, '%')">
+            <xsl:value-of select="number(substring-before($Offset, '%')) div 100" />
+          </xsl:when>    
+          <xsl:when test="contains($Offset, ';')">
+            <xsl:value-of select="substring-before($Offset, ';')" />
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$Offset" />
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+    </xsl:when>
+    <xsl:when test="name(..) = 'g' or name(..) = 'svg'">
+      <xsl:apply-templates mode="stop_offset" select="parent::*"/>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+<!-- 
+  // Text specific templates //
+
+  * Text tspan
+  * Text flowPara
+  * Text flowRegion (text frame)
+  * Font size
+  * Baseline shift
+  * Writing mode
+  * Text decoration
+  * Text direction
+  * Text size
+  * Text position
+-->
+
+ <!-- 
+  // Text span //
+  SVG: tspan, flowSpan, FXG: span
+  
+  Not supported in FXG:
+  * span position
+-->
+<xsl:template mode="forward" match="*[name(.) = 'tspan'  or name(.) = 'flowSpan']">
+  <span>
+    <xsl:variable name="fill">
+      <xsl:apply-templates mode="fill" select="." />
+    </xsl:variable>
+    <xsl:variable name="fill_opacity">
+      <xsl:apply-templates mode="fill_opacity" select="." />
+    </xsl:variable>
+    <xsl:if test="starts-with($fill, '#') or (not(starts-with($fill, 'url')) and $fill != '' and $fill != 'none')">
+      <xsl:attribute name="color">
+        <xsl:call-template name="template_color">
+          <xsl:with-param name="colorspec">
+            <xsl:value-of select="$fill" />
+          </xsl:with-param>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:attribute name="textAlpha">
+        <xsl:value-of select="$fill_opacity" />
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:apply-templates mode="font_size" select="." />
+    <xsl:apply-templates mode="baseline_shift" select="." />
+    <xsl:apply-templates mode="text_decoration" select="." />
+    
+    <xsl:if test="text()">
+      <xsl:value-of select="text()" />
+    </xsl:if>
+  </span>
+</xsl:template>
+
+ <!-- 
+  // Text flowPara //
+  SVG: flowPara, flowDiv FXG: p
+  
+  Not supported in FXG:
+  * paragraph position
+-->
+<xsl:template mode="forward" match="*[name(.) = 'flowPara' or name(.) = 'flowDiv']">
+  <p>
+    <xsl:variable name="fill">
+      <xsl:apply-templates mode="fill" select="." />
+    </xsl:variable>
+    <xsl:variable name="fill_opacity">
+      <xsl:apply-templates mode="fill_opacity" select="." />
+    </xsl:variable>
+    <xsl:if test="starts-with($fill, '#') or (not(starts-with($fill, 'url')) and $fill != '' and $fill != 'none')">
+      <xsl:attribute name="color">
+        <xsl:call-template name="template_color">
+          <xsl:with-param name="colorspec">
+            <xsl:value-of select="$fill" />
+          </xsl:with-param>
+        </xsl:call-template>
+      </xsl:attribute>
+      <xsl:attribute name="textAlpha">
+        <xsl:value-of select="$fill_opacity" />
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:apply-templates mode="font_size" select="." />
+    <xsl:apply-templates mode="baseline_shift" select="." />
+    <xsl:apply-templates mode="text_decoration" select="." />
+
+    <xsl:choose>
+      <xsl:when test="*[name(.) = 'flowSpan']/text()">
+        <xsl:apply-templates mode="forward" />
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:choose>
+          <xsl:when test="@xml:space='preserve'">
+            <xsl:copy-of select="translate(text(), '&#x9;&#xA;&#xD;', ' ')" />
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:copy-of select="normalize-space(translate(text(), '&#x9;&#xA;&#xD;', ' '))" />
+          </xsl:otherwise>
+        </xsl:choose>  
+      </xsl:otherwise>
+    </xsl:choose>
+  </p>
+</xsl:template>
+
+
+ <!-- 
+  // Text flowRegion //
+-->
+<xsl:template mode="flow_region" match="*">
+  <xsl:apply-templates mode="text_size" select="." />
+  <xsl:apply-templates mode="text_position" select="." />
+</xsl:template>
+
+<!-- 
+  // Text font size //
+  SVG: font-size, FXG: fontSize
+-->
+<xsl:template mode="font_size" match="*">
+  <xsl:variable name="value">
+    <xsl:if test="@font-size">
+      <xsl:value-of select="@font-size" />
+    </xsl:if>
+    <xsl:if test="@style and contains(@style, 'font-size:')">
+      <xsl:variable name="font_size" select="normalize-space(substring-after(@style, 'font-size:'))" />
+      <xsl:choose>
+        <xsl:when test="contains($font_size, ';')">
+          <xsl:value-of select="substring-before($font_size, ';')" />
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$font_size" />
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:if>
+  </xsl:variable>
+  <xsl:if test="$value != ''">
+    <xsl:attribute name="fontSize">
+      <xsl:call-template name="convert_unit">
+        <xsl:with-param name="convert_value" select="$value" />
+      </xsl:call-template>
+    </xsl:attribute>
+  </xsl:if>
+</xsl:template>
+
+<!-- 
+  // Text baseline shift //
+  SVG: baseline-shift, FXG: baselineShift
+-->
+<xsl:template mode="baseline_shift" match="*">
+  <xsl:variable name="value">
+    <xsl:if test="@baseline-shift">
+      <xsl:value-of select="@baseline-shift" />
+    </xsl:if>
+    <xsl:if test="@style and contains(@style, 'baseline-shift:') and not(contains(substring-after(@style, 'baseline-shift:'), ';'))">
+      <xsl:value-of select="substring-after(@style, 'baseline-shift:')" />
+    </xsl:if>
+    <xsl:if test="@style and contains(@style, 'baseline-shift:') and contains(substring-after(@style, 'baseline-shift:'), ';')">
+      <xsl:value-of select="substring-before(substring-after(@style, 'baseline-shift:'), ';')" />
+    </xsl:if>   
+  </xsl:variable>
+  <xsl:if test="$value != ''">
+    <xsl:attribute name="baselineShift">  
+      <xsl:choose>
+        <xsl:when test="$value='baseline'">0</xsl:when>
+        <xsl:when test="$value='super'">superscript</xsl:when>
+        <xsl:when test="$value='sub'">subscript</xsl:when>
+        <xsl:when test="translate($value, '%', '') &lt; -1000">-1000</xsl:when>
+        <xsl:when test="translate($value, '%', '') &gt; 1000">1000</xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="translate($value, '%', '')" />
+        </xsl:otherwise>
+      </xsl:choose>  
+      <xsl:if test="contains($value, '%')">%</xsl:if>
+    </xsl:attribute>
+  </xsl:if>
+</xsl:template>
+
+<!-- 
+  // Text writing mode //
+  SVG: writing-mode, FXG: blockProgression 
+  
+  Values inverted in FXG...
+-->
+<xsl:template mode="writing_mode" match="*">
+  <xsl:variable name="value">
+    <xsl:if test="@writing-mode">
+      <xsl:value-of select="@writing-mode" />
+    </xsl:if>
+    <xsl:if test="@style and contains(@style, 'writing-mode:') and not(contains(substring-after(@style, 'writing-mode:'), ';'))">
+      <xsl:value-of select="substring-after(@style, 'writing-mode:')" />
+    </xsl:if>
+    <xsl:if test="@style and contains(@style, 'writing-mode:') and contains(substring-after(@style, 'writing-mode:'), ';')">
+      <xsl:value-of select="substring-before(substring-after(@style, 'writing-mode:'), ';')" />
+    </xsl:if>   
+  </xsl:variable>
+  <xsl:if test="$value != ''">
+    <xsl:attribute name="blockProgression">  
+      <xsl:choose>
+        <xsl:when test="$value='tb'">rl</xsl:when>
+        <xsl:otherwise>tb</xsl:otherwise>
+      </xsl:choose>  
+    </xsl:attribute>
+    <xsl:if test="$value='tb'">
+      <xsl:attribute name="textRotation">rotate270</xsl:attribute>
+    </xsl:if>  
+  </xsl:if>
+</xsl:template>
+  
+<!-- 
+  // Text decoration //
+  SVG: text-decoration, FXG: textDecoration, lineThrough 
+-->
+<xsl:template mode="text_decoration" match="*">
+  <xsl:variable name="value">
+    <xsl:if test="@text-decoration">
+      <xsl:value-of select="@text-decoration" />
+    </xsl:if>
+    <xsl:if test="@style and contains(@style, 'text-decoration:') and not(contains(substring-after(@style, 'text-decoration:'), ';'))">
+      <xsl:value-of select="substring-after(@style, 'text-decoration:')" />
+    </xsl:if>
+    <xsl:if test="@style and contains(@style, 'text-decoration:') and contains(substring-after(@style, 'text-decoration:'), ';')">
+      <xsl:value-of select="substring-before(substring-after(@style, 'text-decoration:'), ';')" />
+    </xsl:if>   
+  </xsl:variable>
+  <xsl:if test="$value != ''">  
+    <xsl:choose>
+      <xsl:when test="$value='underline'">
+        <xsl:attribute name="textDecoration">underline</xsl:attribute>
+      </xsl:when>
+      <xsl:when test="$value='line-through'">
+        <xsl:attribute name="lineThrough">true</xsl:attribute>
+      </xsl:when>
+    </xsl:choose>  
+  </xsl:if>
+</xsl:template>
+  
+<!-- 
+  // Text direction //
+  SVG: direction, unicode-bidi, FXG: direction
+-->
+<xsl:template mode="direction" match="*">
+  <xsl:variable name="value">
+    <xsl:if test="@direction">
+      <xsl:value-of select="@direction" />
+    </xsl:if>
+    <xsl:if test="@style and contains(@style, 'direction:') and not(contains(substring-after(@style, 'direction:'), ';'))">
+      <xsl:value-of select="substring-after(@style, 'direction:')" />
+    </xsl:if>
+    <xsl:if test="@style and contains(@style, 'direction:') and contains(substring-after(@style, 'direction:'), ';')">
+      <xsl:value-of select="substring-before(substring-after(@style, 'direction:'), ';')" />
+    </xsl:if>   
+  </xsl:variable>
+  <xsl:variable name="bidi">
+    <xsl:if test="@unicode-bidi">
+      <xsl:value-of select="@unicode-bidi" />
+    </xsl:if>
+    <xsl:if test="@style and contains(@style, 'unicode-bidi:') and not(contains(substring-after(@style, 'unicode-bidi:'), ';'))">
+      <xsl:value-of select="substring-after(@style, 'unicode-bidi:')" />
+    </xsl:if>
+    <xsl:if test="@style and contains(@style, 'unicode-bidi:') and contains(substring-after(@style, 'unicode-bidi:'), ';')">
+      <xsl:value-of select="substring-before(substring-after(@style, 'unicode-bidi:'), ';')" />
+    </xsl:if>   
+  </xsl:variable>
+
+  <xsl:if test="$value != '' and ($bidi='embed' or $bidi='bidi-override')">  
+    <xsl:attribute name="direction">
+      <xsl:choose>
+        <xsl:when test="$value='ltr'">ltr</xsl:when>
+        <xsl:when test="$value='rtl'">rtl</xsl:when>
+      </xsl:choose>  
+    </xsl:attribute>
+  </xsl:if>
+</xsl:template>
+
+ <!-- 
+  // Text size //
+-->
+<xsl:template mode="text_size" match="*">
+  <xsl:if test="@width">
+    <xsl:attribute name="width">
+      <xsl:call-template name="convert_unit">
+        <xsl:with-param name="convert_value" select="@width" />
+      </xsl:call-template>
+    </xsl:attribute>
+  </xsl:if>
+  <xsl:if test="@height">
+    <xsl:attribute name="height">
+      <xsl:call-template name="convert_unit">
+        <xsl:with-param name="convert_value" select="@height" />
+      </xsl:call-template>
+    </xsl:attribute>
+  </xsl:if>
+</xsl:template>
+
+ <!-- 
+  // Text position //
+-->
+<xsl:template mode="text_position" match="*">
+  <!-- Keep the first x value only -->
+  <xsl:if test="@x">
+    <xsl:attribute name="x">
+      <xsl:choose>
+        <xsl:when test="contains(@x, ' ')">
+          <xsl:call-template name="convert_unit">
+            <xsl:with-param name="convert_value" select="substring-before(@x, ' ')" />
+          </xsl:call-template>   
+          </xsl:when>
+          <xsl:otherwise>
+          <xsl:call-template name="convert_unit">
+            <xsl:with-param name="convert_value" select="@x" />
+          </xsl:call-template>  
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:attribute>
+  </xsl:if>
+  <!-- Keep the first y value only -->
+  <xsl:if test="@y">
+    <xsl:attribute name="y">
+      <xsl:choose>
+        <xsl:when test="contains(@y, ' ')">
+          <xsl:call-template name="convert_unit">
+            <xsl:with-param name="convert_value" select="substring-before(@y, ' ')" />
+          </xsl:call-template>   
+          </xsl:when>
+          <xsl:otherwise>
+          <xsl:call-template name="convert_unit">
+            <xsl:with-param name="convert_value" select="@y" />
+          </xsl:call-template>  
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:attribute>
+  </xsl:if>
+</xsl:template>
+
+<!-- 
+  // Objects //
+  
+  * Text
+  * Lines
+  * Rectangle
+  * Path
+  * Ellipse
+  * Circle
+  * Image
+  * Polygon (not supported)
+  * Polyline (not supported)
+-->
+
+<!-- 
+  // Text objects //
+  SVG: text, FXG: RichText
+
+  Not supported by FXG:
+  * Generic fonts.
+  * Embedded fonts (in defs).
+  * Character rotation.
+  * Character positionning (x and y).
+  * Text-anchor.
+  * Text stroke.
+  
+  Partial support:
+  * Text rotation (0, 90, 180 and 270 degrees only) -> not implemented.
+  * Font weight (normal and bold only) -> values under 500 are considered normal, the others bold.
+  * Whitespace handling, issues with xml:whitespace='preserve'.
+-->
+<xsl:template mode="forward" match="*[name(.) = 'text']">
+  <xsl:variable name="object">
+    <RichText>
+      <xsl:apply-templates mode="font_size" select="." />
+      
+      <xsl:variable name="font_weight">
+        <xsl:if test="@font-weight">
+          <xsl:value-of select="@font-weight" />
+        </xsl:if>
+        <xsl:if test="@style and contains(@style, 'font-weight:') and not(contains(substring-after(@style, 'font-weight:'), ';'))">
+          <xsl:value-of select="substring-after(@style, 'font-weight:')" />
+        </xsl:if>
+        <xsl:if test="@style and contains(@style, 'font-weight:') and contains(substring-after(@style, 'font-weight:'), ';')">
+          <xsl:value-of select="substring-before(substring-after(@style, 'font-weight:'), ';')" />
+        </xsl:if>   
+      </xsl:variable>
+      <xsl:attribute name="fontWeight">
+        <xsl:choose>
+          <xsl:when test="$font_weight='normal' or $font_weight='bold'">
+            <xsl:value-of select="$font_weight" />
+          </xsl:when>
+          <xsl:when test="$font_weight &lt; 500 or $font_weight = 'lighter'">normal</xsl:when>
+          <xsl:when test="$font_weight &gt; 499 or $font_weight = 'bolder'">bold</xsl:when>
+          <xsl:otherwise>normal</xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+
+      <xsl:if test="@font-family">
+        <xsl:attribute name="fontFamily">
+          <xsl:value-of select="translate(@font-family, &quot;'&quot;, '')" />
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@style and contains(@style, 'font-family:')">
+        <xsl:variable name="font_family" select="substring-after(@style, 'font-family:')" />
+        <xsl:attribute name="fontFamily">
+          <xsl:choose>
+            <xsl:when test="contains($font_family, ';')">
+              <xsl:value-of select="translate(substring-before($font_family, ';'), &quot;'&quot;, '')" />
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:value-of select="translate($font_family, &quot;'&quot;, '')" />
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@font-style">
+        <xsl:attribute name="fontStyle">
+          <xsl:value-of select="@font-style" />
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@style and contains(@style, 'font-style:')">
+        <xsl:variable name="font_style" select="substring-after(@style, 'font-style:')" />
+        <xsl:attribute name="fontStyle">
+          <xsl:choose>
+            <xsl:when test="contains($font_style, ';')">
+              <xsl:value-of select="substring-before($font_style, ';')" />
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:value-of select="$font_style" />
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:attribute>
+      </xsl:if>
+      
+      <xsl:variable name="fill">
+        <xsl:apply-templates mode="fill" select="." />
+      </xsl:variable>
+      <xsl:variable name="fill_opacity">
+        <xsl:apply-templates mode="fill_opacity" select="." />
+      </xsl:variable>
+
+      <xsl:if test="starts-with($fill, '#') or (not(starts-with($fill, 'url')) and $fill != '' and $fill != 'none')">
+        <xsl:attribute name="color">
+          <xsl:call-template name="template_color">
+            <xsl:with-param name="colorspec">
+              <xsl:value-of select="$fill" />
+            </xsl:with-param>
+          </xsl:call-template>
+        </xsl:attribute>
+        <xsl:attribute name="textAlpha">
+          <xsl:value-of select="$fill_opacity" />
+        </xsl:attribute>
+      </xsl:if>
+
+      <!-- Force default baseline to "ascent" -->
+      <xsl:attribute name="alignmentBaseline">ascent</xsl:attribute>
+      
+      <xsl:if test="@xml:space='preserve'">
+        <xsl:attribute name="whiteSpaceCollapse">preserve</xsl:attribute>
+      </xsl:if>
+
+      <xsl:apply-templates mode="text_size" select="." />
+      <xsl:apply-templates mode="text_position" select="." />
+      <xsl:apply-templates mode="text_decoration" select="." />
+      <xsl:apply-templates mode="direction" select="." />
+      <xsl:apply-templates mode="writing_mode" select="." />
+      <xsl:apply-templates mode="id" select="." />
+
+      <xsl:apply-templates mode="filter_effect" select="." />
+      <xsl:apply-templates mode="desc" select="." />
+
+
+      <!--xsl:apply-templates mode="forward" /-->
+      <content>
+        <xsl:choose>
+          <xsl:when test="*[name(.) = 'tspan']/text()">
+            <xsl:apply-templates mode="forward" />
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:choose>
+              <xsl:when test="@xml:space='preserve'">
+                <xsl:copy-of select="translate(text(), '&#x9;&#xA;&#xD;', ' ')" />
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:copy-of select="normalize-space(translate(text(), '&#x9;&#xA;&#xD;', ' '))" />
+              </xsl:otherwise>
+            </xsl:choose>  
+          </xsl:otherwise>
+        </xsl:choose>
+      </content>
+    </RichText>
+  </xsl:variable>
+
+  <xsl:variable name="clipped_object">
+    <xsl:apply-templates mode="clip" select="." >
+      <xsl:with-param name="object" select="$object" />
+      <xsl:with-param name="clip_type" select="'clip'" />
+    </xsl:apply-templates>
+  </xsl:variable>
+
+  <xsl:variable name="masked_object">
+    <xsl:apply-templates mode="clip" select="." >
+      <xsl:with-param name="object" select="$clipped_object" />
+      <xsl:with-param name="clip_type" select="'mask'" />
+    </xsl:apply-templates>
+  </xsl:variable>
+  
+  <xsl:choose>
+    <xsl:when test="@transform">
+    <Group>
+      <xsl:call-template name="object_transform">
+        <xsl:with-param name="object" select="$masked_object" />
+        <xsl:with-param name="transform" select="@transform" />
+      </xsl:call-template>
+    </Group>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$masked_object" />
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+ <!-- 
+  // FlowRoot objects //
+  SVG: flowRoot, FXG: RichText
+
+  Not supported by FXG:
+  * See text objects
+-->
+<xsl:template mode="forward" match="*[name(.) = 'flowRoot']">
+  <xsl:variable name="object">
+    <RichText>
+      <xsl:apply-templates mode="font_size" select="." />
+      
+      <xsl:variable name="font_weight">
+        <xsl:if test="@font-weight">
+          <xsl:value-of select="@font-weight" />
+        </xsl:if>
+        <xsl:if test="@style and contains(@style, 'font-weight:') and not(contains(substring-after(@style, 'font-weight:'), ';'))">
+          <xsl:value-of select="substring-after(@style, 'font-weight:')" />
+        </xsl:if>
+        <xsl:if test="@style and contains(@style, 'font-weight:') and contains(substring-after(@style, 'font-weight:'), ';')">
+          <xsl:value-of select="substring-before(substring-after(@style, 'font-weight:'), ';')" />
+        </xsl:if>   
+      </xsl:variable>
+      <xsl:attribute name="fontWeight">
+        <xsl:choose>
+          <xsl:when test="$font_weight='normal' or $font_weight='bold'">
+            <xsl:value-of select="$font_weight" />
+          </xsl:when>
+          <xsl:when test="$font_weight &lt; 500 or $font_weight = 'lighter'">normal</xsl:when>
+          <xsl:when test="$font_weight &gt; 499 or $font_weight = 'bolder'">bold</xsl:when>
+          <xsl:otherwise>normal</xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+
+      <xsl:if test="@font-family">
+        <xsl:attribute name="fontFamily">
+          <xsl:value-of select="translate(@font-family, &quot;'&quot;, '')" />
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@style and contains(@style, 'font-family:')">
+        <xsl:variable name="font_family" select="substring-after(@style, 'font-family:')" />
+        <xsl:attribute name="fontFamily">
+          <xsl:choose>
+            <xsl:when test="contains($font_family, ';')">
+              <xsl:value-of select="translate(substring-before($font_family, ';'), &quot;'&quot;, '')" />
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:value-of select="translate($font_family, &quot;'&quot;, '')" />
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@font-style">
+        <xsl:attribute name="fontStyle">
+          <xsl:value-of select="@font-style" />
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@style and contains(@style, 'font-style:')">
+        <xsl:variable name="font_style" select="substring-after(@style, 'font-style:')" />
+        <xsl:attribute name="fontStyle">
+          <xsl:choose>
+            <xsl:when test="contains($font_style, ';')">
+              <xsl:value-of select="substring-before($font_style, ';')" />
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:value-of select="$font_style" />
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:attribute>
+      </xsl:if>
+      
+      <xsl:variable name="fill">
+        <xsl:apply-templates mode="fill" select="." />
+      </xsl:variable>
+      <xsl:variable name="fill_opacity">
+        <xsl:apply-templates mode="fill_opacity" select="." />
+      </xsl:variable>
+
+      <xsl:if test="starts-with($fill, '#') or (not(starts-with($fill, 'url')) and $fill != '' and $fill != 'none')">
+        <xsl:attribute name="color">
+          <xsl:call-template name="template_color">
+            <xsl:with-param name="colorspec">
+              <xsl:value-of select="$fill" />
+            </xsl:with-param>
+          </xsl:call-template>
+        </xsl:attribute>
+        <xsl:attribute name="textAlpha">
+          <xsl:value-of select="$fill_opacity" />
+        </xsl:attribute>
+      </xsl:if>
+
+      <!-- Force default baseline to "ascent" -->
+      <xsl:attribute name="alignmentBaseline">ascent</xsl:attribute>
+      
+      <xsl:if test="@xml:space='preserve'">
+        <xsl:attribute name="whiteSpaceCollapse">preserve</xsl:attribute>
+      </xsl:if>
+
+      <xsl:apply-templates mode="text_decoration" select="." />
+      <xsl:apply-templates mode="direction" select="." />
+      <xsl:apply-templates mode="writing_mode" select="." />
+      <xsl:apply-templates mode="id" select="." />
+      <xsl:apply-templates mode="flow_region" select="*[name(.) = 'flowRegion']/child::node()" />
+      <xsl:apply-templates mode="filter_effect" select="." />
+      <xsl:apply-templates mode="desc" select="." />
+
+      <content>
+        <xsl:choose>
+          <xsl:when test="*[name(.) = 'flowPara' or name(.) = 'flowDiv']/text()">
+            <xsl:apply-templates mode="forward" />
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:choose>
+              <xsl:when test="@xml:space='preserve'">
+                <xsl:copy-of select="translate(text(), '&#x9;&#xA;&#xD;', ' ')" />
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:copy-of select="normalize-space(translate(text(), '&#x9;&#xA;&#xD;', ' '))" />
+              </xsl:otherwise>
+            </xsl:choose>  
+          </xsl:otherwise>
+        </xsl:choose>
+      </content>
+    </RichText>
+  </xsl:variable>
+
+  <xsl:variable name="clipped_object">
+    <xsl:apply-templates mode="clip" select="." >
+      <xsl:with-param name="object" select="$object" />
+      <xsl:with-param name="clip_type" select="'clip'" />
+    </xsl:apply-templates>
+  </xsl:variable>
+
+  <xsl:variable name="masked_object">
+    <xsl:apply-templates mode="clip" select="." >
+      <xsl:with-param name="object" select="$clipped_object" />
+      <xsl:with-param name="clip_type" select="'mask'" />
+    </xsl:apply-templates>
+  </xsl:variable>
+  
+  <xsl:choose>
+    <xsl:when test="@transform">
+    <Group>
+      <xsl:call-template name="object_transform">
+        <xsl:with-param name="object" select="$masked_object" />
+        <xsl:with-param name="transform" select="@transform" />
+      </xsl:call-template>
+    </Group>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$masked_object" />
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- 
+  // Line object //
+  SVG: line, FXG: Line
+-->
+<xsl:template mode="forward" match="*[name(.) = 'line']">
+  <xsl:variable name="object">
+    <Line>
+      <xsl:if test="@x1">
+        <xsl:attribute name="xFrom">
+          <xsl:call-template name="convert_unit">
+            <xsl:with-param name="convert_value" select="@x1" />
+          </xsl:call-template>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@y1">
+        <xsl:attribute name="yFrom">
+          <xsl:call-template name="convert_unit">
+            <xsl:with-param name="convert_value" select="@y1" />
+          </xsl:call-template>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@x2">
+        <xsl:attribute name="xTo">
+          <xsl:call-template name="convert_unit">
+            <xsl:with-param name="convert_value" select="@x2" />
+          </xsl:call-template>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@y2">
+        <xsl:attribute name="yTo">
+          <xsl:call-template name="convert_unit">
+            <xsl:with-param name="convert_value" select="@y2" />
+          </xsl:call-template>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:apply-templates mode="object_opacity" select="." />
+      <xsl:apply-templates mode="id" select="." />
+
+      <xsl:apply-templates mode="template_fill" select="." />
+      <xsl:apply-templates mode="template_stroke" select="." />
+      <xsl:apply-templates mode="filter_effect" select="." />
+      <xsl:apply-templates mode="desc" select="." />   
+
+      <xsl:apply-templates mode="forward" />
+    </Line>
+  </xsl:variable>
+
+  <xsl:variable name="clipped_object">
+    <xsl:apply-templates mode="clip" select="." >
+      <xsl:with-param name="object" select="$object" />
+      <xsl:with-param name="clip_type" select="'clip'" />
+    </xsl:apply-templates>
+  </xsl:variable>
+
+  <xsl:variable name="masked_object">
+    <xsl:apply-templates mode="clip" select="." >
+      <xsl:with-param name="object" select="$clipped_object" />
+      <xsl:with-param name="clip_type" select="'mask'" />
+    </xsl:apply-templates>
+  </xsl:variable>
+  
+  <xsl:choose>
+    <xsl:when test="@transform">
+    <Group>
+      <xsl:call-template name="object_transform">
+        <xsl:with-param name="object" select="$masked_object" />
+        <xsl:with-param name="transform" select="@transform" />
+      </xsl:call-template>
+    </Group>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$masked_object" />
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- 
+  // Rectangle object //
+  SVG: rect, FXG: Rect
+-->
+<xsl:template mode="forward" match="*[name(.) = 'rect']">
+  <xsl:variable name="object">
+    <Rect>
+      <xsl:if test="@x">
+        <xsl:attribute name="x">
+          <xsl:call-template name="convert_unit">
+            <xsl:with-param name="convert_value" select="@x" />
+          </xsl:call-template>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@y">
+        <xsl:attribute name="y">
+          <xsl:call-template name="convert_unit">
+            <xsl:with-param name="convert_value" select="@y" />
+          </xsl:call-template>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@width">
+        <xsl:attribute name="width">
+          <xsl:call-template name="convert_unit">
+            <xsl:with-param name="convert_value" select="@width" />
+          </xsl:call-template>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@height">
+        <xsl:attribute name="height">
+          <xsl:call-template name="convert_unit">
+            <xsl:with-param name="convert_value" select="@height" />
+          </xsl:call-template>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@rx">
+        <xsl:attribute name="radiusX">
+          <xsl:value-of select="@rx" />
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@ry">
+        <xsl:attribute name="radiusY">
+          <xsl:value-of select="@ry" />
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@rx and not(@ry)">
+        <xsl:attribute name="radiusX">
+          <xsl:value-of select="@rx" />
+        </xsl:attribute>
+        <xsl:attribute name="radiusY">
+          <xsl:value-of select="@rx" />
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@ry and not(@rx)">
+        <xsl:attribute name="radiusX">
+          <xsl:value-of select="@ry" />
+        </xsl:attribute>
+        <xsl:attribute name="radiusY">
+          <xsl:value-of select="@ry" />
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:apply-templates mode="object_opacity" select="." />
+      <xsl:apply-templates mode="id" select="." />
+
+      <xsl:apply-templates mode="template_fill" select="." />
+      <xsl:apply-templates mode="template_stroke" select="." />
+      <xsl:apply-templates mode="filter_effect" select="." />
+      <!--  <xsl:apply-templates mode="resources" select="." /> -->
+      <xsl:apply-templates mode="desc" select="." />
+
+      <xsl:apply-templates mode="forward" />
+    </Rect>
+  </xsl:variable>
+
+  <xsl:variable name="clipped_object">
+    <xsl:apply-templates mode="clip" select="." >
+      <xsl:with-param name="object" select="$object" />
+      <xsl:with-param name="clip_type" select="'clip'" />
+    </xsl:apply-templates>
+  </xsl:variable>
+
+  <xsl:variable name="masked_object">
+    <xsl:apply-templates mode="clip" select="." >
+      <xsl:with-param name="object" select="$clipped_object" />
+      <xsl:with-param name="clip_type" select="'mask'" />
+    </xsl:apply-templates>
+  </xsl:variable>
+  
+  <xsl:choose>
+    <xsl:when test="@transform">
+    <Group>
+      <xsl:call-template name="object_transform">
+        <xsl:with-param name="object" select="$masked_object" />
+        <xsl:with-param name="transform" select="@transform" />
+      </xsl:call-template>
+    </Group>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$masked_object" />
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- 
+  // Path //
+  SVG: path, FXG: Path
+  
+  Not supported by FXG:
+  * elliptical arc curve commands (workaround: convert to path first)
+  TODO:
+  * Implement an arc to curve convertor
+-->
+<xsl:template mode="forward" match="*[name(.) = 'path']">
+  <xsl:variable name="object">
+    <Path>
+      <!-- Path element -->
+      <!-- Exclude arcs in order to prevent the mxml compiler from failing -->
+      <xsl:if test="@d and not(contains(@d, 'a') or contains(@d, 'A'))">
+        <xsl:attribute name="data">
+          <xsl:value-of select="normalize-space(translate(@d , ',', ' '))" />
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:apply-templates mode="fill_rule" select="." />
+      <xsl:apply-templates mode="object_opacity" select="." />
+      <xsl:apply-templates mode="id" select="." />
+
+      <!-- Child elements -->
+      <xsl:apply-templates mode="template_fill" select="." />
+      <xsl:apply-templates mode="template_stroke" select="." />
+      <xsl:apply-templates mode="filter_effect" select="." />
+      <xsl:apply-templates mode="desc" select="." />
+
+      <xsl:apply-templates mode="forward" />
+    </Path>
+  </xsl:variable>
+  
+  <xsl:variable name="clipped_object">
+    <xsl:apply-templates mode="clip" select="." >
+      <xsl:with-param name="object" select="$object" />
+      <xsl:with-param name="clip_type" select="'clip'" />
+    </xsl:apply-templates>
+  </xsl:variable>
+
+  <xsl:variable name="masked_object">
+    <xsl:apply-templates mode="clip" select="." >
+      <xsl:with-param name="object" select="$clipped_object" />
+      <xsl:with-param name="clip_type" select="'mask'" />
+    </xsl:apply-templates>
+  </xsl:variable>
+  
+  <xsl:choose>
+    <xsl:when test="@transform">
+    <Group>
+      <xsl:call-template name="object_transform">
+        <xsl:with-param name="object" select="$masked_object" />
+        <xsl:with-param name="transform" select="@transform" />
+      </xsl:call-template>
+    </Group>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$masked_object" />
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:if test="contains(@d, 'a') or contains(@d, 'A')">
+    <xsl:comment><xsl:value-of select="'Elliptic arc command in path data not supported, please convert to path (arcs are thus converted to curves) before exporting.'" /></xsl:comment>
+  </xsl:if> 
+</xsl:template>
+
+<!-- 
+  // Ellipse object //
+  SVG: ellipse, FXG: Ellipse
+-->
+<xsl:template mode="forward" match="*[name(.) = 'ellipse']">
+  <xsl:variable name="object">
+    <Ellipse>
+      <xsl:variable name="cx">
+        <xsl:choose>
+          <xsl:when test="@cx">
+            <xsl:call-template name="convert_unit">
+              <xsl:with-param name="convert_value" select="@cx" />
+            </xsl:call-template>
+          </xsl:when>
+          <xsl:otherwise>0</xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+      <xsl:variable name="cy">
+        <xsl:choose>
+          <xsl:when test="@cy">
+            <xsl:call-template name="convert_unit">
+              <xsl:with-param name="convert_value" select="@cy" />
+            </xsl:call-template>
+          </xsl:when>
+          <xsl:otherwise>0</xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+      <xsl:variable name="rx">
+        <xsl:choose>
+          <xsl:when test="@rx">
+            <xsl:call-template name="convert_unit">
+              <xsl:with-param name="convert_value" select="@rx" />
+            </xsl:call-template>
+          </xsl:when>
+          <xsl:otherwise>0</xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+      <xsl:variable name="ry">
+        <xsl:choose>
+          <xsl:when test="@ry">
+            <xsl:call-template name="convert_unit">
+              <xsl:with-param name="convert_value" select="@ry" />
+            </xsl:call-template>
+          </xsl:when>
+          <xsl:otherwise>0</xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+
+      <xsl:choose>
+        <xsl:when test="$rx != 0">
+          <xsl:attribute name="x">
+            <xsl:value-of select='format-number($cx - $rx, "#.#")' />
+          </xsl:attribute>
+          <xsl:attribute name="width">
+            <xsl:value-of select='format-number(2 * $rx, "#.#")' />
+          </xsl:attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:attribute name="x">
+            <xsl:value-of select='format-number($cx, "#.#")' />
+          </xsl:attribute>
+          <xsl:attribute name="width">0</xsl:attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+      <xsl:choose>
+        <xsl:when test="$ry != 0">
+          <xsl:attribute name="y">
+            <xsl:value-of select='format-number($cy - $ry, "#.#")' />
+          </xsl:attribute>
+          <xsl:attribute name="height">
+            <xsl:value-of select='format-number(2 * $ry, "#.#")' />
+          </xsl:attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:attribute name="y">
+            <xsl:value-of select='format-number($cy, "#.#")' />
+          </xsl:attribute>
+          <xsl:attribute name="height">0</xsl:attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates mode="object_opacity" select="." />
+      <xsl:apply-templates mode="id" select="." />
+
+      <!-- Child elements -->
+      <xsl:apply-templates mode="template_fill" select="." />
+      <xsl:apply-templates mode="template_stroke" select="." />
+      <xsl:apply-templates mode="filter_effect" select="." />
+      <xsl:apply-templates mode="desc" select="." />
+
+      <xsl:apply-templates mode="forward" />
+    </Ellipse>
+  </xsl:variable>
+
+  <xsl:variable name="clipped_object">
+    <xsl:apply-templates mode="clip" select="." >
+      <xsl:with-param name="object" select="$object" />
+      <xsl:with-param name="clip_type" select="'clip'" />
+    </xsl:apply-templates>
+  </xsl:variable>
+
+  <xsl:variable name="masked_object">
+    <xsl:apply-templates mode="clip" select="." >
+      <xsl:with-param name="object" select="$clipped_object" />
+      <xsl:with-param name="clip_type" select="'mask'" />
+    </xsl:apply-templates>
+  </xsl:variable>
+  
+  <xsl:choose>
+    <xsl:when test="@transform">
+    <Group>
+      <xsl:call-template name="object_transform">
+        <xsl:with-param name="object" select="$masked_object" />
+        <xsl:with-param name="transform" select="@transform" />
+      </xsl:call-template>
+    </Group>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$masked_object" />
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- 
+  // Circle object //
+  SVG: circle, FXG: Ellipse
+-->
+<xsl:template mode="forward" match="*[name(.) = 'circle']">
+  <xsl:variable name="object">
+    <Ellipse>
+      <xsl:variable name="cx">
+        <xsl:choose>
+          <xsl:when test="@cx">
+            <xsl:call-template name="convert_unit">
+              <xsl:with-param name="convert_value" select="@cx" />
+            </xsl:call-template>
+          </xsl:when>
+          <xsl:otherwise>0</xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+      <xsl:variable name="cy">
+        <xsl:choose>
+          <xsl:when test="@cy">
+            <xsl:call-template name="convert_unit">
+              <xsl:with-param name="convert_value" select="@cy" />
+            </xsl:call-template>
+          </xsl:when>
+          <xsl:otherwise>0</xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+      <xsl:variable name="r">
+        <xsl:choose>
+          <xsl:when test="@r">
+            <xsl:call-template name="convert_unit">
+              <xsl:with-param name="convert_value" select="@r" />
+            </xsl:call-template>
+          </xsl:when>
+          <xsl:otherwise>0</xsl:otherwise>
+        </xsl:choose>
+      </xsl:variable>
+      
+      <xsl:choose>
+        <xsl:when test="$r != 0">
+          <xsl:attribute name="x">
+            <xsl:value-of select='format-number($cx - $r, "#.#")' />
+          </xsl:attribute>
+          <xsl:attribute name="y">
+            <xsl:value-of select='format-number($cy - $r, "#.#")' />
+          </xsl:attribute>
+          <xsl:attribute name="width">
+            <xsl:value-of select='format-number(2 * $r, "#.#")' />
+          </xsl:attribute>
+          <xsl:attribute name="height">
+            <xsl:value-of select='format-number(2 * $r, "#.#")' />
+          </xsl:attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:attribute name="x">
+            <xsl:value-of select='format-number($cx, "#.#")' />
+          </xsl:attribute>
+          <xsl:attribute name="y">
+            <xsl:value-of select='format-number($cy, "#.#")' />
+          </xsl:attribute>
+          <xsl:attribute name="width">0</xsl:attribute>
+          <xsl:attribute name="height">0</xsl:attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+      <xsl:apply-templates mode="object_opacity" select="." />
+      <xsl:apply-templates mode="id" select="." />
+
+      <!-- Child elements -->
+      <xsl:apply-templates mode="template_fill" select="." />
+      <xsl:apply-templates mode="template_stroke" select="." />
+      <xsl:apply-templates mode="filter_effect" select="." />
+      <xsl:apply-templates mode="desc" select="." />
+
+      <xsl:apply-templates mode="forward" />
+    </Ellipse>
+  </xsl:variable>
+
+  <xsl:variable name="clipped_object">
+    <xsl:apply-templates mode="clip" select="." >
+      <xsl:with-param name="object" select="$object" />
+      <xsl:with-param name="clip_type" select="'clip'" />
+    </xsl:apply-templates>
+  </xsl:variable>
+
+  <xsl:variable name="masked_object">
+    <xsl:apply-templates mode="clip" select="." >
+      <xsl:with-param name="object" select="$clipped_object" />
+      <xsl:with-param name="clip_type" select="'mask'" />
+    </xsl:apply-templates>
+  </xsl:variable>
+  
+  <xsl:choose>
+    <xsl:when test="@transform">
+    <Group>
+      <xsl:call-template name="object_transform">
+        <xsl:with-param name="object" select="$masked_object" />
+        <xsl:with-param name="transform" select="@transform" />
+      </xsl:call-template>
+    </Group>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$masked_object" />
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- 
+  // Image objects //
+  SVG: image, FXG: Rect+BitmapFill
+  
+  Not supported by FXG:
+  * Embedded images (base64).
+  * Preserve ratio.
+-->
+<xsl:template mode="forward" match="*[name(.) = 'image']">
+  <xsl:variable name="object">
+    <Rect>
+      <xsl:if test="@x">
+        <xsl:attribute name="x">
+          <xsl:call-template name="convert_unit">
+            <xsl:with-param name="convert_value" select="@x" />
+          </xsl:call-template>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@y">
+        <xsl:attribute name="y">
+          <xsl:call-template name="convert_unit">
+            <xsl:with-param name="convert_value" select="@y" />
+          </xsl:call-template>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@width">
+        <xsl:attribute name="width">
+          <xsl:call-template name="convert_unit">
+            <xsl:with-param name="convert_value" select="@width" />
+          </xsl:call-template>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="@height">
+        <xsl:attribute name="height">
+          <xsl:call-template name="convert_unit">
+            <xsl:with-param name="convert_value" select="@height" />
+          </xsl:call-template>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:apply-templates mode="object_opacity" select="." />
+      <xsl:apply-templates mode="id" select="." />
+      
+      <xsl:apply-templates mode="desc" select="." />
+      
+      <xsl:if test="@xlink:href">
+        <fill>
+          <BitmapFill>
+            <xsl:attribute name="source">@Embed('<xsl:value-of select="@xlink:href"/>')</xsl:attribute>
+          </BitmapFill>
+        </fill> 
+      </xsl:if>
+      
+      <xsl:apply-templates mode="forward" />
+    </Rect>
+  </xsl:variable>
+
+  <xsl:variable name="clipped_object">
+    <xsl:apply-templates mode="clip" select="." >
+      <xsl:with-param name="object" select="$object" />
+      <xsl:with-param name="clip_type" select="'clip'" />
+    </xsl:apply-templates>
+  </xsl:variable>
+
+  <xsl:variable name="masked_object">
+    <xsl:apply-templates mode="clip" select="." >
+      <xsl:with-param name="object" select="$clipped_object" />
+      <xsl:with-param name="clip_type" select="'mask'" />
+    </xsl:apply-templates>
+  </xsl:variable>
+  
+  <xsl:choose>
+    <xsl:when test="@transform">
+    <Group>
+      <xsl:call-template name="object_transform">
+        <xsl:with-param name="object" select="$masked_object" />
+        <xsl:with-param name="transform" select="@transform" />
+      </xsl:call-template>
+    </Group>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$masked_object" />
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- 
+  // Polygon object //
+  !! Not supported !!
+-->
+<xsl:template mode="forward" match="*[name(.) = 'polygon']">
+  <xsl:comment>FXG does not support polygons</xsl:comment>
+</xsl:template>
+
+<!-- 
+  // Polyline object //
+  !! Not supported !!
+-->
+<xsl:template mode="forward" match="*[name(.) = 'polyline']">
+  <xsl:comment>FXG does not support polylines</xsl:comment>
+</xsl:template>
+
+</xsl:stylesheet>