Update on our Web-based Legislative Editor

It’s been a while since my last blog post. I’ve been busy working on a number of activities. As a result, I have a lot of news to announce regarding the web-based editor, previously known as the AKN/Editor, that we originally built for the “Unhackathon” back in May.

As you might already have guessed, it has a new name. The new name is “LegisPro Web” which now more clearly identifies its role and relationship to Xcential’s XMetaL-based standalone editor “LegisPro”. Going forward, we will be migrating much of the functionality currently available in LegisPro into LegisPro Web.

Of course, there is now a new web address for the editor – http://legisproweb.com. As before, the editor prototype is freely available for you to explore at this address.

As I write this blog this early Sunday morning, I am in Ravenna, Italy where I just participated in the LEX Summer School 2012 put on by the University of Bologna. On Monday, the Akoma Ntoso Developer’s Workshop starts at the same venue. In addition to listening to the other developers present their work, I will be spending an afternoon presenting all the ins and outs of the LegisPro Web editor. I’m excited to have the opportunity to learn about the other developer’s experiences with Akoma Ntoso and to share my own experiences building a web-based XML editor.

Last month we demonstrated the LegisPro Web editor at the National Conference of State Legislators’s (NCSL) annual summit in Chicago this year. It was quite well received. I remain surprised at how much interest there is in an editor that is targetted to a tagging role rather than an editing role.

Of course, there has been a lot of development of the editor going on behind the scenes. I have been able to substantially improve the overall stability of the editor, its compliance with Akoma Ntoso, as well as add significant new functionality. As I become more and more comfortable and experienced with the new HTML5 APIs, I am starting to build up a good knowledge base of how best to take advantage of these exciting new capabilities. Particularly challenging for me has been learning how to intuitively work with the range selection mechanism. The origins of this mechanism are loosely related to the similar mechanism that is available within XMetaL. While I have used XMetaL’s ranges for the past decade, the HTML5 mechanisms are somewhat more sophisticated. This makes them correspondingly harder to master.

And perhaps the most exciting news of all is that the editor now has some customers. I’m not quite ready to announce who they are, but they do include a major government entity in a foreign country. As a result of this win, we will be further expanding our support of Akoma Ntoso to support Debate and Debate Reports in addition to the Bill and Act documents types we currently support. In addition, we will be adding substantial new capabilities which are desired by our new customers. I should also mention that Ari Hershowitz (@arihersh) has joined our team and will be taking the lead in delivering the customized solution to one of our customers.

Alongside all this development, work continues at the OASIS LegalDocumentML Technical Committee. Look to see me add support for the Amendment document type to the editor in support of this activity in the not- too-distant future.

All in all, I think we’re making terrific progress bringing the LegisPro Web editor to life. I started work on the editor as a simple idea a little more than six months ago. We used the “Unhackathon” in May to bootstrap it to life. Since then, it’s taken off all on its own and promises to become a major part of our plans to build a legitimate legal informatics industry around an Akoma Ntoso based standard.

Unhackathon Wrapup

Well, we had our “unhackathon” and it was, overall, a great success. We learned a lot, introduced a lot of people to the notion of XML markup and Akoma Ntoso, and made a number of important contacts all around. I hope that all the participants got something out of the experience. In San Francisco we were competing with a lovely Saturday afternoon and a street fair outside – which people chose to give up in order to attend our event.

At UC Hastings we had a special visit from State Senator Leland Yee of the 8th District which was most gratifying. He has been a strong proponent for government transparency and his surprise visit was awesome.

This was the first outing of the new AKN/Editor so I was quite nervous going in. Deciding to write an advanced editor, using brand new technologies, on all four browsers, and then planning an unmovable date just 10 weeks into the project is a little crazy now that I think about it. But the editor held up well for the most part. There were a number of glitches, but we were able to work around or fix most of them. The Akoma Ntoso model seemed to work overall, although there was a lot of the normal confusion over the hierarchical containment structure of XML. I did wish we could have made more progress with more jurisdictions and had been able to explore more of the redlining issues. But that was perhaps a bit too ambitious. I still want to find a venue to completely vet redlining as I believe that this is going to be the real challenge for Akoma Ntoso and I want to resolve them sooner rather than later.

