PadML home / Specifications / PadML 1.0 specifiation sheet.
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.
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.
Along this document, elements are declared to be one of these three types :
<element attr1="val1" attr2="val2"/>
<element attr="val">some CData</element>
<element attr="val"><other>some CData</other></element>
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/">
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.
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.
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.
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.
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.
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.
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.
about : generator of the current album, i.e the software that outputed the PadML file.
type : complete.
occurence : once.
parents : album.
attributes : none
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.
about : gives a preview photo of current album.
type : empty.
occurence : once.
parents : album.
attributes :
name : about
value : preview photo identifier.
presence : required.
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.
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.
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.
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
about : declare user and/or set album permissions using only ID attribute or only group attribute.
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.
about : container element for setting elements, usualy used internaly by a user agent.
type : complex
occurence : once.
parent : user.
children : setting.
attributes : none
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.
about : container element for bookmark elements, usualy used internaly by a user agent.
type : complex
occurence : once.
parent : user.
children : bookmark.
attributes : none
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.
about : container element for photo elements.
type : complex
occurence : once.
parent : album.
children : photo.
attributes : none
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.
about : specify copyrights of the concerned photo.
type : empty.
occurence : once.
parent : photo.
CData : the rights text.
attributes : none.
about : container element for person elements.
occurence : once.
parent : photo.
children : person.
attributes : none
about : tells person visible on the concerned photo.
type : empty
occurence : several.
parent : persons.
CData : person's name.
attributes : none.
about : container element for keyword elements.
type : complex
occurence : once.
parent : photo.
children : keyword.
attributes : none
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.
about : container element for comment elements.
type : complex.
occurence : once.
parent : photo, video, panorama.
children : comment.
attributes : none
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
about : container element for video elements.
type : complex.
occurence : once.
parent : album.
children : photo.
attributes : none
about : container for video related elements.
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.
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.
about : container element for panorama elements.
type : complex.
occurence : once.
parent : album.
children : panorama.
attributes : none
about : container for panorama related elements.
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.
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.
Several examples of PadML documents :