Smart XSLT editing
Posted on June 25th, 2008 at 13:53
Eclipse's XSLT editor is getting really smart. Here's a small example.
-
Type
<xsl:var
-
Press Ctrl+Space to open Content Assist. Next press Enter to select the only available suggestion.
-
Your line now looks like this:
<xsl:variable name=""></xsl:variable>
-
Enter a name in the name attribute and add another attribute s.
-
Your line now looks like this:
<xsl:variable name="myname" s></xsl:variable>
-
Press Ctrl+Space to open Content Assist. Next press Enter to select the default suggestion.
-
Your line now looks like this:
<xsl:variable name="myname" select=""></xsl:variable>
-
Enter an expression in the select attribute and type a / after the attribute value.
-
Your line now looks like this:
<xsl:variable name="myname" select="/some/path"/>
Especially the automatic cleanup of empty elements is cool.


Post new comment