PadML home / Specifications / PadML 1.0 specifiation sheet.

PadML 1.0
A formulation of photo albums metadata in XML.

Table of content :

  1. Introduction
    1. What is PadML ?
    2. PadML philosophy.
    3. Conventions used in this document.
  2. Specifications
    1. DTD and namespace.
    2. Generalities.
    3. Elements order.
    4. Elements specifications.
      1. padml element.
      2. album element.
      3. title element.
      4. description element.
      5. author element.
      6. generator element.
      7. date element.
      8. preview element.
      9. category element.
      10. rating element.
      11. users element.
      12. user element.
      13. settings element.
      14. setting element.
      15. bookmarks element.
      16. bookmark element.
      17. photos element.
      18. photo element.
      19. rights element.
      20. persons element.
      21. person element.
      22. keywords element.
      23. keyword element.
      24. comments element.
      25. comment element.
      26. place element.
      27. device element.
      28. exposure element.
      29. sound element.
      30. thumb element.
      31. image element.
      32. original element.
      33. blackandwhite element.
      34. sepia element.
      35. negative element.
      36. wbmp element.
      37. videos element.
      38. video element.
      39. sequence element.
      40. panoramas element.
      41. panorama element.
      42. scene element.
  3. Example files

1. Introduction

1.1. What is PadML ?

PadML stands for Photo album description Markup Language and is made to discribe photo albums. These photo albums can contain photos, sounds associated to a photo, panoramas, and even videos as most of digital cameras can record video sequences. Photo albums can also handle many useful related information such as title, description, authors, dates, comments, places, exposure information and keywords that give the ability to search for a photo in an album collection. PadML offers the ability to inform of different language alternatives for a given album, for example a photo can have its title in different languages.

1.2. PadML philosophy

Photo albums in PadML are actually the equivalent of album books in the computer world by providing the ability to gather your photos and to associate them extra information like you would do when writing on the back of a printed photo.

PadML is XML based (eXtensible Markup Language), and can be therefore manipulated within any programming language using XML tools such as SAX parsers, DOM or XSLT.

PadML intends to provide a secure way to archive your digital photo albums thanks to the XML format that relies on a textual representation of the information and that is W3C standard well supported world-wide.

1.3 Convention used in this document

Along this document, elements are declared to be one of these three types :

2. Specifications

2.1. DTD and namespace

The document type declaration (DTD) of PadML is available here.

Reserved namespace for PadML names is pad.

Every PadML documents should begin with :
<?xml version="1.0" encoding="your_encoding"?>
<!DOCTYPE padml PUBLIC "-//PadML org//DTD PADML 1.0//EN" "http://padml.davidmartineau.net/DTDs/PadML-1.0.dtd">
<padml version="1.0" xmlns="http://padml.davidmartineau.net/" xmlns:xml="http://www.w3.org/">

2.2. Generalities

PadML has been designed to be easily human-readable, that's why it's using various element and attribute names rather than a few names that only make a sense according to the place they are. PadML has also been designed to be quite compact, hence some elements can have many attributes rather than many children elements.

As PadML is XML based, formatting rules of XML apply, excepted that fully empty elements (with no attributes and no character data) are not permitted, for example <element /> is not permitted as it doen't provide any information in PadML.

2.3. Elements order

Elements in PadML documents should flow in the following order. Elements having the same name in a same parent node have to be preferably gathered to eachother.

2.4. Elements specifications

2.4.1 <padml> element

name : padml

about : padml element is the root element of every PadML documents.

type : complex.

occurence : once.

parents : none, is root.

children : album, users, user.

attributes :
name : version
value : 1.0
presence : required.

2.4.2 <album> element

name : album

about : is a container for an album related elements.

type : complex.

occurence : several, but with different ID attribute values.

parents : padml

children : title, description, author, generator, date, preview, category, users, photos, videos.

attributes :
name : id
value : int
presence : optional if album element occurs only once in a document, else required.

2.4.3 <title> element

name : title

about : gives a title to its parent element, therefore an album title, a photo title or a video title.

type : complete.

occurence : several, but with different xml:lang attribute values.

parents : album, photo, video.

CData : the title text.

attributes :
name : xml:lang
value : string
presence : optional if title element occurs only once in the same parent element.

2.4.4 <description> element

name : description

about : gives a description to its parent element, therefore an album description, a photo description or a video description.

type : complete.

