Troubleshooting XML Transform Issues

  • Updated

When using xml transformations such as a flex menu or list summary and the results aren't displaying, there are a couple of things you can try to get it to work. Some causes are listed below:

  1. Improper encoding of characters in the xml.
  2. Misconfiguration of xslt to parse your xml file.
  3. XSLT Whitelisting

 

Improper encoding of characters in xml

  1. View the output of your xml and look for special characters. 
    • The easiest way to do this is to use Visual Studio or output the xml to a textbox.
    • Older versions of the cms for sometimes menus didn't encode the ampersand "&" character to & so this can sometimes cause a display issue with the xslt. 
  2. Replace special characters with encoded versions of the character
  3. Try your XSLT transform again

Misconfiguration of XSLT to parse an XML file. 

If your xml and xslt appear to look good, Visual Studio can help you debug your xslt

  1. Save a copy of your xslt and output of your xml from the control
    • Some of the Ektron controls have a xmldoc property 
  2. Open Visual Studio
  3. Open your xsl or xslt file. 
  4. A new menu should appear in the toolbar options for xml.
  5. Select "Start XSLT Debugging"
  6. Open the file location to your xml file
  7. If the transform works, it will display the output in an html window.
  8. If the output is blank, set a breakpoint on the xsl or xslt file and step through the code to find out where it is breaking. 

More info on XSLT Debugging can be found here:
https://msdn.microsoft.com/en-us/library/ms255602.aspx