Cooking with XML and LROs
Using XML and PHP to Combine Reusable Learning Objects

NOTE: The PHP files for the two Recipes pages are not currently hosted on a server that parses PHP. The links to the recipes in the left menu go to screen shots of the resulting output pages. Links to the individual original files are listed below.

About This Site

This project demonstrates how Extensible Markup Language (XML) technology can be used to combine Reusable Learning Objects (RLOs), and to single-source elements that are common to more than one page. The viewer should be familiar with basic XML technology principles.

Reusable Learning Objects

Organizations are moving more and more toward producing courses and lessons for education and training that can be easily reused and shared with others. Recently a great deal of interest has been focused on the technology of Reusable Learning Objects (RLOs).

Definitions of RLOs vary widely. David A. Wiley (2000) has defined a learning object as "any digital resource that can be reused to support learning." His definition includes "anything that can be delivered across the network on demand, be it large or small. Examples of smaller reusable digital resources include digital images or photos, live data feeds (like stock tickers), live or prerecorded video or audio snippets, small bits of text, animations, and smaller web-delivered applications, like a Java calculator. Examples of larger reusable digital resources include entire web pages that combine text, images and other media or applications to deliver complete experiences, such as a complete instructional event."

RLOs are meant to be used in Learning Management Systems (LMSs) and/or Learning Content Management Systems (LCMSs), which help organizations to tag, catalog, store, combine and share them. There are also a number of online repositories for learning objects, to help make them widely available to others. There is a need for learning object technology specifications and requirements to be internationally standardized, so that they can be universally used. An important specification that is currently being developed to help standardize learning object technology is Shareable Content Object Reference Model (SCORM).

Example Web Pages

For this project, small RLOs (text and graphics files) are used to produce a larger RLO (the Web pages for this project, including this page). Click this link to see a Flow Chart diagramming how the site is constructed.

By clicking on the recipe links, you will see two recipes; one for Sour Cream Pumpkin Pie and another for Brown Sugar Pecan Pie. They pages shown in the screen shots were built using a collection of text and graphics files, some shared on both recipe pages and others unique to each recipe page. The files that are shared on both pages are single-sourced; they only exist once and are called for each page as it displays, using the XSL and XML files.

Each of the files in the table below are individual RLOs that comprise the recipe pages. The table explains what each file is, and how it is used to create the recipe pages.

Text Files Used Description
rlo.css Both Cascading Style Sheet file for background and text colors.
rlo.xsl Both Extensible Style Language file as basic shell for both recipes; contains xsl:apply-templates elements to define styles from the CSS file applied to the recipes; uses xsl:if-test elements to determine which xml files, graphics files, and hyperlinks to call for each recipe.
pumpkin.xml Pumpkin Extensible Markup Language file with internal Document Type Definition (DTD) that specifies where and how many times different elements and entities may appear in the pumpkin recipe. Also contains text and steps that are unique to this recipe, such as Ingredients, Preheat Oven, Mix Filling, and Bake.
pecan.xml Pecan Extensible Markup Language file with internal Document Type Definition (DTD) that specifies where and how many times different elements and entities may appear in the pecan recipe. Also contains text and steps that are unique to this recipe, such as Ingredients, Preheat Oven, Mix Filling, and Bake.
equipment.xml Both This Extensible Markup Language file uses elements from the DTDs in pumpkin.xml and pecan.xml to define text that is common to both recipes to tell the viewer what types of kitchen utensils they will need to make both pies, as shown in the Equipment sections. Since this content is common to both recipes, the file was created once, and did not need to be entered into either pumpkin.xml or pecan.xml.
prepshell.xml Both This Extensible Markup Language file uses elements from the DTDs in pumpkin.xml and pecan.xml to define text that is common to both recipes to tell the viewer how to prepare the shell to make both pies, as shown in the Prepare the Shell sections. Since this content is common to both recipes, the file was created once, and did not need to be entered into either pumpkin.xml or pecan.xml.
fillshell.xml Both This Extensible Markup Language file uses elements from the DTDs in pumpkin.xml and pecan.xml to define text that is common to both recipes to tell the viewer how to fill the shell to make both pies, as shown in the Fill Prepared Shell sections. Since this content is common to both recipes, the file was created once, and did not need to be entered into either pumpkin.xml or pecan.xml.
coolserve.xml Both This Extensible Markup Language file uses elements from the DTDs in pumpkin.xml and pecan.xml to define text that is common to both recipes to tell the viewer how to cool, store, and serve both pies, as shown in the Cool the Shell sections. Since this content is common to both recipes, the file was created once, and did not need to be entered into either pumpkin.xml or pecan.xml.
pumpkin.php Both This PHP file accesses the rlo.xsl and pumpkin.xml files on the server for the Pumpkin Pie recipe, and outputs the result as HTML in the browser. Since the other files in this table needed by the pumpkin recipe are called within those two files, they do not need to be specified in this PHP file.
pecan.php Both This PHP file accesses the rlo.xsl and pecan.xml files on the server for the Pecan Pie recipe, and outputs the result as HTML in the browser. Since the other files in this table needed by the pecan recipe are called within those two files, they do not need to be specified in this PHP file.
Graphics Files Used Description
pumpkin.gif Pumpkin This graphic file displays at the top of the pumpkin recipe to tell the viewer what type of pie the recipe is for. The graphic is specified in rlo.xsl in the xsl:if-test element depending on what recipe is being displayed. It is called in pumpkin.xml as an entity.
pecan.gif Pecan This graphic file displays at the top of the pecan recipe to tell the viewer what type of pie the recipe is for. The graphic is specified in rlo.xsl in the xsl:if-test element depending on what recipe is being displayed. It is called in pecan.xml as an entity.
pumpkinpie.jpg Pumpkin This graphic file displays in the pumpkin recipe to show the viewer what this pie looks like. The graphic is specified in rlo.xsl in the xsl:if-test element depending on what recipe is being displayed. It is called in pumpkin.xml as an entity.
pecanpie.jpg Pecan This graphic file displays in the pecan recipe to show the viewer what this pie looks like. The graphic is specified in rlo.xsl in the xsl:if-test element depending on what recipe is being displayed. It is called in pecan.xml as an entity.