[oXygen-user] Any tricks for xsl-if block to choose construct?
George Cristian Bina
george at oxygenxml.com
Mon Apr 9 02:27:06 CDT 2012
Hi Karl,
That is a good candidate for a new refactoring action.
Right now you can follow a pattern like below:
- Select the content that you want inside xsl:choose then type CTRL+E
(CMD+E on Mac) to invoke the surround with... action, then select the
xsl:choose element
- Change the start tag of the xsl:if to xsl:when and the end tag will be
automatically renamed
- If needed select the xsl:when element (for example by triple-clicking
on the start tag) and use CTRL+I (CMD+I on Mac) to invoke the indent
selection action - or just hit a tab to indent the selection to the right.
Next time, instead of CTRL+E (CMD+E) you can use CTRL+/ (CMD+/) to
invoke the surround with action with the last element used for this
operation.
Best Regards,
George
--
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
On 4/7/12 11:31 PM, Karl Stubsjoen wrote:
> Any tricks using oxygen to convert an existing xsl:if block to an
> xsl:choose block? Naturally, the xsl:if block would become an
> xsl:when block surround by xsl:choose element. So this:
>
> <xsl:if test="x = y">
> ....
> </xsl:if>
>
> Becomes:
>
> <xsl:choose>
> <xsl:when test="x = y">
> ....
> </xsl:when>
> </xsl:choose>
>
> Karl..
>
More information about the oXygen-user
mailing list