first commit
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>显示类型下问题数</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>CategoryID</name>
|
||||
<datatype>sql.int</datatype>
|
||||
<default>0</default>
|
||||
<intro>问答类型ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>ShowType</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>显示类型</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>Keyword</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>
|
||||
</default>
|
||||
<intro>关键字</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>true</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString><![CDATA[<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pe="labelproc" exclude-result-prefixes="pe">
|
||||
<!--要使用上一步定义的自定义参数,要作为XSLT参数使用,务必要在这里声明。如:<xsl:param name="myPara" />.引用该参数:$myPara -->
|
||||
<xsl:param name="ShowType" />
|
||||
<xsl:param name="Keyword" />
|
||||
<xsl:output method="xml" />
|
||||
<xsl:template match="/">
|
||||
<!--请按提示编辑,保持该模板结构的正确性-->
|
||||
<root>
|
||||
<sql>
|
||||
SELECT count(QuestionID) AS 'SUM' FROM PE_QA_Question where CategoryID in (select CategoryID from PE_QA_Category where CategoryID=@CategoryID OR ParentID= @CategoryID)
|
||||
<xsl:choose>
|
||||
<xsl:when test="$ShowType = 1"> AND Status = 2</xsl:when>
|
||||
<xsl:when test="$ShowType = 2"> AND Status = 1</xsl:when>
|
||||
<xsl:when test="$ShowType = 3"> AND Status = 2</xsl:when>
|
||||
<xsl:when test="$ShowType = 4"> AND Status = 2 AND NOT EXISTS(SELECT * FROM PE_QA_Reply WHERE PE_QA_Reply.QuestionID = PE_QA_Question.QuestionID) </xsl:when>
|
||||
<xsl:when test="$ShowType = 5"> AND Status = 1 AND IsElite = 1</xsl:when>
|
||||
<xsl:otherwise>AND Status > 0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="$Keyword!=''"> AND Title LIKE '%@Keyword%'</xsl:if>
|
||||
</sql>
|
||||
<sqlpage>
|
||||
<!--请在这里编写你的SQL分页查询语句,只有下面启用了分页SQL的XSLT编程支持这里才有效-->
|
||||
</sqlpage>
|
||||
<countsql>
|
||||
<!--请在这里编写你的分页SQL语句,只有下面启用了分页SQL的XSLT编程支持这里才有效-->
|
||||
</countsql>
|
||||
</root>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelSqlString>
|
||||
<LabelTemplate><![CDATA[<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pe="labelproc" exclude-result-prefixes="pe">
|
||||
<xsl:param name="CategoryID" />
|
||||
<xsl:param name="Keyword" />
|
||||
<xsl:output method="html" />
|
||||
<xsl:template match="/NewDataSet/Table">
|
||||
<xsl:value-of select="SUM"/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
<Version officialVersion="" modifiedVersions="3602" compatibleVersion="" />
|
||||
</root>
|
||||
Reference in New Issue
Block a user