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 XML and XSL

When a page is published from Modern Campus CMS the product is a flat HTML file. The file extension may vary based upon your production server configuration but the actual source code of that published page is HTML. Inside Modern Campus CMS, a PCF page is an Extensible Markup Language (XML) file of content such as page parameter values and editable region content. The Extensible Stylesheet Language (XSL) file takes the page-specific content and inserts it into the final HTML to provide you a preview within Modern Campus CMS and to build out the final page product at publish.

XMLLink to this section

XML is a data file that stores information and later accesses it using XSL. It differs from HTML in that it does not have a set of predefined tags. Instead, you can define your own tags for your needs. Within Modern Campus CMS, unique tags appear on PCF pages that begin with <ouc:. These tags are a part of the ouc namespace that Modern Campus has defined specifically for Modern Campus CMS.

XML is flexible with tags, but the syntax of the file must follow a set of strict rules in order to be considered valid XML. Invalid XML on a PCF page returns a parsing error.

  1. All tags need to be closed.
    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 must have a value.
    HTML has some attributes which are considered boolean, meaning the attribute can be listed without a value. 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 must be 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.
    • < &lt;
    • > &gt;
    • & &amp;
    • © &copy;

XSLLink to this section

XSL is the XML transformation instructions. XSL can transform XML into a number of different products. Inside Modern Campus CMS, you may see your PCF files transformed into HTML, PHP, or ASPX using XSL.

Within Modern Campus CMS, multiple XSL files often reference each other. For most implementations, a PCF file references a page-type XSL stylesheet (for example interior.xsl, home.xsl, program.xsl). That page-type XSL stylesheet contains XSL templates and code associated with the unique content and HTML structure found on that type of page. To build out the surrounding elements of the page (for example header, footer), the page-type XSL stylesheet references a common.xsl stylesheet.

The common.xsl stylesheet builds out the HTML structure of your web pages which are shared across all page types (for example header at the top, page content in the middle, footer at the bottom). It references additional XSL stylesheets that are shared across all of your page types (for example variables.xsl, galleries.xsl).

When making changes to XSL in Modern Campus CMS, you don't need to publish the XSL file. However, always save a version before and after making edits.

External references on XSL and XML:

Once you've mastered the basics, reference our template development guides for full lists of attributes and values.

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