occurence : several, but with different xml:lang attribute values.

parents : album, photo, video.

CData : the description text.

attributes :
name : xml:lang
value : string
presence : optional if description element occurs only once in the same parent element.

2.4.5 <author> element

name : author

about : precises author of its parent element, therefore an album author, a photo author or a video author.

type : complete.

occurence : once.

parents : album, photo, video.

CData : author's full name.

attributes :
name : about
value : author's user identifier, intend to be used in the scope of a PadML user agent.
presence : optional.

name : uri
value : uri of author's PadML user file, intend to be used in the scope of a PadML user agent.
presence : optional.

name : name
value : string
presence : optional.

name : surname
value : string
presence : optional.

surname : email
value : an email address.
presence : optional.

name : web
value : uri of author's web site.
presence : optional.

name : aim
value : string
presence : optional.

name : icq
value : string
presence : optional.

name : msn
value : string
presence : optional.

name : yahoo
value : string
presence : optional.

name : jabber
value : string
presence : optional.

name : gadu
value : string
presence : optional.

name : pgp
value : pgp key
presence : optional.

name : address
value : address string
presence : optional.

name : phone
value : phone number
presence : optional.

name : vcard
value : uri of vCard file
presence : optional.

2.4.6 <generator> element

name : generator

about : generator of the current album, i.e the software that outputed the PadML file.

type : complete.

occurence : once.

parents : album.

attributes : none

2.4.7 <date> element

name : date

about : date of the parent element.

type : complete.

occurence : once with the same event attribute value.

parents : album, photo, video, panorama.

CData : the date formated according to the stamp attribute value

attributes :
name : stamp
value : representation of the date format, default is DD-MM-YYYY hh:mm:ss
presence : optional.

name : event
value : generated, modified or archived.
presence : optional.

2.4.8 <preview> element

name : preview

about : gives a preview photo of current album.

type : empty.

occurence : once.

parents : album.

attributes :
name : about
value : preview photo identifier.
presence : required.

2.4.9 <category> element

name : category

about : gives a category of current album trought its ID attribute value in order to enable user agent to sort albums by category. It's also possible to specify localised category names by adding one or more category elements with different xml:lang attribute values.

type : complete OR empty

occurence : several with different xml:lang attribute values (then is of complete type) AND once with an ID attribute (then is of empty type)

parents : album.

attributes :
name : id
value : identifier of the caterory
presence : required for the first category element, fobidden for following category elements.

name : xml:lang
value : string
presence : fobidden for the first category element, required for following category elements.

2.4.10 <rating> element

name : rating

about : adds a rating of current album, media or comment.

type : empty

occurence : once in a same parent element.

parents : album, photo, video, panorama, comment.

attributes :
name : score
value : the rate
presence : required.

name : scale
value : maximum value that rate can reach.
presence : required.

2.4.11 <users> element

name : users

about : container element for user elements. user element and its children elements are usualy used internaly by a user agent in separated files.

type : complex

occurence : once.

parents : album.

children : user.

attributes : none

2.4.12 <user> element

name : user

about : declare user and/or set album permissions using only ID attribute or only group attribute.

type : complex

occurence : several but with diffrent ID attribute values.

parents : users.

children : settings, bookmarks.

attributes :
name : id
value : identifier of the user
presence : required for user declaration, optional for album permission.

name : group
value : group the user
presence : required for user declaration, optional for album permission.

name : pass
value : user password, intend to be crypted.
presence : required for user declaration.

name : uri
value : uri that points to a user declaration
presence : replace any other attribute if present

name : name
value : string
presence : optional.

name : surname
value : string
presence : optional.

name : nickname
value : string
presence : optional.

name : email
value : email address.
presence : optional.

name : web
value : uri of author's web site.
presence : optional.

name : aim
value : string
presence : optional.

name : icq
value : string
presence : optional.

name : msn
value : string
presence : optional.

name : yahoo
value : string
presence : optional.

name : jabber
value : string
presence : optional.

name : gadu
value : string
presence : optional.

name : pgp
value : pgp key
presence : optional.

name : address
value : address string
presence : optional.

name : phone
value : phone number
presence : optional.

name : vcard
value : uri of vCard file
presence : optional.

2.4.13 <settings> element

name : settings

about : container element for setting elements, usualy used internaly by a user agent.

type : complex

occurence : once.

parent : user.

children : setting.

attributes : none

2.4.14 <setting> element

