Adding an Instruction Block to the XSLT Mapper

Tip

 

If you enter an XSLT instruction in the XSLT source and that instruction can be graphically represented in the mapper, the instruction, including appropriate links to source and target nodes, appears in the Mapper tab the next time you display it.

To add an instruction block to the XSLT mapper
1. Right click on the mapper canvas.

The shortcut menu appears.

2. Select XSLT Instructions from the shortcut menu.

The XSLT Instructions submenu appears.

3. Select the instruction you want to add to your XSLT.

The block for the instruction you selected appears in the mapper canvas.

4. Provide a value for the input port(s). See Specifying Values for Ports if you need help with this step.
5. Link the output port(s).
6. Optionally, link the flow port.

Notes About Creating Instruction Blocks

Be aware of the following when working with XSLT instruction blocks in the XSLT mapper:

  • To simplify the mapper's appearance, Stylus Studio sometimes removes blocks from the mapper canvas and replaces them with a simple link. For example, imagine creating an xsl:value-of instruction block and linking source and target document nodes. Stylus Studio displays the instruction block, but if you leave the Mapper and later return to it, the block symbol for the xsl:value-of instruction is replaced by a link with a small circle at its center, link the one shown in Figure 249.

    Figure 249. xsl:value-of in XSLT Mapper
  • If you mouse over the circle, Stylus Studio displays the XSLT represented by the link ( xsl:value-of select="/books/book/@pubdate"/, for example).

    This behavior also exists for text blocks created in the mapper that are not also linked to other blocks in the mapper. See Setting a Text Value.

  • If you type an XSLT instruction in the XSLT source that is not represented by the XSLT mapper, no representation of that XSLT instruction is displayed on the Mapper tab. The code remains as part of the XSLT source, however.
  • If you start creating an XSLT instruction in the mapper but do not completely define it (say you specify only the input port for an xsl:for-each instruction, for example), it is not represented in the XSLT source, and it is removed from the XSLT mapper if you leave the Mapper tab and then return to it.

XML Notepad

XML Notepad simplifies building of XML applications, allowing authors to rapidly build and edit their XML files. With XML Notepad, you can create XML document prototypes quickly, easily, using an intuitive graphical interface.

Key Benefits of DataDirect XML Converters

Learn how DataDirect XML Converters were created to maximize XML developer productivity, push innovation, and provide unquestioned value.

JavaServer Pages IDE (JSP IDE)

The Stylus Studio JSP IDE provides syntax help and code completion for developing JSP 1.2 and JSP 2.0 applications.

Stylesheet Design - How to Publish your Data Using a Stylesheet Designer

Simplify Stylesheet Design with Stylus Studio's XML Publisher, a visual stylesheet designer and code generator to help you create XSLT or XQuery to publish your data to HTML+CSS or XSL:FO.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member