Follow

XML:Base Parser Warnings

Avatar

When I imported a course, I received several parser warnings:

* The xml:base attribute for the element in the manifest does not contain a trailing slash.

* The href for resource with identifer X begins with a slash.  Absolute paths such as this are not likely to work across platforms.

Looking at the manifest I can't see where you are picking up the forward slash from.

 

--I took a closer look at the manifest and noticed that the xml:base attribute was empty (Example:  xml:base "")

I took out the empty xml:base attribute at the top of the manifest and it seemed to clear out all of the parser warnings. 

Here is what the SCORM Spec says about handling xml:base.

The XML Base [7] is a construct used to explicitly specify the base URL of a document
in resolving relative URLs in links to files in a Content Package. The URLs can be
prefixed by an XML Base attribute. This allows an author or authoring tool to specify
and/or offset the base directory so that it is not necessary to repeat the base directory in
every use of that URL.

The default base directory is the location of the package. This concept is known as
“relative to the package.” The only way to explicitly override this default base directory
is to reference a file with an absolute path that is external to the package. If the file is not
external to the package, any XML Base value will simply offset the default base
directory. The XML Base attribute can be either:

• A relative URL (describing the offset from the root of the package, e.g.,
Course/Lesson/), or

• External URL (external from the package, e.g., http://www.adlnet.gov/content/).
Trailing slashes are required to be at the end of any XML Base value. When referencing
local files in the content package, the URL, including XML Base, shall not begin with a
leading forward slash (“/”). As defined in RFC 3986, a path with a leading forward slash
indicates the absolute path of that file. Using a leading slash denotes the root of the local
host. With this in mind, the use of a leading forward slash is not permitted to minimize
misinterpretation and increase portability.

The IMS Content Packaging XML Binding Specification allows for the use of the XML
Base attribute in the <manifest>, <resources> and <resource> elements.

If the XML Base attribute is present in the <manifest> element, all URLs found within
the child elements of the <manifest> element shall use the XML Base value to construct
the actual href value. This includes the href values for the <resource> and <file> elements
and the value held in the <adlcp:location> element.

Since xml:base was included in the manifest, SCORM is assuming that the
content is trying to explicitly change the base URL of the files within the content. Since that attribute
is empty, there are no trailing slashes and per that 3rd paragraph, they are required. Since
it is not in use and xml:base is not required, removing it should be the answer.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk