Multi Channel Publishing

We're going to expand on the theme from Single Source Publishing to include writing to even more disparate outputs types from the same input. You saw in that demonstration how a single report definition can be used to generate HTML+CSS for the web and also XSL-FO ➔ PDF for document delivery or print media. This time we're going to add more output sources, and show how all can be generated from the same input, at the same time.

We're going to use the XML Pipeline and XML Publishing features of Stylus Studio® to accomplish our goals. We'll use the same shirts.xml sample data and shirts.report report design that we referred to in the XML Report tutorial.

Multi-channel publishing source
Multi-channel publishing to web
Multi-channel publishing to print media
Multi-channel publishing to spreadsheet
Multi-channel publishing to EDI
  

Publish to Web via HTML+CSS

This part is easy; we take the shirts.report and tell it to generate code. Let's do XSLT 2.0, and make the output for HTML+CSS.

Publish to Print Media via XSL-FO and PDF

And this is easy also. Take that same shirts.report and generate XSLT 2.0 code to write XSL-FO.

Publish to Spreadsheets

For this part, we need a small bit of XSLT. Using the Stylus Studio® XSLT tools, including the editor, we can quickly generate a piece of XSLT that writes in a flat text format.

But we can do even better. Stylus Studio® includes a set of adapters, and we can use the comma-separated-value adapter to do this with almost no work, just by writing the XML data through the adapter.

Publish to EDI for Partners

A few minutes work using the EDI tools along with the XSLT mapper, and a map is produced between the input document and the EDIFACT INVRPT message that our reseller is expecting. This probably goes into their catalog production system, but who knows? The point is, we can deliver whatever they need.

Wiring Channels Together

Now all we need to do is to plop these components onto the XML Pipeline canvas. Dragging them from the Project window or File Explorer window is first, followed by drawing lines. Then clicking on the output ports of each bottom glyph, and naming the output. In case you just want to skip to the end and try it, here is everything all packaged up for you as a Stylus Studio® project file (zipped).

XML multi channel publishing output diagram (Click to enlarge)
(click to enlarge)

XML Multi Channel Publishing Available Now

Here's what we accomplished together, using Stylus Studio®'s mapping, pipelining and publishing tools. Using the shirts demonstration project, you can try everything covered here yourself — download and try a free evaluation copy today!

The web output, as HTML+CSS, it just a plain web page, and as such is suitable for inclusion directly into your web site. The simple things should be simple to do.

The XSL-FO output, which is post-processed into a PDF document, can be used for printing to a variety of high-resolution devices, or left as-is for download over the internet.

With no code at all, this output went through the adapter and was turned into a file suitable for using with a spreadsheet. In this case, just double-clicking on the output file opened Microsoft® Excel and displayed what you see.

A little bit of mapping, and what started off as an XML file is ready to be transmitted to a partner or vendor as EDI. We even validate the output to make sure nothing incorrect slips through.

Multi channel web publishing (Click to enlarge)
(click to enlarge)
Multi channel print publishing (Click to enlarge)
(click to enlarge)
Multi channel spreadsheet publishing (Click to enlarge)
(click to enlarge)
Multi channel EDI publishing (Click to enlarge)
(click to enlarge)

PURCHASE STYLUS STUDIO ONLINE TODAY!!

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

Buy Stylus Studio Now

Try Stylus Single Source Publishing Tools

Build Single Source Publishing applications with Stylus Studio® — Download a free trial today!

Attend a Live Webinar This Week!

Learn about Stylus Studio's unique features and benefits in just under an hour. Register for the Stylus Studio QuickStart Training WebCast!

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: