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>