name : setting

about : specify a user setting, usualy used internaly by a user agent.

type : empty

occurence : once.

parent : settings.

attributes :
name : domain
value : string
presence : optional.

name : variable
value : string
presence : optional.

name : value
value : any
presence : optional.

name : mode
value : any
presence : optional.

2.4.15 <bookmarks> element

name : bookmarks

about : container element for bookmark elements, usualy used internaly by a user agent.

type : complex

occurence : once.

parent : user.

children : bookmark.

attributes : none

2.4.16 <bookmark> element

name : bookmark

about : specify a user bookmark.

type : empty

occurence : several.

parent : bookmarks.

attributes :
name : directory
value : string
presence : optional.

name : package
value : string
presence : optional.

name : album
value : string
presence : required.

name : photo
value : string
presence : required.

2.4.17 <photos> element

name : photos

about : container element for photo elements.

type : complex

occurence : once.

parent : album.

children : photo.

attributes : none

2.4.18 <photo> element

name : photo

about : container for photo related elements.

type : complex.

occurence : several with different ID attribute values.

parent : photos.

children : title, description, author, rights, date, persons, keywords, comments, place, device, exposure, thumb, image, original, blackandwhite, sepia, negative, wbmp.

attributes :
name : id
value : string
presence : required.

2.4.19 <rights> element

name : rights

about : specify copyrights of the concerned photo.

type : empty.

occurence : once.

parent : photo.

CData : the rights text.

attributes : none.

2.4.20 <persons> element

name : persons

about : container element for person elements.

type : complex

occurence : once.

parent : photo.

children : person.

attributes : none

2.4.21 <person> element

name : person

about : tells person visible on the concerned photo.

type : empty

occurence : several.

parent : persons.

CData : person's name.

attributes : none.

2.4.22 <keywords> element

name : keywords

about : container element for keyword elements.

type : complex

occurence : once.

parent : photo.

children : keyword.

attributes : none

2.4.23 <keyword> element

name : keyword

about : specify a keyword on the concerned photo.

type : empty

occurence : several.

parent : keywords.

CData : the keyword.

attributes :
name : xml:lang
value : string
presence : optional.

2.4.24 <comments> element

name : comments

about : container element for comment elements.

type : complex.

occurence : once.

parent : photo, video, panorama.

children : comment.

attributes : none

2.4.25 <comment> element

name : comment

about : specify a comment on the concerned photo.

type : complex

occurence : several.

parent : comments.

children : title, author, description.

attributes :
name : id
value : string
presence : optional.

name : uri
value : uri of the comment
presence : optional.

2.4.26 <place> element

name : place

about : specify the place where the concerned photo has been taken.

type : empty.

occurence : once.

parent : photo.

CData : place's name or description

attributes :
name : situation
value : indoor, outdoor, night, subwater, skyview, space.
presence : optional.

name : location
value : string
presence : optional.

name : code
value : string
presence : optional.

name : city
value : string
presence : optional.

name : state
value : string
presence : optional.

name : country
value : string
presence : optional.

name : latitude
value : string
presence : optional.

name : longitude
value : string
presence : optional.

name : altitude
value : string
presence : optional.

name : gmt
value : GMT time area
presence : optional.

2.4.27 <device> element

name : comment

about : specify what device took the concerned photo.

type : empty.

occurence : once.

parent : photo.

attributes :
name : make
value : string
presence : optional.

name : model
value : string
presence : optional.

2.4.28 <exposure> element

name : exposure

about : specify exposure information of the concerned photo.

type : empty.

occurence : once.

parent : photo.

attributes :
name : orientation
value : string
presence : optional.

name : bias
value : string
presence : optional.

name : program
value : string
presence : optional.

name : time
value : string
presence : optional.

name : fnumber
value : string
presence : optional.

name : flash
value : string
presence : optional.

name : focal
value : string
presence : optional.

name : iso
value : string
presence : optional.

name : lightsource
value : string
presence : optional.

name : maximumaperture
value : string
presence : optional.

name : meteringmode
value : string
presence : optional.

2.4.29 <sound> element

name : sound

about : some digital camera allow to add a recorded sound to a photo.

type : empty.

occurence : once.

parent : photo.

attributes :
name : uri
value : string
presence : optional.

name : type
value : string
presence : optional.

name : duration
value : string
presence : optional.

name : channels
value : string
presence : optional.

name : codec
value : string
presence : optional.

