1
當前我正在處理ASPDNSF CMS xml包並嘗試更改Web查詢參數pageize的默認值。 我的pronblm是當我第一次搜索產品,然後頁面大小爲0時,它顯示200產品左右的產品列表,所以我想檢查pagesize是否爲零,然後它應該設置頁面大小pagenumber * 12。如何在xslt(xml包)中重新分配參數值在運行時更改Web查詢參數值
下面是我的代碼網站查詢代碼:
<webquery name="searchresults" RetType="xml" timeout="30">
<url><![CDATA[{SmartSearch}&searchTerm={entityName}ID:{entityID}&searchString={searchString}&sortField={sortField}&pageNumber={pageNumber}&pageSize={pageSize}&facetQuery={facet}]]></url>
<querystringreplace replaceTag="{SmartSearch}" replacetype="webconfig" replaceparamname="SmartSearchURL" defvalue="" validationpattern=""/>
<querystringreplace replaceTag="{searchString}" replacetype="runtime" replaceparamname="SearchTerm" defvalue="" validationpattern=""/>
<querystringreplace replaceTag="{entityID}" replacetype="runtime" replaceparamname="EntityID" defvalue="" validationpattern=""/>
<!-- if the EntityID is missing, then get rid of the whole searchTerm: -->
<querystringreplace replaceTag="searchTerm={entityName}ID:&" replacetype="justreplace" replaceparamname="N/A" defvalue="" validationpattern=""/>
<querystringreplace replaceTag="{entityName}" replacetype="runtime" replaceparamname="EntityName" defvalue="" validationpattern=""/>
<querystringreplace replaceTag="{pageNumber}" replacetype="request" replaceparamname="pageNumber" defvalue="1" validationpattern=""/>
<querystringreplace replaceTag="{pageSize}" replacetype="request" replaceparamname="pageSize" defvalue="0" validationpattern=""/>
<querystringreplace replaceTag="{facetGroup}" replacetype="request" replaceparamname="facetgroup" defvalue="ManufacturerID" validationpattern=""/>
<querystringreplace replaceTag="{facet}" replacetype="request" replaceparamname="facet" defvalue="" validationpattern=""/>
<querystringreplace replaceTag="{sortField}" replacetype="request" replaceparamname="sortField" defvalue="" validationpattern=""/>
</webquery>
,我試圖實現的目標從下面的代碼使用前請先:) Harpreet辛格