|
Home > Online Product Documentation > Table of Contents > Adding Conditional Processing in the HTML Editor Adding Conditional Processing in the HTML EditorConditional processing can be on a single item, a repeating item or a row.
You can then specify whether you want to insert an
Only one branch of a conditional instruction can be active at any one time. Consequently, the HTML canvas might haze or hide glyphs and placeholders. If you want to operate on a placeholder that is not visible, you must change the active branch.
When you specify conditional processing on a table row, a marker (
This section covers the following topics: Specifying Choose Conditional Processing in the HTML Editor
At any point in time only one branch of an
Use the
Choose Manager to define the test conditions in the
Choose ManagerTo specify xsl:choose processing:
1. Right click on the placeholder for which you want to define the
xsl:choose instruction.
2. In the shortcut menu that appears, select
Conditional Processing
>
Add Choose. Stylus Studio displays the
Choose Manager dialog box.
3. Click
Copy to define a test condition, which must be an XPath expression. You can define as many conditions as you need. Each condition you add corresponds to an
xsl:when instruction.
4. If you do not need it, select the
true() condition and delete it.
5. To specify an
xsl:otherwise instruction, add a condition and leave it blank.
6. Click
OK.
Stylus Studio creates an
Change active branchTo change the active branch:
1. In the HTML canvas, click a
choose glyph for the active branch you want to change.
Stylus Studio displays the properties for the
2. In the
Properties window, click the
when field.
3. Click the down arrow to display the drop-down menu.
4. Click the branch you want to be active.
For a new
Specifying If Conditional Processing in the HTML EditorTo specify xsl:if conditional processing:
1. Select the placeholder for which you want to define the
xsl:if instruction.
2. In the pop-up menu that appears, select
Conditional Processing
>
Add If. Stylus Studio displays the
Input dialog box.
3. In the
Test Condition field, specify an XPath expression. Stylus Studio evaluates it in the context of the placeholder to which you are adding the
xsl:if instruction.
4. Click
OK.
You can specify multiple
|
XML Whitepapers
Learn how XML can help you meet your business objectives by reading free XML Whitepapers covering XML, XML Schema, XQuery, SQL/XML, and FIXML technolgies employed in real world case studies.
DB2
IBM DB2 is a database management system for powering business applications. Learn how to build XML solutions on DB2 using Stylus Studio's DB2 tools.
Validating EDIFACT Documents with XML Schemas
Either before or after transforming EDIFACT content, generated XML Schemas will make sure that we have all of the necessary components, our codes are all according to the standard codelists, and every little delimiter is in the right place.
XML-DEV Discussion Forum
XML-DEV is a leading technical forum for XML discussion and a valuable free XML learning resource. Subscribe to the XML-DEV email discussion forum today to help further your XML education.