Smart XSLT editing

Eclipse's XSLT editor is getting really smart. Here's a small example.

  1. Type

    <xsl:var

  2. Press Ctrl+Space to open Content Assist. Next press Enter to select the only available suggestion.

  3. Your line now looks like this:

    <xsl:variable name=""></xsl:variable>

  4. Enter a name in the name attribute and add another attribute s.

  5. Your line now looks like this:

    <xsl:variable name="myname" s></xsl:variable>

  6. Press Ctrl+Space to open Content Assist. Next press Enter to select the default suggestion.

  7. Your line now looks like this:

    <xsl:variable name="myname" select=""></xsl:variable>

  8. Enter an expression in the select attribute and type a / after the attribute value.

  9. 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

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options