Single Source Publishing
"Single source publishing" is the ability to use one source of information for generating multiple types of output. We're briefly going to show how the XML Report tool can be used for publishing both to the internet and to print media.
The report definition itself has been designed in such as way as to abstract the details
of formatting and layout, so that you don't have to worry about how to position text and
how to switch
XML Report Code Generation Options
Once the report is designed, it can be saved as code that does the actual work. That code can be used as part of any project, since it is industry-standard and requires no extension functions.
The types of programming languages supported are:
Each has their own advantages.
XSLT 2.0 writes XSLT 2.0, which works extremely well with the highly-optimized Saxon 8.x engine. Saxon 8.x supports schema-aware processing. Using this as a choice allows considerably more power and flexibility in using dynamic properties since it allows XPath 2.0 expressions.
Now any of these can be set to write either web or print code. Let's see how that's done next.
Specify Web or Print Output
At the same time you choose whether you want to generate the code that generates the report in XSLT or XQuery, you can also choose which form of output to use: HTML+CSS for the Web, or XSL-FO for documents (which can be served on the web or printed).
This still leaves us with the questions:
XSL-FO means generating code that writes XSL Formatting Objects. This can be rendered by FO processors such as the open-source Apache FOP or RenderX XEP. "Rendering" as a post-processing step turns the XSL-FO into some final form — and in this case, it's put into a Portable Document Format. For more information on the structure and capability of PDF files, see the PDF Reference pages.
When you need to change the report — either because the input data changes in structure, or because the output requirements change, you change the report itself, and then regenerate the code. You don't have to worry about code merging or propagating differences between the web and print versions, since they share a common ancestor.
Multi Channel Publishing
This subject of single source printing is closely related to multi-channel publishing. Follow that link to learn more about using reports and generated code in pipelines to write to even more types of output, all from the same input.
PURCHASE STYLUS STUDIO ONLINE TODAY!!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Try Stylus Single Source Publishing Tools
Build Single Source Publishing applications with Stylus Studio® — Download a free trial today!
Learn XQuery in 10 Minutes!
Say goodbye to 10-minute abs, and say Hello to "Learn XQuery in Ten Minutes!", the world's fastest and easiest XQuery primer, now available for free!
Top Ten XQuery Trends
Read about the top 10 XQuery Trends and how they will impact change the way enterprise software applications are built.