name : size
value : string
presence : optional.

2.4.30 <thumb> element

name : thumb

about : thumb picture of the concerned photo.

type : empty.

occurence : once.

parent : photo.

attributes :

name : uri
value : string
presence : optional.

name : type
value : string
presence : optional.

name : height
value : string
presence : optional.

name : width
value : string
presence : optional.

name : size
value : string
presence : optional.

2.4.31 <image> element

name : image

about : image picture of the concerned photo.

type : empty.

occurence : once.

parent : photo.

attributes :

name : uri
value : string
presence : optional.

name : type
value : string
presence : optional.

name : height
value : string
presence : optional.

name : width
value : string
presence : optional.

name : size
value : string
presence : optional.

2.4.32 <original> element

name : original

about : original picture of the concerned photo.

type : empty.

occurence : once.

parent : photo.

attributes :

name : uri
value : string
presence : optional.

name : type
value : string
presence : optional.

name : height
value : string
presence : optional.

name : width
value : string
presence : optional.

name : size
value : string
presence : optional.

2.4.33 <blackandwhite> element

name : blackandwhite

about : blackandwhite picture of the concerned photo.

type : empty.

occurence : once.

parent : photo.

attributes :

name : uri
value : string
presence : optional.

name : type
value : string
presence : optional.

name : height
value : string
presence : optional.

name : width
value : string
presence : optional.

name : size
value : string
presence : optional.

2.4.34 <sepia> element

name : sepia

about : sepia picture of the concerned photo.

type : empty.

occurence : once.

parent : photo.

attributes :

name : uri
value : string
presence : optional.

name : type
value : string
presence : optional.

name : height
value : string
presence : optional.

name : width
value : string
presence : optional.

name : size
value : string
presence : optional.

2.4.35 <negative> element

name : negative

about : negative picture of the concerned photo.

type : empty.

occurence : once.

parent : photo.

attributes :

name : uri
value : string
presence : optional.

name : type
value : string
presence : optional.

name : height
value : string
presence : optional.

name : width
value : string
presence : optional.

name : size
value : string
presence : optional.

2.4.36 <wbmp> element

name : wbmp

about : wbmp picture of the concerned photo (used for wap).

type : empty.

occurence : once.

parent : photo.

attributes :

name : uri
value : string
presence : optional.

name : type
value : string
presence : optional.

name : height
value : string
presence : optional.

name : width
value : string
presence : optional.

name : size
value : string
presence : optional.

2.4.37 <videos> element

name : videos

about : container element for video elements.

type : complex.

occurence : once.

parent : album.

children : photo.

attributes : none

2.4.38 <video> element

name : video

about : container for video related elements.

type : complex.

occurence : several with different ID attribute values.

parent : videos.

children : title, description, author, rights, date, persons, keywords, comments, place, device, exposure, thumb, sequence.

attributes :
name : id
value : string
presence : required.

2.4.39 <sequence> element

name : sequence

about : sequence of the concerned video.

type : empty.

occurence : once.

parent : video.

attributes :

name : uri
value : string
presence : optional.

name : type
value : string
presence : optional.

name : height
value : string
presence : optional.

name : width
value : string
presence : optional.

name : size
value : string
presence : optional.

name : channels
value : stereo, mono.
presence : optional.

name : audiocodec
value : string
presence : optional.

name : videocodec
value : string
presence : optional.

2.4.40 <panoramas> element

name : panoramas

about : container element for panorama elements.

type : complex.

occurence : once.

parent : album.

children : panorama.

attributes : none

2.4.41 <panorama> element

name : panorama

about : container for panorama related elements.

type : complex.

occurence : several with different ID attribute values.

parent : panoramas.

children : title, description, author, rights, date, persons, keywords, comments, place, device, exposure, thumb, scene.

attributes :
name : id
value : string
presence : required.

2.4.42 <scene> element

name : scene

about : scene of the concerned panorama.

type : empty.

occurence : once.

parent : panorama.

attributes :

name : uri
value : string
presence : optional.

name : type
value : string
presence : optional.

name : height
value : string
presence : optional.

name : width
value : string
presence : optional.

name : size
value : string
presence : optional.

3. Example files

Several examples of PadML documents :


PadML 1.0, � David Martineau. Last edited on November 26, 2004.

Creative Commons License
PadML 1.0 specification sheet is made available under an Attribution-NoDerivs Creative Commons license.