<dataBinding>
(XML Mapping)
This element specifies the information which shall be used to establish a mapping between the parent structured document tag and an XML element stored within a Custom XML Data part in the current WordprocessingML document.
If this element is omitted, then no XML mapping shall be associated with the current structured document tag. If the parent structured document tag is of type rich text or document part gallery, then this property shall be ignored.
If this element is present and the parent structured document tag is not of a rich text type, then the current value of the structured document tag shall be determined by finding the XML element (if any) which is determined by the attributes on this element. If this information does not result in a valid XML element, then the application may use any algorithm desired to find the closest available match. If this information does result in a valid XML element, then the contents of that element shall be used to replace the current run content within the document.
<w:sdt> <w:sdtPr> <w:dataBinding w:xpath="/root/name/first" … /> <w:text/> </w:sdtPr> <w:sdtContent> <w:r> <w:t>old text</w:t> </w:r> </w:sdtContent> </w:sdt>
This structured document tag specifies that it contains only plain text via the <text>
element, and that it shall be mapped to the element in the first Custom XML Data part which contains an element that matches the XPath expression /root/name/first
. When that element is located, its contents shall replace the existing run content in the document (for example, if its contents are new text
, then the contents of the run for this structured document tag shall be new text
when the document is displayed. ]
Parent Elements |
---|
|
Attributes |
Description |
---|---|
|
Specifies the set of prefix mappings which shall be used to interpret the XPath expression specified on the This attribute's value shall be specified using the following syntax: If this attribute is omitted, then the prefix mappings specified on each of the custom XML data parts itself shall be used to evaluate the given XPath expression. <w:sdtPr> <w:dataBinding w:xpath="//ns0:book" w:prefixMapping="xmlns:ns0= 'http://example.com/example'"/> <w:text/> </w:sdtPr> This structured document tag specifies that it contains an XML mapping, and that mapping's The possible values for this attribute are defined by the ST_String simple type (§2.18.89). |
|
Specifies the custom XML data identifier for the custom XML data part which shall be used to evaluate the given XPath expression. The custom XML data identifier, specified using the If specified, then the XPath expression specified on the If omitted, then the XPath expression shall be evaluated against each custom XML data part in turn until the given XPath expression is resolved to an XML element. <w:sdtPr> <w:dataBinding w:xpath="//ns0:book" w:storeItemID="testXmlPart" /> <w:text/> </w:sdtPr> This structured document tag specifies that it contains an XML mapping, and that mapping shall only be evaluated against the custom XML part whose identifier is equal to The possible values for this attribute are defined by the ST_String simple type (§2.18.89). |
|
Specifies the XPath expression which shall be evaluated to find the custom XML node which is mapped to the parent structured document tag. This XPath expression shall be specified using the syntax defined in the XML Path Language (XPath) Version 1.0 specification (see Annex A for bibliographic reference information). <w:sdtPr> <w:dataBinding w:xpath="//ns0:book" w:prefixMapping="xmlns:ns0= 'http://example.com/example'"/> <w:text/> </w:sdtPr> This structured document tag specifies that it contains an XML mapping, and that mapping's The possible values for this attribute are defined by the ST_String simple type (§2.18.89). |
The following XML Schema fragment defines the contents of this element:
<complexType name="CT_DataBinding">
<attribute name="prefixMappings" type="ST_String"/>
<attribute name="xpath" type="ST_String" use="required"/>
<attribute name="storeItemID" type="ST_String" use="required"/>
</complexType>