locationProvider 元素 (搜尋連接器架構)
選擇性 <locationProvider> 元素會指定 Web 服務提供者搜尋連接器要使用的搜尋提供者。 此元素包含一個強制屬性和選擇性子專案。
語法
<!-- locationProvider -->
<xs:complexType name="searchConnectorDescriptionType">
<xs:all>
...
<xs:element name="locationProvider" minOccurs="0">
<xs:complexType>
<xs:all>
<xs:element name="propertyBag" type="propertyStoreType" minOccurs="0"/>
</xs:all>
<xs:attribute name="clsid" use="required"/>
<xs:attribute name="codebase" type="xs:string"/>
</xs:element>
...
</xs:all>
<xs:attribute name="publisher" type="xs:string"/>
<xs:attribute name="product" type="xs:string"/>
</xs:complexType>
元素資訊
Parent 元素 | 子專案 |
---|---|
searchConnectorDescriptionType 元素 (搜尋連接器架構) | propertyBag 元素 (搜尋連接器架構) |
屬性
屬性 | 描述 |
---|---|
@clsid | 必填。 搜尋提供者的類別識別碼 (CLSID)。 |
codebase | 自選。 |
言論
OpenSearch 提供者的 @clsid 屬性值為 {48E277F6-4E74-4cd6-BA6F-FA4F42898223}。
文件系統和通訊協議處理程式型搜尋連接器可以改用 simpleLocation>元素<。 如果 <locationProvider> 存在,則搜尋連接器描述中不能有 <simpleLocation> 元素。
locationProvider 元素的範例
<locationProvider clsid="{48E277F6-4E74-4cd6-BA6F-FA4F42898223}">
<propertyBag>
<property name="OpenSearchShortName">MSDN</property>
<property name="OpenSearchQueryTemplate">https://social.msdn.microsoft.com/Search/Feed.aspx?locale=en-US&Query={searchTerms}&format=RSS&StartIndex={startIndex}</property>
<property name="MaximumResultCount" type="uint32">100</property>
</propertyBag>
</locationProvider>