On the entrepreneurial front, we did discover a potential market serving lonely males in the Middle East on Google Hangouts. We’ll leave that opportunity for someone else to exploit.

For me, trying to manage a room full of people, take care of editor issues, and keep in contact with the remotes sites and participants around the world was very overwhelming. If I missed your call or your question, please accept my apologies. My brain was simply overloading.

Going forward we are now starting to make plans for where to go from here. The LegalHacks.org website will remain intact and will even continue to develop. I’m going to refine the editor based on feedback and continue further development in the weeks and months to come. We hope that the site will continue to develop as a venue for legal informatics hacking. Also, preliminary work is now underway for a follow-on unhackathon in another part of the world. Look for an announcement soon!

Thank you to all the organizers – Charles Belle at UC Hastings, Pieter Gunst at Stanford Codex, Karen Sahuka in Denver (BillTrack 50). Thank you to Ari Hershowitz at Tabulaw for pulling it all together, Jim Harper from the Cato Institute for his opening words, Brad Chang of Xcential for being me at Stanford, Robert Richards for being our tireless word spreader, and a special thank you to Monica Palmirani and Fabio Vitali at the University of Bologna for participating from afar and for providing Monica’s videos.

An Interesting Idea for how to Rethink How we are Governed

This past weekend I came across this interesting block by Abe Voelker. GitLaw: GitHub for Laws and Legal Documents – a Tourniquet for American Liberty. The reaction he got was amazing and totally overwhelmed him.

It’s an interesting read – written by someone naive enough to actually have hope that we could fix our government by applying modern technology. Of course, those of us in the know realize how totally absurd his ideas are. The legislative process is meant to be out of reach the public citizen. It’s meant to keep the common people from meddling in how laws are made. Those people would use normal everyday language that everybody could understand. Too many eyes might spot all the wasteful earmarks tucked in the back corners of the legislation. How could the public be trusted to do a good job legislating the laws of the land? Isn’t that why we have Congress, after all? As Abe points out, Congress has a 14% approval rating. Could the people actually compete with that? Could the people do a better job than what 14% of the population currently think is a good job?

Our legislative processes are arcane and convoluted processes that make it far too difficult for anyone without the resources it takes to participate. These processes were designed at a time when communication with the people was achieved by sending messengers out on horseback. Today, within an instant of me posting this blog, it can be read by almost anyone anywhere on this planet. So why do we continue to govern ourselves by creating such a deliberate distance between the people and their government? Do we really still need to divide opinions into two failed ideologies? Can’t modern technologies allow us to manage more than two diametrically opposing positions on every issue? With our governments on the verge of bankruptcy and with their approval ratings well below a flunking grade, why is there not more urgency in reinventing how we are governed?

The technologies that have emerged in the past few years will be disruptive to how we are governed. While Abe’s ideas are a bit simplistic, they must make us take a step back and ask if there isn’t a better way to govern ourselves. The real question is whether our leaders will lead us into this new era or will they be the fly in the ointment. With a 14% approval rating one maybe shouldn’t expect too much.

If you want to make a difference and learn more about how laws could be made more open and transparent, consider attending our upcoming “unhackathon” events this coming weekend. Go to http://legalhacks.org for more information.

An HTML5-Based XML Editor for Legislation!

UPDATE: (May 17, 2012) For all the people that asked for more editing capabilities, I have updated the editor to provide rudimentary cut/copy/paste capabilities via the normal shortcut keys. More to follow as I get the cycles to refine the capabilities.

I’ve just released my mini-tutorial for the HTML5-based XML editor I am developing for drafting legislation (actually it’s best for tagging existing legislation at this point).


