Understanding Input Ports

Stylus Studio interprets input ports differently for different XSLT instructions, as shown in Table 39:

XSLT Instruction
Meaning of Input Port
xsl:value-of
 
Used to define the value of the select attribute. For example:
<xsl:value-of select="'Owen'">
xsl:for-each
 
Used to define the XPath expression for the select attribute. For example:
<xsl:for-each select="books/book">
xsl:if
 
Used to define the value of the test attribute. For example:
<xsl:if test="authors/author= 'Henry'">
See xsl:if and xsl:choose to learn more about when to use this instruction.
xsl:choose
 
Used to define the value of the test attribute of the nested xsl:when element. For example:
<xsl:when test="contains(authors/author,'Marchese')">
See xsl:if and xsl:choose to learn more about when to use this instruction.
xsl:apply-templates
 
Used to define the value of the select attribute. For example:
<xsl:apply-templates select="subject"/>
xsl:call-template
 
Used to define the value of the name attribute. For example:
<xsl:call-template name="newAuthorsTemplate"/>
Table 39. XSLT Instruction Blocks in XSLT Mapper

Specifying Values for Input Ports

You can specify values for input ports by:

  • Dragging a link from a source document node or from the output port of another block (like that of an XPath function or If block, for example).
  • Double-clicking the port and typing a value (a string or an XPath expression, for example) in the Value dialog box.

Tip

 

When you mouse over an input port, Stylus Studio displays the value associated with that port.

Red Input Ports

If an xsl: instruction's attribute takes a literal or string value (such as xsl:value-of select="'Recommended'"/, for example) and a value has been provided for the attribute, Stylus Studio fills the input port associated with that attribute with a deep red to indicate that a value has been specified.

Microsoft .NET XML Tools for System.XML 1.0 and System.XML 2.0

Stylus Studio features integrated XML validation, XSLT transformation and XSLT debugging using the official Microsoft .NET XML processing components: System.XML 1.0 and System.XML 2.0.

Introduction to the XQuery Mapper

This free online video demonstration covers Stylus Studio's synchronized XQuery editing and mapping tool which allows you to create any XQuery expression, either manually using Stylus Studio's XQuery editor.

Translating X12 Documents to XML

The X12 to XML Converter is a built-in function of the adapter library. The XML that is generated is well commented and indented, and can be used anywhere XML is normally used — with XML Schemas, XSLT, XQuery, etc.

Stylus Studio's Advanced XQuery Mapper Features

Learn how to create an advanced XQuery expression in the XQuery mapper, specifying operations, constants, and ports, for use in conditional blocks and FLWR expressions. Free online video demonstration!

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member