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:
- Improper encoding of characters in the xml.
- Misconfiguration of xslt to parse your xml file.
- XSLT Whitelisting
Improper encoding of characters in xml
- 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.
- Replace special characters with encoded versions of the character
- 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
- Save a copy of your xslt and output of your xml from the control
- Some of the Ektron controls have a xmldoc property
- Open Visual Studio
- Open your xsl or xslt file.
- A new menu should appear in the toolbar options for xml.
- Select "Start XSLT Debugging"
- Open the file location to your xml file
- If the transform works, it will display the output in an html window.
- 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
Please sign in to leave a comment.