XML Publishing with AxKit

Book description

Web developers rely on XML to separate data from presentation and create a consistent templating system for a web site. Although limited XML-to-HTML conversion is possible within some browsers, web developers creating dynamic or complex sites will find server-side XML transformation a necessity. Unfortunately, until recently, there have been few XML tools available for server-side XML transformation or authoring. AxKit, a mod_perl and Apache-based XML content delivery solution, was designed to meet that need with a cost-effective and efficient plugin architecture. AxKit allows the developer to quickly design modules to create faster web sites, and deliver them in a wide variety of media formats. AxKit also takes care of caching so the developer doesn't have to worry about it. AxKit meets the demands of the web developer nicely, but, as with any new toolkit, there is a learning curve. For developers who want to flatten that learning curve and get right to work with AxKit, XML Publishing with AxKit provides detailed information on how to install, configure, and deploy AxKit effectively. The first book solely devoted to AxKit, XML Publishing with AxKit also offers a concise and focused look at how to create XSLT and XPathScript-based pipelines for XML data transfer. This solidly useful new book presents web programmers with the hands-on knowledge they need to get really creative with AxKit. It features a thorough introduction to XSP (extensible Server Pages), which applies the concepts of Server Pages technologies (embedded code, tag libraries, etc) to the XML world, and covers integrating AxKit with other tools such as Template Toolkit, Apache:: Mason, Apache::ASP, and plain CGI. The book also includes invaluable reference sections on configuration directives, XPathScript, and XSP. With XML Publishing with AxKit, web developers will have all the tools they need to deliver complex XML-based systems quickly, the power to develop their own systems for style sheet negotiation, and the flexibility to design completely new style sheet languages. XML Publishing with AxKit gives those new to XML all the background and the courage they need to jump right in and deploy AxKit. And it gives XML-savvy professionals everything they need to hit the ground running.

