aXSL

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

aXSL Extensions

Contents

Introduction

This page documents the aXSL extensions to the XSL-FO recommendation. These are features that will probably be supported in future versions of the XSL-FO recommendation, but there is no way to know for sure. In the meantime, using the aXSL namespace for these extensions allows for more interoperability between XSL-FO implementations.

All of the extensions documented here should be placed in the axsl namespace. The specifier for this namespace is:

xmlns:axsl="http://org.axsl/xslfo-extensions/2007"

The form of any future support for these features in the XSL-FO recommendation may be quite different from that suggested here. Certainly the namespace will change. Support for these features within the aXSL namespace will be first deprecated, then later removed, as the features are added to XSL-FO. Stylesheets will almost certainly need to be modified in the future.

Document Metadata

A document's metadata, such as its title, author, keywords, and subject, is useful in many document output formats. The axsl:metadata object allows document authors to provide this information to the processor. The fo:declarations object is a logical location for this content, and it allows content from other namespaces. aXSL effectively changes its content model to the following:

(color-profile | axsl:metadata)*

Each axsl:metadata element specifies one metadata item, using a key-value pairing. The "key" is specified in the only attribute, which is required: "metadata-key". Its value must be:

title | author | subject | keywords

The "value" is specified in the content of the element itself. The content model of axsl:metadata is:

(#PCDATA)

The following is an example of the usage of axsl:metadata:

...
<fo:declarations>
  <fo:color-profile ... />
  <fo:color-profile ... />
  <axsl:metadata metadata-key="title">The Hound of the Baskervilles</axsl:metadata>
  <axsl:metadata metadata-key="author">Sir Arthur Conan Doyle</axsl:metadata>
  <axsl:metadata metadata-key="subject">Mystery</axsl:metadata>
  <axsl:metadata metadata-key="keywords">Sherlock, Holmes, Mystery</axsl:metadata>
</fo:declarations>
...

Implementations supporting this extension should do so using the interface org.axsl.foR.extension.Metadata, for maximum interoperability between implementations. The Metadata instances can be returned from org.axsl.foR.Declarations.