Comment by ilitirit
11 years ago
XSLT does indeed have implementation issues, but it really is very powerful once you know how to use it properly. And I don't get how it's a "failure". It's one of the most widely used technlogies in the publishing industry.
Our company once had an application that processed the end-of-year high school student results and then published them in various newspapers. The input files were text files generated from the Education Department's database from various regions. The process took around 10-15 minutes (lot's of rules had to be run against the data). I replaced it with a Windows JScript script and XSLT. It took 15 seconds to transform the data.
That said, I still use XSLT regularly but I'd be lying if I enjoyed working with it. Using a decent IDE for development and debugging can help.
Someone did give me a nice tip for working with and learning XLST though - "translate your transformation rules directly from simple English to the template rules".
eg. "I need to insert the node <member> under <group>"
<xsl:template match="group">
<group>
<member/>
<xsl:apply-templates/>
</group>
</xsl:template>
"But if the group node exist, doesn't create, then create it"
<xsl:template match="root[not(group)]">
<root>
<group>
<member/>
</group>
<xsl:apply-templates/>
</root>
</xsl:template>
No comments yet
Contribute on Hacker News ↗