Skip Navigation

Sign Up

If you sign up for an account on this web site you can customise elements of this site and subscribe to an email newsletter.

If you have an account on this web site you may login.

If you have an account on this site but have forgotten your user name and / or your password then you can request an account reminder email.

Structured Document Templates

This query came to us by email.

Is it possible to define structured document templates with MKDoc? In other words, is it possible to create a template that contains form fields for data entry that will preserve the structure of the data and allow it to be stored in a database or marked up in a custom XML format?

MKDoc's atomic level of information is called a component. There are several types of components: HTML, Text, Photos, Images, RSS, Headlines, Links, and even IMAP based discussion forums.

At the moment any MKDoc page can have any number of different components in any order.

While MKDoc pages are only semi-structured, components can be extremely strict and have as many validation rules as required. So it seems to me that what you want is to create a custom MKDoc component with its own template, validation rules.

It appears that your system generally treats content in terms of pages. However, we're interested in the possibility of handling content in a manner that allows users to define a particular structure for representing data in order to ensure that content can be exchanged across a number of systems using open standards.

In MKDoc every page and every component has a default URI.

MKDoc is designed so that it is possible to write plugins which override the default URI or offer alternate views.

For example in MKDoc when you create a photo component, the following addresses all work (providing you named your photo 'photo'):

  • /foo/photo.jpg,small (thumbnail)
  • /foo/photo.jpg,scaled (scaled version of the photo)
  • /foo/photo.jpg (photo at full resolution)
  • /foo/photo.jpg,html (HTML page with photo metadat displaying photo.jpg,scaled)

You could use the same system for your structured components. If you had three XML exchange formats to support (say, 'foo 1.0', 'bar 2.0' and 'baz 0.99') you could extend MKDoc so that a structured component living at the address:

/hello/world

Could also have the alternate views

  • /hello/world,foo-1-0.xml
  • /hello/world,bar-2-0.xml
  • /hello/world,baz-0-99.xml

Thanks for your help.

You're welcome. If MKDoc doesn't support the features you need out-of-the box, and if you are familiar with object oriented Perl you could write a custom MKDoc component with its own validation rules and a few custom plugins which would provide the alternate views you need.

Of course you have a specification we could write the custom components for you for a price.

Also note that by default MKDoc exports dubling core metadata as RDF and also exports various RSS 1.00 feeds.

Jean-Michel

Up

This document was last modified by Adam Moran on 2003-11-21 04:45:47
MKDoc Ltd., 31 Psalter Lane, Sheffield, S11 8YL, UK.
Copyright © 2001-2005 MKDoc Ltd.