XML Styling

Prince provides sensible default styling behaviour for several common XML vocabularies:

  • XHTML
    Prince styles XHTML documents by applying a default style sheet for formatting headings, paragraphs, tables, lists, inline elements and images. The default style sheet can be overridden or extended by user/author style sheets. (Note that Prince does not process HTML documents expressed in SGML or “tag soup” markup).

  • DocBook
    Prince styles DocBook documents by applying a default style sheet for formatting headings, paragraphs, tables, lists, inline elements and images. The default style sheet can be overridden or extended by user/author style sheets. (Note that Prince does not process DocBook documents expressed in SGML).

  • SVG
    Prince supports a rich subset of SVG 1.1, including basic shapes, paths, text and transformations. All svg elements are treated as replaced elements, similar to img elements in XHTML, and their content is rendered in a rectangular space. No line breaks or page breaks are made within an svg element. (Note that Prince does not support gradients, opacity or filters; see the SVG documentation for details of which elements are supported).

  • Any other XML
    No default style sheets will be used, so style sheets will need to be specified by the user or referenced from the document in order for Prince to apply style to the document.