Outputting an XML Page in WebCenter Sites

Set up the template “Element Logic” as follows (copy this exactly – whitespace matters!):

 

<%@ taglib prefix="cs" uri="futuretense_cs/ftcs1_0.tld"
%><%@ taglib prefix="ics" uri="futuretense_cs/ics.tld"
%><%@ taglib prefix="render" uri="futuretense_cs/render.tld"
%><cs:ftcs><?xml version="1.0" encoding="utf-8" ?>
<ics:if condition='<%=ics.GetVar("tid")!=null%>'><ics:then><render:logdep cid='<%=ics.GetVar("tid")%>' c="Template"/></ics:then></ics:if>
<root>
<node>text</node>
</root>
</cs:ftcs>

 

Add the following pagelet parameter:
cs.contenttype : application/xml; charset=utf-8
If we are working in 2,1 or higher JSP version we should put this at the beginning of the template in order to make the tags <%@page .......%> work:

 

<%@ page trimDirectiveWhitespaces="true" %>

 

Note: This tag should be in all the templates or CSElements included in your XML Template
If not, the sentence <?xml version="1.0" encoding="utf-8" ?> should be the first line in the template