Rama as you discovered in the previous page, XML is required for packaging SCORM-conformant courses, and for content developers, you will need to prepare this file to describe your course. The good news is that this is not difficult. The expert level packaging lesson will give you several examples to work from. However, you will still need to create your own file, and you will from time to time encounter problems with this file. Here are some essential for XML.
Tags, Elements & Attributes in XML
Lets examine a small part of an imsmanifest.xml file.
The
An
attribute,
has the form name=value, where "name" is a particular variable name
reserved for that element and "value" is the string you want to
associate with that attribute. There are two attributes in this XML:
identifier="ITEM1" and identifierref="INTRODUCTION."
Attributes are used to provide a context to an element.
Where is the list of
XML Tags and Attributes that I can use?
Which
tags can you use? Well, each XML document has one or more companion files that
define the allowed tags and their attributes. These documents are either DTD (Document Type
Declaration) files, with a file type of ".dtd", or they are XML schema files with
the file type ".xsd". In SCORM there are four of these files that are
needed. They define which tags can be used in the imsmanifest.xml file as well
as their attributes.
The
packaging lessons in this course describe the imsmanifest.xml file and the use
of the SCORM schemas in preparing this file.
Where do I obtain the
SCORM XML DTDs and Schemas?
You
can obtain the SCORM schemas by downloading them from the IMS and ADL web sites
or by clicking on the links in the sidebar of this page. When you click on the
link, your browser will load the schema as a text file. To save it to your
computer, just select "file:save" from you browser's main menu bar.
Well Formed &
Valid XML
As
mentioned, you will be preparing an xml file to describe the contents of your
course to a Learning Management System or a SCORM repository. In either case,
you will need to ensure that this file (imsmanifest.xml) uses the proper syntax
and that it is valid.
An
XML file with the proper syntax is called "well-formed." An XML file that
is well-formed and also uses the proper tags, as defined by its DTD or schemas
is called "valid."
You must ensure that your manifest file is both well-formed and valid before
attempting to load it into a Learning Management System, or into a SCORM
repository.
If
you attempt to load a course with a manifest that is not well-formed or
invalid, then most likely it will fail to load, and worst of all, many learning
management systems will not help identify the problems in your manifest file.
Usually an error message such as "can not parse imsmanifest.xml file"
is written by the LMS to your terminal. It is up to the content developer to
determine why this error has occurred.
Well-Formed
XML require that 1) every tag be closed, and that 2) tags do not overlap. Here
is part of an imsmanifest file. Notice that the
The
proper syntax would be:
Some
XML elements convey attributes and not data. In this case, there is no need for
a separate closing tag. The following statement is an example of such an
element.
Although
this statement is not closed by a
tag, it is a valid XML
statement that might be found in a SCORM manifest file. Since this statement
only has an attribute associated with it (href=filename), there is no need for
a separate closing tag. These types of XML elements still require closing to be
considered well formed. The closing is done by including the forward slash
character "/" just before the final ">." This is
required. Leaving off that forward slash is not well formed XML since the tag
is not closed, and forgetting to include the forward slash will result in a XML
parsing error.
Well
formed XML must also have non-overlapping tags. A tag introduced after another
tag must be closed before the first tag. In the following example, the
Overlapping
tags are not allowed in XML and, in general, will cause an exception from the
LMS or SCORM repository. The correct, non-overlapping XML for the above example
places the closing tag for
No comments:
Post a Comment