Hi Jeremy,
Thanks for your response. I probably didn't make my point very well. The source I included above is the rendered source, visible in the browser (right click>view source), not the source as it appears in DDE.
Referring to the XPage source, I have something like this at the top:
<xp:this.afterPageLoad><![CDATA[#{javascript://Create the XML Document
var parsedxml:org.w3c.dom.Document = null;
var domfactory:javax.xml.parsers.DocumentBuilderFactory = javax.xml.parsers.DocumentBuilderFactory.newInstance();
var xmldocument:javax.xml.parsers.DocumentBuilder = domfactory.newDocumentBuilder();
var parsedxml = xmldocument.parse("
http://localhost/folder1/database.nsf/xmlagent.xml");
sessionScope.put("xmlfeed",parsedxml);}]]>
</xp:this.afterPageLoad>
Further down the page I have this:
<xp:dataTable id="dataTable1" var="pernames" indexVar="rows" style="width:100.0%" rows="120">
<xp:this.value><![CDATA[#{javascript:var domdoc:DOMDocument = sessionScope.get("xmlfeed");
var dtvalues:DOMNodeList = domdoc.getElementsByTagName("Element1");
return dtvalues;}]]></xp:this.value>
<xp:column id="column1">
<xp:table style="width:100%;font-size:8pt">
<xp:this.rendered><![CDATA[#{javascript:var domdoc:DOMDocument = sessionScope.get("xmlfeed");
var dtvalues:DOMNodeList = domdoc.getElementsByTagName("Element1");
var nnode:DOMNode = dtvalues.item(rows);
var displayentry:string = nnode.getFirstChild().getNodeValue();
if (displayentry == "Domain1") {
return true;
} else {
return false;
};}]]>
</xp:this.rendered>
<xp:tr>
<xp:td style="width:20.0%;font-weight:bold;background-color:rgb(0,128,192);color:rgb(255,255,255);text-align:left">
Server Name:
</xp:td>
<xp:td style="width:80.0%;font-weight:bold;background-color:rgb(0,128,192);color:rgb(255,255,255);text-align:left">
<xp:text escape="true" id="computedField33" style="font-weight:bold">
<xp:this.value><![CDATA[#{javascript:var domdoc:DOMDocument = sessionScope.get("xmlfeed");
var dtservers:DOMNodeList = domdoc.getElementsByTagName("Element2");
var nnode:DOMNode = dtservers.item(rows);
return nnode.getFirstChild().getNodeValue();}]]>
</xp:this.value>
</xp:text>
</xp:td>
</xp:tr>
</xp:table>
</xp:column>
</xp:dataTable>
If I remove the <xp:this.rendered>...</xp:this.rendered> section, all records in the XML feed are rendered as I would expect. It is only if the <xp:this.rendered>...</xp:this.rendered> section is left in (which will filter the XML feed and only display the desired records) that the problems occur. I suspect it is because the <xp:this.value> appears within <xp:dataTable>
I've tried taking it outside of the <xp:dataTable> but then I get a 500 error.