XBook - Authoring Photo Albums (album.dtd)

Author: Just van den Broecke
Organization: Just Objects B.V.
Email: just@justobjects.nl

FileID: $Id: authoring-album.xml,v 1.4 2003/01/06 10:28:08 just Exp $
Date: July 8, 2002

This document describes how to author documentation using album.dtd provided with XBook. This DTD can be used to author a photo album. THIS ENTIRE DOCUMENT IS WORK IN PROGRESS


1. Overview

The album.dtd is intended to quickly organize your digital images into a navigatable/indexed set of webpages. Basically you only need to document a file name and a title for each image. When an album is generated through xdoc an overview page with thumbnails is generated plus a page per photo. When you integrate multiple albums into an xbook file you can publish your entire photo collection online. Best start is to look at some examples.

See an examples at www.justobjects.org/amelot, www.mereljulie.com and the test/album directory.

Power users may immediately go to the DTD definition.

2. Full Example

This example is the file test/album/myalbum.xml. See the result in test/album/myalbum.html

1: <?xml version="1.0" encoding="UTF-8"?> 2: <!DOCTYPE album SYSTEM "nl/justobjects/xbook/rsc/dtd/album.dtd" > 3: 4: <album> 5: 6: <cover> 7: <title>Image Album test</title> 8: <author>Just van den Broecke</author> 9: <date>November-1-2002</date> 10: 11: <description> 12: This is a description of what is in the album. 13: </description> 14: </cover> 15: 16: <images> 17: <image title="Image1" file="assets/image1.jpg" /> 18: <image title="Image2" file="assets/image2.jpg" /> 19: <image title="Image3" file="assets/image3.jpg" /> 20: <image title="Image4" file="assets/image4.jpg" /> 21: <image title="Image5" file="assets/image5.jpg" /> 22: </images> 23: </album>

3. DTD Definition

Below is the actual DTD file.

1: <?xml version="1.0" encoding="UTF-8"?> 2: 3: <!-- 4: DTD for simple photo album. 5: 6: $Author: just $ 7: $Id: album.dtd,v 1.4 2003/01/06 10:27:22 just Exp $ 8: 9: --> 10: 11: <!ENTITY % ATEXT "CDATA"> 12: <!ENTITY % CTEXT "#PCDATA"> 13: 14: <!-- The top-level --> 15: <!ELEMENT album (cover,images)> 16: 17: <!-- Info matter --> 18: <!ELEMENT cover (title,author?,date?,description?)> 19: 20: <!ELEMENT title (%CTEXT;)> 21: <!ELEMENT author (%CTEXT;)> 22: <!ELEMENT date (%CTEXT;)> 23: <!ELEMENT description (%CTEXT;)> 24: 25: 26: <!-- The Images --> 27: <!ELEMENT images (image)+> 28: 29: <!-- Single image --> 30: <!ELEMENT image EMPTY> 31: <!ATTLIST image 32: file %ATEXT; #REQUIRED 33: title %ATEXT; #REQUIRED> 34: 35: <!-- 36: $Log: album.dtd,v $ 37: Revision 1.4 2003/01/06 10:27:22 just 38: removed Arial fonts from default styles 39: 40: Revision 1.3 2002/07/09 11:54:14 just 41: only comments and moving Log section to end of document. 42: 43: Revision 1.2 2002/04/22 20:32:51 just 44: updates 45: 46: Revision 1.1 2002/04/18 23:26:08 just 47: no message 48: -->

References

[W3C]
World Wide Web Consortium. http://www.w3c.org
[W3C-XML]
World Wide Web Consortium. Extensible Markup Language (XML) 1.0. W3C Recommendation; http://www.w3.org/TR/1998/REC-xml-19980210