Table of contents

  1. XML Publishing with AxKit
    1. Preface
      1. Who Should Read This Book
      2. What’s Inside
      3. Conventions Used in This Book
      4. Using Code Examples
      5. How to Contact Us
      6. Acknowledgments
    2. 1. XML as a Publishing Technology
      1. Exploding a Few Myths About XML Publishing
      2. XML Basics
      3. Publishing XML Content
        1. Client-Side Transformations
        2. Preprocessed Transformations
        3. Dynamic Server-Side Transformations
      4. Introducing AxKit, an XML Application Server for Apache
    3. 2. Installing AxKit
      1. Installation Requirements
        1. Installing Apache and mod_perl
        2. XML Processing Options
      2. Installing the AxKit Core
        1. Using the CPAN Shell
        2. From the Tarball Distribution
      3. Installing AxKit on Win 32 Systems
      4. Basic Server Configuration
      5. Testing the Installation
      6. Installation Troubleshooting
        1. Where to Go for Help
          1. Installed AxKit documentation
          2. Mailing lists
    4. 3. Your First XML Web Site
      1. Preparation
      2. Creating the Source XML Documents
      3. Writing the Stylesheet
        1. Using XSLT
        2. Using XPathScript
      4. Associating the Documents with the Stylesheet
      5. A Step Further: Syndicating Content
    5. 4. Points of Style
      1. Adding Transformation Language Modules
      2. Defining Style Processors
        1. AxKit’s Runtime Styling Directives
          1. AxAddProcessor
          2. AxAddRootProcessor
          3. AxAddDocTypeProcessor and AxAddDTDProcessor
          4. AxAddURIProcessor
          5. AxAddDynamicProcessor
          6. AxResetProcessors
          7. Style definition directive inheritance
        2. Stylesheet Processing Instructions
          1. AxIgnoreStylesheetPI
      3. Dynamically Choosing Style Transformations
        1. Named Styles and StyleChoosers
        2. AxMediaType and MediaChoosers
      4. Style Processor Configuration Cheatsheet
        1. Rule 1: Style Processors at the Same Lexical Level Are Evaluated in Configuration-File Order
        2. Rule 2: Conditional Processing Directives Are Evaluated Only Against the Original XML Source
        3. Rule 3: Style Processors Are Prepended to the Processing Chain as You Descend into the Directory Hierarchy
        4. Rule 4: Processors in the Named BlocksAre Always Evaluated Last
    6. 5. Transforming XML Content with XSLT
      1. XSLT Basics
        1. The XPath Language
          1. Location paths and relationship axes
          2. Functions
          3. Predicates
        2. Stylesheet Templates
        3. Loop Constructs
        4. Conditional Blocks
        5. Parameters and Variables
      2. A Brief XSLT Cookbook
        1. Delivering Browser-Friendly HTML
          1. Problem
          2. Solution
          3. Discussion
        2. Alternating Colors in HTML Table Rows
          1. Problem
          2. Solution
          3. Discussion
        3. Using XSLT Parameters with POST and GET Data
          1. Problem
          2. Solution
          3. Discussion
        4. Creating a “Breadcrumb” Navigation Bar
          1. Problem
          2. Solution
          3. Discussion
        5. Passing Markup Through Untransformed
          1. Problem
          2. Solution
          3. Discussion
        6. Including External Documents
          1. Problem
          2. Solution
          3. Discussion
        7. Dividing Large Datasets into Pages
          1. Problem
          2. Solution
          3. Discussion
    7. 6. Transforming XML Content with XPathScript
      1. XPathScript Basics
        1. Accessing Document Content
          1. findvalue( )
          2. findnodes( )
          3. findnodes_as_string( )
        2. Declarative Templates
          1. Applying templates
          2. Importing templates
          3. Expression interpolation
      2. The Template Hash: A Closer Look
        1. The Joys of testcode
        2. The Special “Catch-All” Template
      3. XPathScript Cookbook
        1. Accessing Client Request and Server Data
          1. Problem
          2. Solution
          3. Discussion
          4. Accessing form and query data
          5. Setting cookies
          6. Redirecting the client
        2. Generating Fresh Dynamic Content
          1. Problem
          2. Solution
          3. Discussion
        3. Importing Templates Dynamically
          1. Problem
          2. Solution
          3. Discussion
        4. Tokenizing Text into Elements
          1. Problem
          2. Solution
          3. Discussion
    8. 7. Serving Dynamic XML Content
      1. Introduction to eXtensible Server Pages
        1. XSP Basics
          1. Generating content
          2. Using Perl modules in XSP pages
        2. XSP Tag Libraries
          1. Installing module-based XSP taglibs
          2. Writing logicsheet taglibs
          3. Writing module-based taglibs using TaglibHelper
        3. XSP Debugging Tips
      2. Other Dynamic XML Techniques
        1. Aggregate Data URIs
        2. Application ContentProviders
    9. 8. Extending AxKit
      1. AxKit’s Architecture
      2. Custom Plug-ins
        1. Plug-in API
      3. Custom Providers
        1. Provider API
          1. init( )
          2. process( )
          3. mtime( )
          4. get_styles( )
          5. get_strref( )
          6. get_fh( )
          7. get_dom( )
          8. key( )
          9. exists( )
      4. Custom Language Modules
        1. Language API
      5. Custom ConfigReaders
        1. ConfigReader API
          1. get_config( )
          2. StyleMap( )
          3. CacheDir( )
          4. ContentProviderClass( )
          5. StyleProviderClass( )
          6. DependencyChecks( )
          7. PreferredStyle( )
          8. PreferredMedia( )
          9. CacheModule( )
          10. DebugLevel( )
          11. LogDeclines( )
          12. HandleDirs( )
          13. IgnoreStylePI( )
          14. AllowOutputCharset( )
          15. OutputCharset( )
          16. ErrorStyles( )
          17. GzipOutput( )
          18. DoGzip( )
          19. GetMatchingProcessors( )
          20. XSPTaglibs( )
          21. OutputTransformers( )
          22. Plugins( )
      6. Getting More Information
    10. 9. Integrating AxKit with Other Tools
      1. The Template Toolkit
        1. Generating Content
        2. Transforming Content
      2. Providing Content via Apache::Filter
        1. CGI
        2. Apache::ASP
        3. HTML::Mason
    11. A. AxKit Configuration Directive Reference
      1. AxCacheDir
      2. AxNoCache
      3. AxDebugLevel
      4. AxTraceIntermediate
      5. AxDebugTidy
      6. AxStackTrace
      7. AxLogDeclines
      8. AxAddPlugin
      9. AxGzipOutput
      10. AxTranslateOutput
      11. AxOutputCharset
      12. AxExternalEncoding
      13. AxAddOutputTransformer
      14. AxResetOutputTransformers
      15. AxErrorStylesheet
      16. AxAddXSPTaglib
      17. AxIgnoreStylePI
      18. AxHandleDirs
      19. AxStyle
      20. AxMedia
      21. AxAddStyleMap
      22. AxResetStyleMap
      23. AxAddProcessor
      24. AxAddDocTypeProcessor
      25. AxAddDTDProcessor
      26. AxAddRootProcessor
      27. AxAddURIProcessor
      28. AxResetProcessors
      29. <AxMediaType>
      30. <AxStyleName>
    12. Index
    13. Colophon

Product information

  • Title: XML Publishing with AxKit
  • Author(s):
  • Release date: June 2004
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9780596002169