XSLT refactoring actions

  • XSL+ Create template from selection...: Opens a dialog that allows the user to specify the name of the new template to be created. The possible changes to be performed on the document can be previewed prior to altering the document. After pressing OK, the template is created and the selection is replaced by a

    xsl:call-template

    instruction referring the just created template.

    [Note]Note

    The selection must contain wellformed elements only.

    Figure 4.89. Create template from selection dialog

    Create template from selection dialog

  • XSL+ Create stylesheet from selection...: Creates a separate stylesheet and replaces the selection with a

    xsl:include

    instruction referring the just created stylesheet.

    [Note]Note

    The selection must contain a well formed top level element.

  • XSLExtract attributes as xsl:attributes...: Extracts the attributes from the selected element and represents each of them with a

    xsl:attribute

    instruction.

    For example from the following element

    <person id="Big{test}Boss"/>
                            

    you would obtain

    <person>
        <xsl:attribute name="id">
            <xsl:text>Big</xsl:text>
            <xsl:value-of select="test"/>
            <xsl:text>Boss</xsl:text>
        </xsl:attribute>
    </person>
                            
  • XSL+ Rename occurrences in project...: Renames all occurrences of the item at current cursor position in the entire project. The possible changes to be performed on the documents can be previewed prior to altering the documents.

    In the upper part of the Rename template dialog there are displayed all the project files in which the item was found, while in the central part of the dialog it can be seen where the replacements will be performed. The user has the possibility to allow or deny the altering of a file.

    Figure 4.90. Rename occurrences in project dialog

    Rename occurrences in project dialog

  • XSLRename occurrences in file...: Renames all occurrences of the item at current cursor position in the entire file. The possible changes to be performed on the current file can be previewed prior to document altering.

  • XSLRename occurrences starting from file...: Renames all occurrences of the item at current cursor position in the currently edited file and all its included and imported files. The possible changes to be performed can be previewed prior to document(s) altering.

  • XSLRename occurrences starting from ...: Opens a dialog that allows the user to select the files to begin searching from, then renames all occurrences of the item at current cursor position in the selected files and all their included and imported files. The possible changes to be performed can be previewed prior to document(s) altering.