Tag Archives: XSLT

Opening and closing tags. Getting around XML rules of XSLT

Working with XSLT in SharePoint can make you come up with some ‘creative’ solutions to a problem.

When using the Content Query WebPart (CQWP), the XML data from a SharePoint list is passed to the CQWP XSLT template node by node. So if you want to render the data in a HTML table, you need to render a <table> tag before the first node with of data and close with a </table> tag after the last node with data. Unfortunately, XSLT doesn’t accept single opening or closing tags. Everything in XSLT must be opened and closed. An opening tag without a closing tag or vice versa is not allowed.

So you need to get creative…

Continue reading