IF Blocks

IF blocks have a single input port, labeled condition; a Flow port; and two result ports: if then, and if else.

Figure 254. IF Block

You use IF blocks to compose if then, else XQuery expressions, such as the following:


              		<Book>
               

              			{
               

              				if( $book/title ) then
               

              					<Title/>
               

              				else
               

              					<ISBN/>
               

              			}
               

              		</Book>
               

            

This expression, for example, was composed by mapping

  • The title element in the source document to the IF block's input port.
  • The if then result port to the Title element in the target structure.
  • The if else result port to the ISBN element in the target structure.

IF blocks create a structure if the if then or if else branches are true. These ports can be connected to the target schema; otherwise they can be connected to Flow ports of FLWOR, function, and other IF blocks.

Industry DTD Standards Support (OASIS)

Stylus Studio provides integrated support OASIS catalogs, including thousands of industry-standard DTDs like DocBook, FIXML, and more!

Translating EDIFACT Documents to XML

The EDIFACT to XML Converter is a primary component 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, XQuery, XSLT, and so on.

XSLT Mapper

Simplify XSLT mapping with the Stylus Studio XSLT Mapper - supports multiple data sources, round-trip engineering (synchronized editing views), XSLT function blocks, integrated XSLT preview and more.

DataDirect XML Converters

DataDirect XML Converters are high-performance Java components which provide bi-directional, programmatic access to virtually any data source as XML.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member