This describes our Shakespeare Play Reader, which you can download from our website. It's an example of a viewer that is purpose-built for a specific document type.
The Shakespeare plays were marked up in SGML and placed in the public domain by Jon Bosak. Over the years they have been widely used for training exercises in SGML and XML. We built the Reader to provide a downloadable demo of Windows HTML Applications, and to show the power of XSL stylesheets. The 'Who-Said-It?' feature that lets you look up a word, phrase or even just a sequence of letters within the whole play is an impressive demonstration of what can be done using standard XSLT functionality, and shows off the high performance of Microsoft's implementation. Read about it here then download and try it!
|
To use this version of the Play Reader you must obtain the plays separately (instructions are provided) and put them into a folder. When you start the reader this folder is inspected using file system APIs - a privilege that is available to HTAs but not to normal web pages. (They can't access the local file system via script, because of browser security rules). The files are listed as shown at right. After files have been discovered they are opened to determine whether they are valid XML, and if so whether they are the document type used for the plays. |
![]() | |
|
When you select a play, the first screen shows the title, the scene-setting, and the list of Dramatis Personae. This screen can be recalled at any time using the 'DP' control. The navigator pane at upper left lists the Acts (including specials found in some plays, such as Prologues and Epilogues). |
![]() | |
|
You read the Play by selecting an Act, which immediately presents a list of scenes for the Act. Then click on a scene number, and it's instantly displayed in the viewer pane. Act and Scene location and timing details ("A street in Verona, the same evening, etc") often won't fit into the navigator panes at left. A control is provided to 'zoom' them into the viewer pane to expose the complete text. |
![]() | |
|
To use the 'Who-Said-It?' feature, enter the word or phrase and click 'Find in Play'. This delivers the listing at right, which provides act/scene location in play, complete text of the line in which the quote occurs, and name of the speaker. A hyperlink is generated for every line found. |
![]() | |
|
Click the hyperlink and the scene is displayed, positioned at the selected line which is highlighted in red. If any other matches occur in the scene that is displayed, these are highlighted in blue. |
![]() | |
It's all done by stylesheets, which are invoked by short sections of Javascript code that are the "onclick" actions for the controls.
Even the navigator panes for Acts and Scenes, with their lists of controls, are generated by stylesheets - which is how the descriptions get inserted. The Play Reader doesn't have to do any programmatic examination of the underlying play document.
About The Plays of Shakespeare in XML
Acknowledgements from Mark Haegele to my colleague in markup and sometime mentor in SGML - Albert Mispel, who wrote