Поделиться через


EntityPickerEmpty Class

Defines the EntityPickerEmpty Class.This class is only available in Office2010.When the object is serialized out as xml, its qualified name is w14:entityPicker.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Office2010.Word.EmptyType
        DocumentFormat.OpenXml.Office2010.Word.EntityPickerEmpty

Namespace:  DocumentFormat.OpenXml.Office2010.Word
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Декларация
<OfficeAvailabilityAttribute(FileFormatVersions.Office2010)> _
Public Class EntityPickerEmpty _
    Inherits EmptyType
'Применение
Dim instance As EntityPickerEmpty
[OfficeAvailabilityAttribute(FileFormatVersions.Office2010)]
public class EntityPickerEmpty : EmptyType

Remarks

2.3.21 entityPicker

Target namespace: https://schemas.microsoft.com/office/word/2009/2/wordml

A CT_EMPTY element (as specified in [ISO/IEC-29500-1] §A.1) that specifies that the parent structured document tag (as specified in [ISO/IEC-29500-1] §17.5.2) allows the user to select an instance of an external content type when displayed in the document. See section 2.2.3 for how the entityPicker element integrates with ISO/IEC-29500-1.

The parent structured document tag MUST contain content that is valid within a text element as specified in [ISO/IEC-29500-1] §17.5.2.44, and MUST contain a dataBinding element as specified in [ISO/IEC-29500-1] §17.5.2.6.

The WordprocessingML document MUST contain a Custom XML Data part whose root namespace is https://schemas.microsoft.com/office/2006/metadata/properties, and whose identifier (as specified by [ISO/IEC-29500-1] §22.5.2.1) matches the value specified by the storeItemID attribute on the dataBinding element of the structured document tag containing the entityPicker element. The xpath attribute on the dataBinding element MUST specify the path to an element within that Custom XML Data part.

The document MUST also contain a Custom XML Data part whose root namespace is https://schemas.microsoft.com/office/2006/metadata/contentType. This Custom XML Data part contains a schema element (in the http://www.w3.org/2001/XMLSchema namespace) that specifies an XML schema for the element specified by the xpath attribute of the dataBinding element of the entityPicker. The rest of this section refers to this schema as the element schema.

The element schema specifies four attributes, each with a fixed value:

SystemInstance: specifies the LobSystemInstance name

EntityNamespace: specifies the Entity namespace

EntityName: specifies the Entity name

BdcField: specifies the name of the Field within the EntityInstance

Together with the location of the document, these values specify the external content type that the user is selecting one or more instances of.

The result of the user choosing an instance of an external content type is an EntityInstance Identifier, and values of one or more Fields within the EntityInstance.

The element schema further specifies three more attributes, each with a fixed value, which collectively specify where to place the EntityInstance Identifier, and the Field values resulting from the user's selection:

RelatedFieldWssStaticName: specifies a sibling of the XML element specified by the xpath attribute of the dataBinding element mentioned earlier. The text of this element MUST be set to the EntityInstance Identifier obtained from user choosing an instance of the external content type.

SecondaryFieldBdcNames: specifies a list of names of Fields within the EntityInstance (the fields whose values resulted from user's choice). The list MUST be encoded as specified by the following five requirements, and MUST contain the same number of names as the SecondaryFieldsWssStaticNames attribute.

SecondaryFieldsWssStaticNames: specifies a corresponding list of names of XML elements that are siblings of the XML element specified by the xpath attribute of the dataBinding element mentioned earlier. The list MUST be encoded as specified by the following five requirements, and MUST contain the same number of names as the SecondaryFieldBdcNames attribute.

The value (resulting from user's choice) of each one of the Fields within the EntityInstance specified by SecondaryFieldBdcNames MUST be set as the text of the XML element whose name appears at the same index in SecondaryFieldsWssStaticNames.

The list of names specified by SecondaryFieldBdcNames and SecondaryFieldsWssStaticNames MUST be encoded as follows:

1.Start with an empty string

2.For each name, append the length of the name, plus one, as a based-10 integer, each value followed by a single space character

3.The names are then appended to the string, in the same order in which their lengths were added in step 2, followed by a single space character

4.The zero-based character position of where the first name begins in the string is then appended to the string

5.Finally, the resulting string is escaped as specified by [RFC3986]

The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this element.

<xsd:element name="entityPicker" type="w:CT_Empty"/>

See section 5.1 for the full W3C XML Schema ([XMLSCHEMA1] section 2.1).

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

EntityPickerEmpty Members

DocumentFormat.OpenXml.Office2010.Word Namespace