Please keep in mind that this editor is still very much in development – so its not fully functional and bug-free at this point. But I do believe in being open and sharing what I am working on. We will be using this editor at our upcoming International Legislation Unhackathons (http://legalhacks.org) this coming weekend. The editor is available to experiment with at legalhacks.org site.

There are three reason I think that this approach to building editors is important:

  1. The editor uses an open standard for storing legislative data. This is a huge development. The first couple generations of legislative systems were built upon totally proprietary data formats. That meant that all the data was locked into fully custom tools that were built years ago could only be understood by those systems. Those systems were very closed. That last decade was the development of the XML era of legislative tools. This made it possible to use off-the-shelf editors, repositories, and publishing tools. But the XML schemas that everyone used were still largely proprietary and that meant everyone still had to invest millions of dollars in semi-custom tools to produce a workable system. The cost and risk of this type of development still put the effort out of reach of many smaller legislative bodies.

    So now we’re moving to a new era, tools based on a common open standard. This makes it possible for an industry of plug-and-play tools to emerge, reducing the cost and risks for everyone. The editor I am showing uses Akoma Ntoso for its information model. While not yet a standard, it’s on a standards track at the OASIS Standards Consortium and has the best chance of emerging as the standard for legal documents.

  2. The editor is built upon open web standards. Today you have several choices when you build a legislative editor. First, you can build a full custom editor. That’s a bad idea in this day and age when there are so many existing editors to build upon. So that leaves you with the choice of building your editor atop a customizable XML editor or customizing the heck out of a word processor. Most XML editors are built with this type of customization in mind. They intrinsically understand XML and are very customizable. But they’re not the easiest tools to master – for either the developer or the end user. Another approach is to use a word processor and bend and distort it into being an XML editor. This is something well beyond the original intent of the word processor and dealing with the mismatch in mission statements for a word processor and a legislative drafting tool leaves open lots of room for issues in the resulting legislation.

    There is another problem as well with this approach. When you choose to customize an off-the-shelf application, you have to buy into the API that the tool vendor supplies. Chances are that API is proprietary and you have no guarantee that they won’t change it on a whim. So you end up with a large investment in software built on an application API that could become almost unrecognizable with the next major release. So while you hope that your investment should be good for 10-12 years, you might be in for a nasty surprise at a most inopportune time well before that.

    The editor I have built has taken a different approach. It is building upon W3C standards that are being built around HTML5. These APIs are standards, so they won’t change on a whim – they will be very long lived. If you don’t like a vendor and want to change, doing so is trivial. I’m not just saying this. The proof is in the pudding. This editor works on all four major browsers today! This isn’t just something I am planning to support in the future; it is something I already support. Even while the standards are still being refined, this editor already works with all the major browsers. (Opera is lagging behind in support for some of the application APIs I am using.) Can you do that with an application built on top of Microsoft Office? Do you want to switch to Open Office and have an application you built? You’re going to have to rewrite your application.

  3. Cloud-based computing is the future, Sure, this trend has been obvious for years, but the W3C finally recognizes the web-based application as being more than just a sophisticated website. That recognition is going to change computing forever. Whether your cloud is public or private, the future lies in web-based applications. Add to that the looming demands for more transparent government and open systems with facilitate real public participation and it becomes obvious that the era of the desktop application is over. The editor I am building anticipates this future.

  4. I’ve been giving a lot of thought to where this editor can go. As the standards mature, I learn to tame the APIs, and the browsers finish the work remaining for them, it seems that legislative drafting is only the tip of the iceberg for such an approach to XML-based editing. Other XML models such as DITA and XBRL might well be other areas worth exploring.

    What do you think? Let me know what ideas you have in this area.

Building a Web-Based Legislative Editor

I built the legislative drafting tool used by the Office of the Legislative Counsel in California. It was a long and arduous process and took several years to complete. Issues like redlining, page & line numbers, and the complexities of tables really turned an effort that, while looking quite simple at the surface, into a very difficult task. We used XMetaL as the base tool and customized it from there, developing what has to be the most sophisticated implementation of XMetaL out there. We even had to have a special API added to XMetaL to allow us to drive the change tracking mechanism to support the very specialized redlining needs one finds in legislation.

Using an XML editor allows one to develop a very precise and accurate solution. The price you pay is the rigidity imposed upon you by the XML structure enforced by the editor. We worked very hard to loosen up that rigidity by providing a rules-based system that allowed the user to work within some wiggle room relying the application to sense what was intended and produce the desired rigid structure that XML demands. Another approach, taken by many, is to use a word processor to generate the document, relying on styles or lightweight tagging in the word processor to guide an XML generator or transformer after-the-fact. This gives the drafter more flexibility, at the expense of the accuracy when the drafter deviates outside of the expected range of document patterns that the XML generator can handle.

I have often wondered if a web-based editor wouldn’t be a better approach, allowing us to achieve the flexibility the user needs with the rigidity that makes XML useful to downstream processing. In the end, the question has always been whether such an editor is even possible. When the Writely word processor (now Google Docs) came along in 2005, the answer seemed to be a tentative yes. Looking into it a little bit I discovered that while feasible, given all the browser incompatibilites of the time, achieving a worthwhile editor of the sophistication needed to draft and manage legislation would still be a daunting task. So the idea has always remained in the back of my mind waiting for browser technology to mature to the point where building such an editor comes within a shot of being a reasonable approach.

That point has now arrived. With HTML5, it is now possible to build a full fledged browser-based legislative editor. For the past few months I have been building a prototype legislative editor in HTML5 that uses Akoma Ntoso as its XML schema. The results have been most gratifying. Certainly, building such an editor is no easy task. Having been working in this subject for 10 years now I have all the issues well internalized and can navigate the difficulties that arise. But I have come a long way towards achieving the holy grail of legislative editors – a web-based, standards-based, browser-neutral solution.


There are a lot of challenges. Interacting with all the browser events to maintain an undo stack is no easy task. Building a change tracking mechanism from scratch gives me lots of freedom but getting your head around all the variations is bewildering at times. And how do you build something that is useful to multiple jurisdictions and is sufficiently flexible to adapt to all the varying needs? This takes a trick – but one I have thought long and hard about.

HTML5 is not yet a fully defined standard. None of the browsers fully support what is defined. The same can be said for CSS, JavaScript, XML Support, and on and on. But the editor I have built works with the latest version of all four major browsers. I don’t have a single CSS quirk at all. In fact, the only substantive browser incompatibility that I have had to deal with arises from the fact that Internet Explorer’s XML implementation pre-dates the standard in this area and the API does not yet match the full standards-based API. This is the case despite IE having been the pioneer in this area.

What’s more, I have achieved this with Akoma Ntoso as the internal XML schema. Akoma Ntoso is itself a proposed standard within OASIS. Certainly not everything has been smooth sailing and I have submitted a whole slew of issues to the drafters of Akoma Ntoso, but I have been able to find my way to a workable implementation. It works!

Our plan is to use this prototype for the Unhackathon at UC Hastings and Stanford Law School on May 19th and then in follow-on events elsewhere. In a few days I will provide a link to the prototype for everyone to try it out. It’s still early days and the editor is far from being a complete and robust tool suitable for production, but what I have now confirms my belief that the next generation of legislative systems will be web-based and built on open-standards.

In my next post I will provide a little mini-tutorial to set the stage for the upcoming pre-beta release.

Toward’s more Affordable Solutions in Legal Informatics – with Standards

Got six million dollars? That’s the ballpark figure for a complete legislative system and it is too much. A decade ago when the technologies were still new, the risks were high, and experience was scarce, the reasons for this were easily explained. But now it’s time to move beyond the early-adopter market towards a more mature, affordable, and predictable market for legislative systems. The key to moving to this new era is standards.

Towards this end I am participating as a member of the OASIS LegalDocML Technical Committee. Our charter is to develop a common standard for legal documents. We had our initial meeting in March and are defining our deliverables for this important mission.

The wide variety of legal systems and traditions ensures that there are never going to be off-the-shelf solutions in legislative systems. However, all the differences should not deter us from finding what we have in common. It is this commonality that provides the basis for the development of common applications that can be cost-effectively adapted to local requirements. Of course, to achieve this goal you need a common information model. The OASIS TC is using Akoma Ntoso as the starting point for this information model.

Akoma Ntoso Logo

Okay, so what is Akoma Ntoso? Akoma Ntoso is an XML schema developed at the University of Bologna and supported by Africa i-Parliaments, a project sponsored by United Nations Department of Economic and Social Affairs. It defines an XML-based information model for legislative documents. In the last few years it has been gaining traction in Europe, Africa, South America, and now slowly in North America as well.

Do you find the name Akoma Ntoso intimidating? Well, you’re not alone. However, it’s easy to say once you know how. Simply pronounce it as in “a-coma-in-tozo” and you’ll be close. Akoma Ntoso means “linked hearts” in the Akan language of West Africa.

If you find all the talk about XML confusing, then we have a solution for you. Through my company Xcential, I am working with Ari Hershowitz @arihersh of Tabulaw, Charles Belle @brainseedblog of UC Hastings, and Pieter Gunst @DigitalLawyer of Stanford and LawGives.org to host two “unhackathons” on May 19th at UC Hastings and at the Stanford Law School, both near San Francisco. The point of our unhackathons is to provide participants with an entry-level and fun introduction to the world of XML markup and Akoma Ntoso. And once we’re done with the May 19th events around San Francisco, we’re going to stage other events in other locations around the world to bring the same knowledge to a much wider audiance

If you would like to attend one of these events please sign up at the Eventbrite.com site and/or contact one of the organizers. And if you would like to host or participate in a virtual unhackathon in June, please let one of us know as well. We’re looking for volunteers.

Within the next week I will be posting a prototype of a new legislative editor for use at the unhackathon.  It’s an HTML5-based editor built entirely around Akoma Ntoso. While we don’t yet have any productization plans, this editor will demonstrate the coming era of cost-effective and standardized components which can be mixed and matched to produce the next generation of legal informatics solutions. Stay tuned…

International Open Standards Hackathon

An international open standard for legislative documents will be an important next step for making legislative information available to the people. An open standard will promote the creation of tools and services worldwide that will enable citizen participation in the legislative process and will enhance how governments make the laws they produce more transparent.

Today there is a great deal of inconsistency in how open participation and transparency are achieved around the world. Putting cultural and political differences aside, part of the reason for the inconsistency is the tremendous effort and cost involved in building the infrastructure to support these new objectives. An open standard will start to solve this problem by promoting the establishment of a real legal informatics industry of interoperable tools and services which can easily be put together to address whatever committment a government has made to open and transparent government.

Akoma Ntoso is an emerging standard the promises to do just this. It is an XML schema, developed by the University of Bologna in Italy. It was developed for Africa i-Parliaments, a project sponsored by United Nations Department of Economic and Social Affairs. In the coming weeks, an OASIS technical committee will begin the process of turning this standard into an international standard. I am a participant on that TC.

To further promote and to publicize Akoma Ntoso, I am working with Ari Hershowitz #arihersh to stage an international hackathon within the next few months. The idea is to provide an event for people that will demystify XML and Akoma Ntoso (yes, it is hard to say) by providing a really easy way for anyone to create a document using the proposed standard. Our goal will be to collect a world’s worth of legislative samples. This could be an important step towards building a library that stitches together all the world’s laws and regulations in an open and transparent way.

We’re currently seeking sponsors, participants, and venues for this hackathon. The interest we have found so far has been quite amazing. If you are interested in helping us make this event a success, please let either Ari or me know.

Follow

Get every new post delivered to your Inbox.

Join 76 other followers