XSLT, you sonofabitch...
Oct. 3rd, 2008 04:28 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
I've wasted most of two days now looking for the logical error in an XSLT I whipped up to merge massive data sets for my research. (The naive merge.xslt that bounces around the web as the go-to-tool took literally most of a day to merge the full data run. I thought I could do better.*) After all this time, I finally saw it...
Can you spot the error? No errors reported by xsltproc, it was perfectly happy to consume that tidbit. Okay, so I gave you a head start, since this was culled out of a 500+ line XSLT.
*I did. About 120x faster, more for some specific cases.
<xslt:template math="@*|node()" mode="m:copy">
<xslt:copy>
<xslt:copy-of select="@*" />
<xslt:apply-templates mode="m:copy" />
</xslt:copy>
</xslt:template>
Can you spot the error? No errors reported by xsltproc, it was perfectly happy to consume that tidbit. Okay, so I gave you a head start, since this was culled out of a 500+ line XSLT.