XML/XSL Troubleshooting

If you have recently upgraded to OU Campus version 10.5, you may be seeing an increase in XSL errors. This is because OU Campus' ability to detect issues in XSL has improved. 

XML/XSL Troubleshooting

In addition to the standard system notifications, OU Campus will also present transformation errors and other error messages specific to the use of XML/XSL.

Transformation Errors

A transformation error is usually seen when trying to preview or publish a page, and includes a summary and a code section for the error message. The error is initially presented in a dialog box and after closing the window, an error message is also shown in preview view rather than the expected preview of the page.

A transformation error in a PCF tends to indicate a syntax error, which can occur in a number of file types including the PCF, TCF, TMPL, or an XSL. An error that only exists in a PCF might indicate that rogue source editing led to a typo in the code. In the case that an XSL was recently edited, then it could indicate that the error originated in the XSL file. If the error occurs after the creation of a new page, then it might indicate that the error is in the TCF or the TMPL.

The Summary section of the error typically indicates the type of transformation error it is, such as a parsing error, as well as the offending line error. Since a PCF is an XML file, it needs to conform to XSL rules. Errors can indicate deviance from XML rules and expectations such as:

  • Entities and markup must be defined correctly
  • An XML file must have a root element
  • Tags must close properly (i.e., the must have a closing element or be self-closing)
  • Tags and attributes are case sensitive and must use quotation marks correctly
  • Elements must be properly nested

Frequently a transformation error is just a typo or an improperly closed XML tag. Additional causes could include:

  • An improperly closed XML tag in the PCF file
  • An undefined character entity in the PCF that needs to be defined in the DTD
  • The XSL file referenced in the pcf-stylesheet declaration cannot be found; sometimes this is just a path error

 Parsing Error

The following transformation error was occurring on preview and also on publish.

Parsing Error

The error message indicates several things:

  • It is a parsing error
  • It has occurred within the PCF while attempting transformation
  • It occurred on line 27
  • It is a syntax error
  • The <config> element is not closing properly

The following is the source code from the PCF. When examining opending and closing tags for the <config>, it appears that the <config> element is properly formed. The error actually does not occur in the <config> but within one of its children. The first <parameter> node self closes, yet there is also a closing tag for the first <parameter> node. The self-closing tag strands the options and causes the transformation error, since the nesting within <config> is disrupted.

<!-- com.omniupdate.properties -->
<parameter name="buttons" value="true" />
<option value="end-user" selected="false">Contributors</option>
<option value="admin" selected="false">Administrators</option>
<option value="developer" selected="true">Developers</option>
<option value="super" selected="false">Super Admin</option>
<parameter name="feedbackform" type="radio" prompt="Feedback Form" alt="Enables/disables the feedback form in the main content column.">
<option value="true" selected="true">On</option>
<option value="false" selected="false">Off</option>
<parameter name="disqus" type="radio" prompt="Disqus" alt="Enables/disables disqus comments in the main content column.">
<option value="true" selected="false">On</option>
<option value="false" selected="true">Off</option>
<parameter section="Right Column" name="rightnav" type="radio" prompt="Local Navigation" alt="Enables/disables the local navigation in the right column.">
<option value="true" selected="true">On</option>
<option value="false" selected="false">Off</option>
<parameter name="tags" type="radio" prompt="Tags" alt="Enables/disables the tag cloud in the right column.">
<option value="true" selected="true">On</option>
<option value="false" selected="false">Off</option>
<parameter name="related" type="radio" prompt="Related Content" alt="Enables/disables the related content region in the right column.">
<option value="true" selected="false">On</option>
<option value="false" selected="true">Off</option>
<parameter section="PDF View" name="docNumber" prompt="Document Number"></parameter>
<!-- /com.omniupdate.properties -->

The fix is to remove the slash from the end of the first <parameter> node. Error:

<parameter name="buttons" value="true" />


<parameter name="buttons" value="true" >

This particular error could also presented through the interface in the Properties panel.

View of Configuration Parameters

Stylesheet Could Not Be Rendered

Error Message: The stylesheet path was not provided.

This error message indicates that the OU Campus system could not locate the XSL file for transformation. This can be caused by a path error in the pcf-stylesheet declaration, a type in the file name, or the actual XSL may be missing.

Page Taking Too Long to Render

Error message indicating page is taking too long to loadWarning Message: The preview is taking longer than expected to display.

This message indicates that the file in OU Campus is taking longer than 30 seconds to render (possibly as a result of a slow connection or too much data to process). You then have the option to wait for the page to render or to cancel and navigate elsewhere.

There is an additional, longer time-out that will occur in staging only if the render takes longer than 10 minutes. OU Campus will automatically stop the render. 

If you are getting this error, you may want to investigate your XSL to see what is causing this slowness. Some common causes are:

  • The XSL is attempting to connect to data on another server and is getting a slow response and/or time-out
  • The XSL code has inefficient variable or memory management
  • The XSL is opening and reading the contents of too many files