I'd like to extend Scribus using Python, not just automate things with it...
Currently, that's not really possible. There is work on making it possible to extend Scribus with Python to some extent, especially the GUI. It's now possible to use PyQt to write your own palettes, but you won't be able to use custom Scribus widgets or get into the innards of the application. The Scribus core is unfortunately not well suited to extension from Python. More advanced or tightly integrated extensions are probably better written as C++ plug-ins.
# Introductions to several of the Apache Foundation’s hottest projects, including Xerces, Axis, and Xindice
# Building XML–driven websites using the popular Cocoon project
# Transforming XML–based documents into a variety of formats, including PDF, SVG, and PS, using the Formatting Objects Processor (FOP) project
This matches Elems with one child. :)
If you want to match any number of children, replace the last "_" with "_*" . All part of the magic of unapplySeq. :)
CSSToXSLFO is a utility which can convert an XML document, together with a CSS2 style sheet, into an XSL-FO document, which can then be converted into PDF, PostScript, etc. with an XSL-FO-processor. It has special support for the XHTML vocabulary, because that is the most obvious language it would be used for. The tool has a number of page-related extensions. It also comes with an API in the form of an XML filter.
I would strongly advise not to inherit from a case class. It has surprising effects on equals and hashCode, and has been deprecated in Scala 2.8.
Instead, define x in a trait or an abstract class.
scala> trait A { val x: Int }
defined trait A
scala> case class B(val x: Int, y: Int) extends A
defined class B
http://www.scala-lang.org/node/3289
http://www.scala-lang.org/node/1582