XAML Export: invalid decimal format in StrokeThickness

Bug #1789410 reported by Thomas W.
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Undecided
Unassigned

Bug Description

This looks very similar to bug 380199, but still affects me in version 0.92, although it was reported fixed in 0.47 already.

I have an SVG file that I want to export to XAML. Because the XAML export does not consider stroke markers (bug 1789406), I converted the stroke to a path.

Now, the arrow head path is exported to XAML with invalid decimal formatting. At least on my German system, it uses a comma instead of a decimal dot for the StrokeThickness:

<Path ... StrokeThickness="0,56443724555732" ... >

I'm using Visual Studio 2015 Update 3 on Windows 10. I'm developing a WPF app targeting .NET 4.5.2.
My default namespace is xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation", which matches the exported namespace.
I was using Inkscape 0.92.0 r15299.

Tags: saving
Revision history for this message
Thomas W. (thomasw-mitutoyo-ctl) wrote :
Revision history for this message
Thomas W. (thomasw-mitutoyo-ctl) wrote :
Revision history for this message
Thomas W. (thomasw-mitutoyo-ctl) wrote :
tags: added: saving
summary: - XAML Export: invalid decimal format
+ XAML Export: invalid decimal format in StrokeThickness
Revision history for this message
Thomas W. (thomasw-mitutoyo-ctl) wrote :

I looked at the svg2xaml.xsl file which is located in my installation directory. I could not find a <xsl:decimal-format> element, which seems to be needed for format-number() function to work correctly.

MSDN decimal-format: https://msdn.microsoft.com/en-US/library/ms256229(v=vs.120).aspx

MSDN format-number(): https://msdn.microsoft.com/en-us/library/ms256225(v=vs.110).aspx

There seems to be no way of defining a default decimal format, so all format-number() calls must be adapted.

I also noticed the following: the stroke-width in the SVG file has no units for the original line (path10304). However it says "pt" as unit for the converted arrow heads (path4587 and path4589).

Changing the XSL like this

    <xsl:attribute name="StrokeThickness">
      <xsl:value-of select="format-number($stroke_width, '#.#', 'independent')" />
    </xsl:attribute>

will produce StrokeThickness="NaN" as output.

Revision history for this message
Nathan Lee (nathan.lee) wrote :

Closing as part of bug migration to GitLab (https://alpha.inkscape.org/bug-migration/)

Issue can still be tracked here: https://gitlab.com/inkscape/inbox/-/issues/2208

Please feel free to file new bugs about the issues you're seeing at http://inkscape.org/report.

Changed in inkscape:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.