Hi,
I am unable to execute XDQL through web publisher application (6.5 SP2), however the same piece of code seems to work fine when executed from DFC. Can anybody help me with this or can anyone share a working example for web publisher please..
Following is my code. When I try to preview a file using this ppresentation, it says "Cant generate rendition, please check your presentation file"
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:java="http://xml.apache.org/xslt/java" xmlns:xalan-nodeset="http://xml.apache.org/xalan" version="1.0">
<xsl:output method="html" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:param name="DMS_SESSION_ID" select="'default value'"/>
<xsl:param name="INPUT" select="'c_XDQL'"/>
<xsl:template match="page">
<html>
<head>
<title>Test Page for XDQL</title>
</head>
<body>
<h1><xsl:value-of select="page-title"/></h1>
<xsl:variable name="QRes">
<xsl:call-template name="XDQL"/>
</xsl:variable>
<xsl:copy-of select="$QRes"/>
</body>
</html>
</xsl:template>
<xsl:template name="XDQL">
<xsl:variable name="dql">
<xsl:text>select * from dm_document where object_name='</xsl:text>
<xsl:value-of select="$INPUT"/>
<xsl:text>'</xsl:text>
</xsl:variable>
<xsl:variable name="clientx" select="java:com.documentum.com.DfClientX.new()"/>
<xsl:variable name="xdql" select="java:getXmlQuery($clientx)"/>
<xsl:variable name="init" select="java:init($xdql)"/>
<xsl:variable name="param" select="java:setDql($xdql, $dql)"/>
<xsl:variable name="setContentEncoding" select="java:setContentEncoding($xdql,'dom')"/>
<xsl:variable name="setContentFormat" select="java:setContentFormat($xdql,'xml')"/>
<xsl:variable name="includeContent" select="java:includeContent($xdql,true())"/>
<xsl:variable name="setMetaDataAsAttributes" select="java:setMetaDataAsAttributes($xdql,true()) "/>
<xsl:variable name="rootNode" select="java:setRootNode($xdql, 'root')"/>
<xsl:variable name="execute" select="java:execute($xdql,'DF_READ_QUERY',$DMS_SE SSION_ID)"/>
<xsl:variable name="myResult" select="java:getXMLDOM($xdql)"/>
<xsl:variable name="myXMLResult" select="java:getChildNodes($myResult)"/>
<xsl:copy-of select="$myXMLResult"/>
</xsl:template>
</xsl:stylesheet>