XML Publisher

The XML Publisher lets you give visual form to tree-structured or relational data, or any combination thereof. Each item's appearance can be controlled by its context, giving you unlimited possibilities for expression.

The output of the XML Publishing module can be as either

  • XML-FO

And instead of being some sort of "black box", it actually works by generating standard XSLT 1.0, XSLT 2.0 or XQuery code that you can use or modify freely in other contexts.

There are seven basic constructs that are used in publishing the XML. Three — table, list, and repeater — correspond to looping or iterating data. The next three — text, values, and images — are used to represent data. The final construct, the if, is used to determine whether or not something displays.

Dynamic XML Publishing

The information displayed is not completely defined at design-time — you can incorporate decision making right into the output. Using the if construct, whole sections of the report can be turned on or off.

The property values can determined by context as well as having static values. Any XPath expression can be used to return a result. This means that if you want to have alternating colors for rows, you can do something like this for the row's color property:

if (position() mod 2 = 1) then "lightcyan" else "white"

or to color a value red when negative, you could set the cell's color property to this:

if (quantity < 0) then "red" else "black"

These are just a few of the most basic possibilities.

Publish from Multiple Sources

There is no limit to the number of source documents, nor their format. Any number of XML, relational, EDI, flat file or other input sources may be used together freely within a report.

XML Publisher repeating element menu (Click to enlarge)
(click to enlarge)


If you drag any repeating element from the input source pane, you get the option to produce a table, a list or a repeater. Choosing the first gives you the option to populate the table automatically with the elements that come under it. Or you can populate it manually, or augment or change the default in any way you want.

XML Publisher table auto-population (Click to enlarge)
(click to enlarge)

XML Publisher Lists (Click to enlarge)
(click to enlarge)


A list works a lot like a table, but with one column. Dragging a repeating element onto the canvas offers the option to create a list scoped to that element. You may filter and sort also to your heart's content.

The snapshot to the right was created by two drags: first to drag the repeating element ITEM onto the canvas to set the context for the list, and a second to drag the TITLE element onto the list component. That's it!



For times when you want more control, you can create a repeater section. Whatever is contained in this repeating construct that looks kind of like this part of this web page will iterate over all of the elements matching its XPath expression.


The value shows as XML Publisher Value in the display, and contain actual XPath expressions as to what should be displayed. Anything in the source document can be inserted, and the power of XPath 2.0 is at your disposal.


The text component is for just plain text. Like everything else, it can be styled in a variety of ways. Even here, the attributes of the text, including also size and typeface, can be changed at runtime. If you want to highlight values based on certain criteria, we place no restrictions on you ability to express yourself.


The image can get its location from one of the input sources, or can be specified at the time the report is designed. This is good for product listing or logos or even if you decide to use wildly custom bullets in a list.


XML Publisher 'If' conditional construct

The if construct displays two tabs. You can put whatever objects you want in the true or false tab. Anything within the first will be displayed if the associated XPath expression has an effective boolean value of true, otherwise what's in the second tab will be displayed.

XML Publisher Backmapping

Of course it wouldn't be part of Stylus Studio® if it didn't support backmapping. Click anywhere in the result document, and you will be brought to the construct that created that output. We did it for XSLT, XQuery and even Convert-to-XML, so we just had to do it here.

XML Publish to XSL-FO to PDF or HTML+CSS (XSLT Generator & XSL:FO Generator)

XML Publisher is an XSLT Generator or an XSL:FO generator. When you're done working, you can generate XSLT or generate XSL:FO with a click of a button. The result is always standards-conformant HTML+CSS or XSL-FO. Using the same source report, you can generate code to write either.


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Try XML Publisher Now

Publish your data with Stylus Studio®'s XML Publisher — Download a free trial today!

What's New for Stylus Studio® X16?

New XQuery & Web Services Tools, Support for MySQL, PostgreSQL, HL7 EDI, Microsoft .NET Code Generation and much more!

Why Pay More for XML Tools?

With Stylus Studio® X16 XML Enterprise Suite, you get the most comprehensive XML tool suite at one incredibly low price. Value: it's just one of many reasons why smart XML developers are choosing Stylus Studio!

Top Ten XQuery Trends

Read about the top 10 XQuery Trends and how they will impact change the way enterprise software applications are built.

Free Stylus Studio XML Training: