Closed KonradHoeffner closed 4 months ago
The version pushed is currently untested. Also, I don't know how to do preprocessing step 3, copying the first coordinate of the arrow head and make it the last coordinate of the arrow body.
I will look into it today! (update: probably tomorrow)
@Yagnap: Sorry for the delay, I will look at it now.
Why use XSLT version 1 from 1999? I suggest using the newest XSLT version 3 from 2017.
Sounds good, if I read that correctly this would also solve our regex issue, as I believe XSLTv2+ supports regexes
How do you validate and execute the XSLT file?
I tried gui$ xsltproc scripts/preprocessing.xsl img/tmp.svg -o img/test.svg
but I get:
gui$ xsltproc scripts/preprocessing.xsl img/tmp.svg -o img/test.svg redesign
scripts/preprocessing.xsl:8: parser error : XML declaration allowed only at the start of the document
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg"
^
scripts/preprocessing.xsl:35: parser error : Opening and ending tag mismatch: svg line 8 and xsl:template
</xsl:template>
^
scripts/preprocessing.xsl:36: parser error : Opening and ending tag mismatch: template line 6 and transform
</xsl:transform>
^
cannot parse scripts/preprocessing.xsl
Ugh, I got a merge conflict but my changes weren't much so I am reverting it to get on the same state as you. I've just added auto formating to the XSLT file with the "npm run fmt" script so we get less conflicts in the future, however I advise pulling this in as soon as possible because the reformating can cause merge conflicts right now.
I will continue this today.
You can now start the preprocessing with node node/preprocess.js
after npm update to get the new developer dependencies.
The XSLT itself still needs to be expanded.
@Yagnap: Do we actually need the y="5" for the generic defs?
Easier to maintain, more powerful and better suited for the task.