XAML Export: invalid decimal format in StrokeThickness
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
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://
I was using Inkscape 0.92.0 r15299.
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="StrokeThi ckness" > "format- number( $stroke_ width, '#.#', 'independent')" /> attribute>
<xsl:value-of select=
</xsl:
will produce StrokeThickness ="NaN" as output.