Modern Campus Catalog Emblem Modern Campus CMS Emblem Modern Campus Curriculum Emblem Modern Campus Involve Emblem Modern Campus Lifelong Learning Extended Education Emblem Modern Campus Message Emblem Modern Campus Navigate Emblem Modern Campus Schedule Emblem Modern Campus Virtual Tours & Maps Emblem Modern Campus Lifelong Learning Workforce and Community Emblem Site Menu Open Site Menu Close

Intro to XSL and XML

Modern Campus CMS uses XML and XSL to build and create pages. XML is a syntax that stores page data and content, while XSL is a transformation language that transforms XML content into other formats that have their own specific requirements, for example HTML.

Instead of static HTML pages, each page in Modern Campus CMS is a custom-formatted XML file that called a PCF, or Publish Control File. This file type carries only the editable content specific to each page, along with some design choices that customize the page structure or overall style. Each PCF page references at least one XSL file that converts the content into the final published products on the production server.

XMLLink to this section

XML, eXtensible Markup Language, is a widely-used format for storing data as text so it can be later accessed by XSL or other software. Unlike HTML, XML doesn't have a set of predefined tags; it has some very specific syntax requirements, but the overall data structure is entirely up to the developer using it. Invalid XML that doesn't follow correct syntax leads to parsing errors on PCF pages.

Red highlighted text read "A parsing error in the PCF occurred on line 8: The end-tag for element type "headcode" must end with a '>' delimiter." Underneath is an "OK" button.
An example of a parsing error you might encounter

As such, any HTML brought into Modern Campus CMS PCFs must be made XHTML compliant to ensure they follow XML syntax rules and avoid XSL parsing errors. Three common causes of parsing errors are:

  1. Open tags.
    Unlike HTML, all tags in XML must close, either as self-closing tags or full tags.
    • <img /> or <img></img>
    • <br />
    • <hr />
    • <link /> or <link></link>
  2. Boolean attributes without values.
    A boolean attribute can be listed without a value in valid HTML. However, XML requires all attributes to have associated values, so add a value repeating the name of the attribute.
    • async="async"
    • hidden="hidden"
  3. Special characters not encoded.
    XML treats certain special characters in a unique manner. Any instances of those characters which appear in page content need to be encoded appropriately using HTML entities.
    • &lt;
    • &gt;
    • &amp;
    • © &copy;

This video was recorded in OU Campus v10. While the interface may have a slightly different look, the platform functionalities did not drastically change in the OU Campus 11 release.

To learn more about pure XML, there are plenty of good online resources available, but Mozilla offers a good quick-start to XML.

XSLLink to this section

eXtensible Stylesheet Language is a pseudo-programming language originally built to convert XML structures into different XML structures. However, it has evolved to a powerful tool in terms of its output capabilities and functional abilities. It can transform XML into a number of different products, including .html, .aspx, or .php files.

XSL has three main advantages:

  1. Server-side Agnostic
    Due to its decoupled nature, Modern Campus CMS supports all server-side languages. XSL can output any textual content including server-side code, thereby supporting many different production server types and configurations, including outputting basic PHP and C# to the source of the page to call that language. Common languages such as PHP and C# can be output easily by default, but XSL can work with just about any server-side language.
  2. Programmatic Logic & Efficiency
    XSL provides similar functionality to a server-side language, handling that work on Modern Campus CMS servers and thus minimizing the work needed by the servers hosting the final products. By reducing the load on server-side scripts and outputting static files, users visiting the live site will experience faster load times than a site powered by server-side scripting alone.
  3. Separation of Content from Design
    By storing only the content and settings that are specific to each page in XML (.pcf extension), developers and administrators can modify the global design in a single location (XSL) without the need to individually fix every page.

This video was recorded in OU Campus v10. While the interface may have a slightly different look, the platform functionalities did not drastically change in the OU Campus 11 release.

External references on XSL and XML:

By continuing to use this site, you agree to the storing of first- and third-party cookies on your device to enhance site navigation; analyze site, product, and service usage; and assist in our marketing and promotional efforts. Cookie Policy