Archive for the ‘XSLT’ Category

Received A Form Letter Response From National? Don’t be fooled..

Friday, February 20th, 2009

(crossposted from CreativeFreedom.org.nz)

Steve Mack has shared a form letter response from Simon Power that has surely been sent to hundreds of other people about the Guilt Upon Accusation law ‘Section 92A’. Hon Simon Power is now responsible for S92A and he could stop it but he is not doing so and now he is trying to distance National from it. This means we’re getting through. Read on to see the letter, and our analysis of how it’s false…

Steve Mack received this letter,

Dear Steve,

Thank you for your email regarding section 92A of the Copyright Act 1994, which comes into force on 28 February 2009. I have read and noted your concerns. I apologise for the time is has taken for me to, but I wanted to ensure you received the most up-to-date information.

The amendment to section 92 of the Copyright Act was passed through the House by the previous government. The new National-led government understands that many people are concerned about the effect of the legislation and we will monitor the implementation of section 92A closely.

This part of the response (which looks like a form letter and was surely sent to many people) is implying that they didn’t make this law.

Section 92A was supported by Judith Tizard (Labour) and Chris Finlayson (National).

Evidence of this can be found in who voted for it (every party aside from Greens and The Maori Party voted for it). Although United Future voted for it at the time they have now declared that they thought they were protecting artists but that they were wrong and that they are seeking to fix it.

When this was voted for it was National’s Chris Finlayson that supported Section 92A. Here’s a quote from parliamentary record by Chris Finlayson (National, Attorney General) saying why he supports S92A: It was due to “approaches by various commercial entities” (I’m not kidding, check the link)

However Simon Power is responsible for this now and he could stop it but he’s not. He’s taking a wait and see approach to S92A. This is irresponsible and poor leadership.

Remember that this letter is surely being sent to many people who will be fooled by it. If you have received this letter I suggest that you reply to these email addresses,

Please spread the word about this form letter because many people will be falsely convinced by it.

If you’re looking to write a letter you may find ideas here.

UPDATE: Many National MPs are now using this letter. Educate people about this by sending them to the Creative Freedom Foundation’s story on this.

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.