Installed (WSD)

已安装的 Web 服务(WSD)构造指示是否已安装与给定条件集匹配的打印机功能。 If an XPath filter obtains a valid XML result when applied to the given criteria, this algorithm returns TRUE. The Installed construct is defined in WsdBidi.xsd.

Attribute Description
drvPrinterEvent (可选)一个布尔值,该值指示端口监视器是否向驱动程序发送通知。 A TRUE value indicates that the port monitor sends notifications to the driver; FALSE indicates that the port monitor does not send notifications to the driver.
filter WSD 监视器应用于由查询指定的 XML 文档的 XPath 查询。 请参阅本主题后面的讨论。
name 架构值的名称。
query WSD 监视器将执行的查询类型。

从 Microsoft XML (MSXML) 2.6 开始在 Windows 中实现的 XPath 语言提供了一种在 XML 文件中指定元素的便捷方法。 See the XPath Reference for more information.

Installed 构造的行为取决于其父节点的定义。 如果未使用参数指定已安装构造,则查询架构时将始终存在。 如果使用 Parameter 指定了 Installed 构造,则仅当当前 WSD 设备查询中找到关联的 Parameter 值时,架构才会存在。 进行查询的软件必须能够处理未返回已安装架构的情况。

The Installed construct is defined in WsdBidi.xsd.

Code example

在以下代码示例中,筛选器查找算法使用 XPath 查询来确认已安装硬盘。

<Schema>
  <Property name='Printer'>
    <Property name='Configuration'>
      <Property name='HardDisk'>
        <Installed name='Installed'
            query='wprt:PrinterConfiguration'
            filter='wprt:PrinterConfiguration/wprt:Storage/wprt:StorageEntry[wprt:Type="HardDisk"]'/>
      </Property>
    </Property>
  </Property>
</Schema>

前面的示例生成以下查询:

\Printer.Configuration.HardDisk:Installed