first commit
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<LabelType>博客类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<Version officialVersion="" modifiedVersions="2525" compatibleVersion="" />
|
||||
<attributes>
|
||||
<name>blogId</name>
|
||||
<datatype>sql.int</datatype>
|
||||
<default>0</default>
|
||||
<intro>博客ID</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="username" />
|
||||
<xsl:variable name="IsBlogOwner" select="pe:LoginedUserName()=$username"/>
|
||||
<xsl:output method="xml" />
|
||||
<xsl:template match="/">
|
||||
<!--请按提示编辑,保持该模板结构的正确性-->
|
||||
<root>
|
||||
<sql>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$IsBlogOwner">
|
||||
SELECT COUNT(UserCategoryID) FROM PE_BG_log WHERE UserCategoryID=@categoryId AND BlogID=@blogId AND State>-1
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
SELECT COUNT(UserCategoryID) FROM PE_BG_log WHERE UserCategoryID=@categoryId AND BlogID=@blogId AND State>0
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</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="blogId" />
|
||||
<xsl:param name="categoryId" />
|
||||
<xsl:output method="html" />
|
||||
<xsl:template match="/NewDataSet/Table">
|
||||
<xsl:value-of select="Column1"/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>categoryId</name>
|
||||
<datatype>sql.int</datatype>
|
||||
<default>0</default>
|
||||
<intro>类别ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>username</name>
|
||||
<datatype>string</datatype>
|
||||
<default>
|
||||
</default>
|
||||
<intro>用户名</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
Reference in New Issue
Block a user