大网数据广告活动
打印与设备

Property (Documents and Printing)

· 52CE 我爱测

Learn about the Property element in documents and printing. This topic isn't current. For the most current information, see the Print Schema Specification.

This topic is not current. For the most current information, see the Print Schema Specification.

A Property element declares a device, job formatting, or other relevant property whose name is given by its name attribute. A Value element is used to assign a value to the Property.

A Property can be complex, possibly containing multiple subproperties. Subproperties are also represented by Property elements.

Element Tag

<Property>

XML Attributes

The following table lists the XML attributes that may be pertain to this element.

XML Attribute Details
name Holds the name attribute of the Property, which is either a standard Property or a privately-defined Property.

For more information, please see XML Attributes section.

Element Information

The following table lists the elements that may be parents of this element, the elements that may be children of this element, and any restrictions on the element itself.

Category Details
Parent elements PrintCapabilities Feature PrintTicket Option ParameterDef Property ScoredProperty
Child elements The system assigns no significance to the ordering of the elements. If clients choose to ascribe some significance in the ordering of the elements, they are free to do so. Property (one or more) Value (zero or more) or Property (zero or more) Value (one or more)
This element No character data is permitted. Duplicate child Value elements that are siblings are permitted.

Configuration Dependencies

A Property may have configuration dependencies, except when it appears within a ParameterDef element.

Element Usage

In addition to appearing within Feature and Option elements, Property elements can appear at the root level of the respective underlying technologies. The Print Schema defines a set of Property elements that can be used to describe a device in a portable manner. However, if these properties are insufficient to your needs as a PrintCapabilities provider (typically because the device being supported has novel aspects not anticipated by the Print Schema), you may introduce your own private Property elements. You can enhance or elaborate the information provided by a public Property by adding one or more private subproperties as element content of the public Property.

Property elements are defined by using an XML element tag, <Property>. Each Property is assigned a name by means of its name attribute. The name must be an XML QName and must conform to the Namespace Convention. For details, see XML Attributes. The Property name attribute and its location within the hierarchy of parent Property elements (if it is a subproperty) uniquely identify the Property within the PrintCapabilities document or PrintTicket.

A Property may contain one or more Value elements, or one or more child Property elements (called subproperties), or a combination of both. Subproperties are useful when the Property itself is composed of multiple components. For example, a "ConsumableColor" Property might have "C", "M", and "Y" components.

Example

<psf:Property name="psk:DisplayName">
  <psf:Value xsi:type="xs:string">6</psf:Value>
</psf:Property>

Related topics

Print Schema Specification

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。