Copyright © 2001-2002 Printer Working
Group, All Rights Reserved.
XHTML is a trademark of the World Wide Web Consortium.
HTML 4 is a powerful language for authoring Web content, but its design does not take into consideration issues pertinent to printers, including the implementation cost (in power, memory, etc.) of the full feature set. Printers have relatively limited resources that cannot generally afford to implement the full feature set of HTML 4.
Because there are many ways to subset HTML, there are many almost identical subsets defined by organizations and companies. Without a common base set of features, developing print applications for a wide range of printers is difficult.
XHTML-Print's targeted usage is for printing in environments where it is not feasible or desirable to install a printer-specific driver and where some variability in the formatting of the output is acceptable.
The document type definition for XHTML-Print is implemented based on the XHTML modules defined in Modularization of XHTML [XHTMLMOD].
This section describes the status of this document at the time of its publication. Other documents may supersede this document. The latest status of this document series is maintained at the PWG.
This document is a draft and only a draft. It has not been reviewed by PWG Members nor approved. It is not a stable document and may not be used as reference material nor cited as a normative reference from another document.
Public discussion of XHTML-Print takes place on the mailing list: xp@pwg.org (archive). To subscribe send an email to majordomo@pwg.org with the words subscribe xp in the body. You must be subscribed to the mailing list to post there. Please report errors in this document to one of the editors listed above or on the mailing list.
A list of current PWG Standards and other technical documents can be found at http://www.pwg.org/standards.html
This document specifies a simple XHTML based data stream suitable for printing as well as display. It is based on the W3C’s XHTML Basic with additional text and style treatments. Its targeted usage is for printing in environments where it is not feasible or desirable to install a printer-specific driver and where some variability in the formatting of the output is acceptable. Throughout this document this data stream is called “XHTML-Print.”
XHTML-Print is designed to be appropriate for low-cost printers that may not have a full-page buffer and that generally print from top-to-bottom and left-to-right with the paper in a portrait orientation. For other printers (i.e., those that print in another direction or orientation) a full-page buffer may be required.
XHTML-Print is not appropriate when strict layout consistency and repeatability across printers are required. The design objective of XHTML-Print is to provide a relatively simple, broadly supportable page description format where content preservation and reproduction are the goal, i.e. “Content is King.” Traditional printer page description formats such as PostScript or PCL are more suitable when strict layout control is required. XHTML-Print does not utilize bi-directional communications with the printer either for capabilities or status inquiries.
This document creates a set of conformance criteria for XHTML-Print. It provides a strong basis for rich printing results without a detailed understanding of each individual printer’s characteristics.
The document type definition for XHTML-Print is implemented based on the XHTML modules defined in Modularization of XHTML [XHTMLMOD].
The keywords “MUST”, “SHALL”, “MUST NOT”, “SHALL NOT”, “REQUIRED”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” when used in this document are to be interpreted as described in RFC 2119. However, for readability, these words do not appear in all uppercase letters in this specification.
This section explains why certain HTML features are not part of XHTML-Print.
The script
and noscript
elements are not supported
as a printer lacks typical user interaction necessary for a script.
Content of the script should not be printed.
Event handler attributes used to invoke script programs are not supported. Events are device dependent and unlikely to happen in a printer. A generic event handling mechanism would be more appropriate than hardwiring the event names in the document type definition.
Many simple printers cannot print a wide variety of fonts other than the generic serif, san serif and monospace. It is recommended that style sheets be used to create a presentation that is appropriate for a particular class of printer.
Basic XHTML forms ([XHTMLMOD], section 5.5.1) are supported. Since only devices with a local file system can take advantage of file and image input types in forms, they are not included in the basic forms. Also, content developers should keep in mind that users may not be able to input many characters from some devices (e.g. from a mobile phone).
Basic XHTML tables ([XHTMLMOD], section 5.6.1) are supported, but tables can be difficult to format on very low resourced devices. Note that in the Basic Tables Module, nesting of tables is prohibited.
Frames are not supported. Frames depend on a screen interface and therefore are not applicable to printers.
This section is normative.
A conforming XHTML-Print document is a document that requires only the
facilities described as mandatory in this specification. Such a document must
meet all of the following criteria:
http://www.w3.org/1999/xhtml
.
<!DOCTYPE html PUBLIC "-//PWG//DTD HTML-Print 1.0//EN" "http://www.xhtml-print.org/xhtml-print/xhtml-print10.dtd">
The printer user agent must conform to the "User Agent Conformance" section of the XHTML 1.0 specification ([XHTML1], section 3.2), subject to the following ammendments.
This section is normative.
The XHTML-Print document type is defined as a set of XHTML modules. All XHTML modules are defined in the "Modularization of XHTML" specification [XHTMLMOD].
XHTML-Print consists of the following XHTML modules:
body, head, html, title
abbr, acronym, address, blockquote, br, cite, code, dfn, div, em,
h1, h2, h3, h4, h5, h6, kbd, p, pre, q, samp, span, strong, var
a
dl, dt, dd, ol, ul, li
b, big, hr, i, small, sub, sup, tt
form, input, label, select, option, textarea
caption, table, td, th, tr
img
object, param
meta
style
link
base
object, param
(*) = This module is a required XHTML
Host Language module.
(**) = These modules are not a part of XHTML
Basic but are required for XHTML-Print.
An XML 1.0 DTD is available in Appendix A.
NOTE: Since the HTML event handler attributes are not included in XHTML-Print, form controls outside forms may not function as expected by the user.
This section is normative.
XHTML-Print inherits all the structure, encoding and other basic infrastructure specified by XHTML. The following sections describe and clarify the application and usage restrictions of XHTML-Print.
Because many printers create the page in a serial manner from top to
bottom, it is important for the printer to know the size of images before
retrieving the image data itself. This information is then used to create
portions of the page layout.
Therefore, the sender is strongly encouraged to include the height and
width attributes either within the ‘img’ or the ‘object’ element, or within an
associated style sheet rule. Printers may omit from the page images that do
not include height and width attributes (see Section 6.3.1, item 4). These
attributes may be expressed as percentages within the ‘img’ or the ‘object’
element, or may use the standard absolute or relative units within the CSS
rule. Percentages are relative to the parent element and not the page width or
printable area.
Low-cost printers today often have very little memory into which page data can be stored before being printed. As such, they must build and print the page in swaths on the fly from the top of the page to the bottom. The following guidelines maximize the capabilities of XHTML-Print in these lower cost printers.
This specification was prepared by the PWG XHTML-Print Working Group. The members were:
This appendix is normative.
This section contains the pieces of the XHTML-Print DTD that are unique to XHTML-Print. The remaining entities and modules are as specified in reference [3].
The following should be used from Modularization of XHTML [3]:
<!-- ....................................................................... --> <!-- XHTML-Print 1.0 DTD ................................................... --> <!-- file: xhtml-print10.dtd --> <!-- XHTML-Print 1.0 DTD This is XHTML-Print 1.0, a variant of XHTML Basic for printing. Copyright 2001 Lexmark International Inc., Hewlett-Packard Company, Xerox Corporation, and Canon Inc. All Rights Reserved. Permission to use, copy, modify and distribute the XHTML-Print DTD and its accompanying documentation for any purpose and without fee is hereby granted in perpetuity, provided that the above copyright notice and this paragraph appear in all copies. The copyright holders make no representation about the suitability of the DTD for any purpose. It is provided "as is" without expressed or implied warranty. Author: Jun Fujisawa <fujisawa.jun@canon.co.jp> Revision: $Id: xhtml-print10.dtd,v 1.2 2001/06/04 17:16:35 fujisawa Exp $ --> <!-- This is the driver file for version 1.0 of the XHTML-Print DTD. This DTD is identified by the PUBLIC and SYSTEM identifiers: PUBLIC "-//PWG//DTD XHTML-Print 1.0//EN" SYSTEM "http://www.xhtml-print.org/xhtml-print/xhtml-print10.dtd" --> <!ENTITY % XHTML.version "-//PWG//DTD XHTML-Print 1.0//EN" > <!-- Use this URI to identify the default namespace: "http://www.w3.org/1999/xhtml" --> <!ENTITY % NS.prefixed "IGNORE" > <!ENTITY % XHTML.prefix "" > <!-- Reserved for use with the XLink namespace: --> <!ENTITY % XLINK.xmlns "" > <!ENTITY % XLINK.xmlns.attrib "" > <!-- reserved for future use with document profiles --> <!ENTITY % XHTML.profile "" > <!-- Bidirectional Text features This feature-test entity is used to declare elements and attributes used for bidirectional text support. --> <!ENTITY % XHTML.bidi "IGNORE" > <!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: --> <!ENTITY % xhtml-events.module "IGNORE" > <!ENTITY % xhtml-bdo.module "%XHTML.bidi;" > <!-- Style Attribute Module ............................ --> <!ENTITY % xhtml-inlstyle.module "INCLUDE" > <![%xhtml-inlstyle.module;[ <!ENTITY % xhtml-inlstyle.mod PUBLIC "-//W3C//ENTITIES XHTML Inline Style 1.0//EN" "http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-inlstyle-1.mod" > %xhtml-inlstyle.mod;]]> <!-- Document Model Module ............................. --> <!ENTITY % xhtml-model.mod PUBLIC "-//PWG//ENTITIES XHTML-Print 1.0 Document Model 1.0//EN" "xhtml-print10-model-1.mod" > <!-- Modular Framework Module (required) ............... --> <!ENTITY % xhtml-framework.mod PUBLIC "-//W3C//ENTITIES XHTML Modular Framework 1.0//EN" "http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-framework-1.mod" > %xhtml-framework.mod; <!-- Text Module (required) ............................ --> <!ENTITY % xhtml-text.mod PUBLIC "-//W3C//ELEMENTS XHTML Text 1.0//EN" "http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-text-1.mod" > %xhtml-text.mod; <!-- Hypertext Module (required) ....................... --> <!ENTITY % xhtml-hypertext.mod PUBLIC "-//W3C//ELEMENTS XHTML Hypertext 1.0//EN" "http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-hypertext-1.mod" > %xhtml-hypertext.mod; <!-- Lists Module (required) ........................... --> <!ENTITY % xhtml-list.mod PUBLIC "-//W3C//ELEMENTS XHTML Lists 1.0//EN" "http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-list-1.mod" > %xhtml-list.mod; <!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: --> <!-- Presentation Module ............................... --> <!ENTITY % xhtml-pres.module "INCLUDE" > <![%xhtml-pres.module;[ <!ENTITY % xhtml-pres.mod PUBLIC "-//W3C//ELEMENTS XHTML Presentation 1.0//EN" "http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-pres-1.mod" > %xhtml-pres.mod;]]> <!-- Image Module ...................................... --> <!ENTITY % xhtml-image.module "INCLUDE" > <![%xhtml-image.module;[ <!ENTITY % xhtml-image.mod PUBLIC "-//W3C//ELEMENTS XHTML Images 1.0//EN" "http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-image-1.mod" > %xhtml-image.mod;]]> <!-- Tables Module ..................................... --> <!ENTITY % xhtml-table.module "INCLUDE" > <![%xhtml-table.module;[ <!ENTITY % xhtml-table.mod PUBLIC "-//W3C//ELEMENTS XHTML Basic Tables 1.0//EN" "http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-basic-table-1.mod" > %xhtml-table.mod;]]> <!-- Forms Module ...................................... --> <!ENTITY % xhtml-form.module "INCLUDE" > <![%xhtml-form.module;[ <!ENTITY % xhtml-form.mod PUBLIC "-//W3C//ELEMENTS XHTML Basic Forms 1.0//EN" "http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-basic-form-1.mod" > %xhtml-form.mod;]]> <!-- Style Sheet Module ................................ --> <!ENTITY % xhtml-style.module "INCLUDE" > <![%xhtml-style.module;[ <!ENTITY % xhtml-style.mod PUBLIC "-//W3C//ELEMENTS XHTML Style Sheets 1.0//EN" "http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-style-1.mod" > %xhtml-style.mod;]]> <!-- Link Module ....................................... --> <!ENTITY % xhtml-link.module "INCLUDE" > <![%xhtml-link.module;[ <!ENTITY % xhtml-link.mod PUBLIC "-//W3C//ELEMENTS XHTML Link Element 1.0//EN" "http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-link-1.mod" > %xhtml-link.mod;]]> <!-- Metainformation Module ............................ --> <!ENTITY % xhtml-meta.module "INCLUDE" > <![%xhtml-meta.module;[ <!ENTITY % xhtml-meta.mod PUBLIC "-//W3C//ELEMENTS XHTML Metainformation 1.0//EN" "http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-meta-1.mod" > %xhtml-meta.mod;]]> <!-- Base Module ....................................... --> <!ENTITY % xhtml-base.module "INCLUDE" > <![%xhtml-base.module;[ <!ENTITY % xhtml-base.mod PUBLIC "-//W3C//ELEMENTS XHTML Base Element 1.0//EN" "http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-base-1.mod" > %xhtml-base.mod;]]> <!-- Param Module ...................................... --> <!ENTITY % xhtml-param.module "INCLUDE" > <![%xhtml-param.module;[ <!ENTITY % xhtml-param.mod PUBLIC "-//W3C//ELEMENTS XHTML Param Element 1.0//EN" "http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-param-1.mod" > %xhtml-param.mod;]]> <!-- Object Module ..................................... --> <!ENTITY % xhtml-object.module "INCLUDE" > <![%xhtml-object.module;[ <!ENTITY % xhtml-object.mod PUBLIC "-//W3C//ELEMENTS XHTML Embedded Object 1.0//EN" "http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-object-1.mod" > %xhtml-object.mod;]]> <!-- Structure Module (required) ....................... --> <!ENTITY % xhtml-struct.mod PUBLIC "-//W3C//ELEMENTS XHTML Document Structure 1.0//EN" "http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-struct-1.mod" > %xhtml-struct.mod; <!-- end of XHTML-Print 1.0 DTD ............................................ --> <!-- ....................................................................... -->
<!-- ....................................................................... --> <!-- XHTML-Print 1.0 Document Model Module ................................. --> <!-- file: xhtml-print10-model-1.mod This is XHTML-Print 1.0, a variant of XHTML Basic for printing. Copyright 2001 Lexmark International Inc., Hewlett-Packard Company, Xerox Corporation, and Canon Inc. All Rights Reserved. Revision: $Id: xhtml-print10-model-1.mod,v 1.2 2001/06/04 17:16:35 fujisawa Exp $ This DTD module is identified by the PUBLIC and SYSTEM identifiers: PUBLIC "-//PWG//ENTITIES XHTML-Print 1.0 Document Model 1.0//EN" SYSTEM "http://www.xhtml-print.org/xhtml-print/xhtml-print10-model-1.mod ....................................................................... --> <!-- XHTML-Print 1.0 Document Model This module describes the groupings of elements that make up common content models for XHTML-Print elements. --> <!-- Optional Elements in head ......................... --> <!ENTITY % HeadOpts.mix "( %meta.qname; | %link.qname; | %object.qname; | %style.qname; )*" > <!-- Miscellaneous Elements ............................ --> <!ENTITY % Misc.class "" > <!-- Inline Elements ................................... --> <!ENTITY % InlStruct.class "%br.qname; | %span.qname;" > <!ENTITY % InlPhras.class "| %em.qname; | %strong.qname; | %dfn.qname; | %code.qname; | %samp.qname; | %kbd.qname; | %var.qname; | %cite.qname; | %abbr.qname; | %acronym.qname; | %q.qname;" > <!ENTITY % InlPres.class "| %tt.qname; | %i.qname; | %b.qname; | %big.qname; | %small.qname; | %sub.qname; | %sup.qname; " > <!ENTITY % I18n.class "" > <!ENTITY % Anchor.class "| %a.qname;" > <!ENTITY % InlSpecial.class "| %img.qname; | %object.qname;" > <!ENTITY % InlForm.class "| %input.qname; | %select.qname; | %textarea.qname; | %label.qname;" > <!ENTITY % Inline.extra "" > <!ENTITY % Inline.class "%InlStruct.class; %InlPhras.class; %InlPres.class; %Anchor.class; %InlSpecial.class; %InlForm.class; %Inline.extra;" > <!ENTITY % InlNoAnchor.class "%InlStruct.class; %InlPhras.class; %InlPres.class; %InlSpecial.class; %InlForm.class; %Inline.extra;" > <!ENTITY % InlNoAnchor.mix "%InlNoAnchor.class; %Misc.class;" > <!ENTITY % Inline.mix "%Inline.class; %Misc.class;" > <!-- Block Elements .................................... --> <!ENTITY % Heading.class "%h1.qname; | %h2.qname; | %h3.qname; | %h4.qname; | %h5.qname; | %h6.qname;" > <!ENTITY % List.class "%ul.qname; | %ol.qname; | %dl.qname;" > <!ENTITY % Table.class "| %table.qname;" > <!ENTITY % Form.class "| %form.qname;" > <!ENTITY % BlkStruct.class "%p.qname; | %div.qname;" > <!ENTITY % BlkPhras.class "| %pre.qname; | %blockquote.qname; | %address.qname;" > <!ENTITY % BlkPres.class "| %hr.qname;" > <!ENTITY % BlkSpecial.class "%Table.class; %Form.class;" > <!ENTITY % Block.extra "" > <!ENTITY % Block.class "%BlkStruct.class; %BlkPhras.class; %BlkPres.class; %BlkSpecial.class; %Block.extra;" > <!ENTITY % Block.mix "%Heading.class; | %List.class; | %Block.class; %Misc.class;" > <!-- All Content Elements .............................. --> <!ENTITY % FlowNoTable.mix "%Heading.class; | %List.class; | %BlkStruct.class; %BlkPhras.class; %BlkPres.class; %Form.class; %Block.extra; | %Inline.class; %Misc.class;" > <!ENTITY % Flow.mix "%Heading.class; | %List.class; | %Block.class; | %Inline.class; %Misc.class;" > <!-- end of xhtml-print10-model-1.mod -->