Archive for the ‘XML Frameworks’ Category

RadioNZ talk on Guilt Upon Accusation Laws in NZ

Tuesday, February 10th, 2009

(crossposted from CreativeFreedom.org.nz)

This morning RadioNZ covered Section 92A (mp3) and how no other nation has tried to punish with internet disconnection before a trial and before any evidence has been held up to court scrutiny. Germany said these laws were ‘unfit for Germany, unfit for Europe’, the UK rejected them due to “impracticalities and complexities” and the EU rejected them saying that they were against “a fair balance between various fundamental rights”. National’s Steven Joyce and Chris Finlayson are leading the international charge.

Heading Towards The Next Release

Friday, June 6th, 2008

Docvert.org is some open source software that I’ve been working on now for 4 years. It lets you convert Word files to HTML and theme the pages exactly how you want. I guess it’s comparable to HtmlTransit, only it’s open source, free, and standards-based. It can also turn webpages into word processing files (effectively going back the other way).

After a lot of work the release candidate of the new release is out with these changes…

  • A 3x (at least) speed improvement when you switch to the new “PyODConverter with OOo Server” system
    • “OpenOffice.org Stand-alone” is now deprecated (it’s still there and it works but I suggest you move to “PyODConverter with OOo Server” NOW).
  • The interface can now be shown in English or French (thanks to François Marier for the translations!).
  • Post-conversion editor improvements for bad PHP XSL libraries. If editing complex documents didn’t work for you before then try again.
  • Support for preformatted text in DocBook and HTML.
  • And of course lots of bug fixes and changes

…and some packaging requirements for getting Docvert into Debian/Ubuntu.

Bear Patrol

Monday, November 26th, 2007

html-version.png

xul-version.png

Now the more credulous amongst you are probably thinking “My god, bears are attacking Matthew’s screen!” but before you rush in to save me I’d like to explain these images. These two screenshots demonstrate the same menu being displayed as XHTML and then as XUL (respectively). The XHTML version comprises of XHTML+JavaScript whereas the XUL version creates native toolbar widgets across the top of the page. This is produced with an XML Pipeline Processor based around XML, filter plugins, and XSLT. These XML Pipelines (a.k.a. XML chains) are comparable to specialised Unix Pipes:

“A set of processes chained by their standard streams, so that the output of each process feeds directly as input of the next one. Filter programs are often used in this configuration. The concept was invented by Douglas McIlroy for Unix shells and it was named by analogy to a physical pipeline.”
- Wikipedia

Source data is generated (typically by reading a file) and this is passed through a series of conversion stages (XSLT or STX) and the end result is whatever remains. Much like Unix Pipes themselves much of the value of XML Pipelines comes from having discrete components that are easily composed into more complex conversion chains.

xml-pipeline.png

(thanks to Apache Cocoon for the image)

XML Pipelines are a popular approach to multi-format publishing and they’re a natural fit to the problem of HTML abstraction as discussed in the previous blog post.

Introducing, PilferPage…

PilferPage will be a series of XML Pipelines and XSLT/STX stylesheets that convert an abstract page definition into HTML4, HTML5, RSS, Atom, XSL-FO, XUL, XAML, Flash/Flex, JSON (for serializing data), and so on.

There are a couple of benefits to the XML Pipeline approach,

  • Any modern language can benefit from them (the abstraction doesn’t favour Python, Ruby, PHP, C#…);
  • This would also allow any existing framework to change their output to be PilferPage, and then benefit from the abstraction;
  • XML is a natural fit for GUIs, as shown by modern GUI languages such as HTML5, XAML, XUL, Glade(GTK). Semi-structured data suits markup, and markup makes the relationship between components more clearly expressed through node hierarchy.
  • Many developers already know XSLT.

So, in the coming weeks I’ll start opening up for debate the design of PilferPage. We’ll try to talk about commonalities between all the formats and see about writing XSLT that will convert PilferPage to these formats.

“Change happens and nothing prepares you better than having your gooey in XML than tied to one vendor’s GUI API in a single language be it Java, C# or whatever else comes along. If the DTD/schema changes you can use XSLT to automatically convert old XUL files to new ones.”
- LUXOR Interview

XML GUIs marginalize the “single language” in the same way that databases marginalize the languages reading from them by abstracting data. This PilferPage abstraction does mean coding to an open standard (it will be open source) but with XSLT that allows developers to leave – to any of the output formats – they shouldn’t feel captive or as if they’re coding in a proprietary environment.

In the next post, we’ll talk about commonalities in page layout (3 columns + header/footer or something more flexible?).

Update (2nd December): Why the name PilferPage? It’s a tedious story, so skip ahead to the next paragraph for the short version. In 2002 I started some weblog software called PHPilfer which was named after some misinformative speeches by Microsoft’s Steve Balmer about how open source was intellectual property theft (he was referring to the propagating nature of the GPL). The name PHPilfer was about ridiculing the notion that any license could cause infringement of intellectual property, or that Open Source was any more “infectious” than proprietary software (try selling a modified Microsoft Office and see whether the copyright holder asserts their license rights to restrict your modifications, for example). PHPilfer was easy to administer, entirely themeable, had pretty URLs, and MetaFilter took some ideas from it. Ultimately though it was mediocre software and I stopped writing PHPilfer in 2004, which was a pity because I liked the name.

PilferPage is about straddling a useful subset of many UI languages and building upon their shared commonalities. It should be about taking the best ideas and reusing common knowledge about good UI XML design. So, again, the name PilferPage is a joke about IP only this time it’s about pointing out the overlap between UI languages, how they’re stealing from each other, and how we’re going to do that too.