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
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.
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:
or to color a value red when negative, you could set the cell's color property to this:
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.
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.
(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!
The value shows as 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.
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.
PURCHASE STYLUS STUDIO ONLINE TODAY!!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Try XML Publisher Now
Publish your data with Stylus Studio®'s XML Publisher — Download a free trial today!
Learn Stylus Studio in 6 Minutes
Can six minutes change your life? A new action-packed online video demonstration covers how to use Stylus Studio in just six minutes! Watch this video and change the way you develop XML applications forever!
Top Ten XQuery Trends
Read about the top 10 XQuery Trends and how they will impact change the way enterprise software applications are built.