WmlToHTML with CustomXML databinding

Home Forums Open-Xml-PowerTools WmlToHTML with CustomXML databinding

This topic contains 1 reply, has 2 voices, and was last updated by  Anonymous 3 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7859

    mceris
    Participant

    I have been able to get the WmlToHtmlConverter to work properly for a WmlDocument. The challenge I am having is the fact that the document contains content controls that are resolved at run-time with xpath expressions (embedded in the content controls) against the CustomXMLPart of the document.

    The rendered HTML does not show the data from the xml but instead the place holder text. It appears that the binding only happens when the document is open in word.

    Is there anyway to show the content controls with the bound data in the HTML preview?

    #9794

    Anonymous

    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 an XML element, then the application can use any algorithm desired to find the closest available match. If this information does result in an XML element, then the contents of that element shall be used to replace the current run content within the document.

    [Example: Consider the following structured document tag:

    XML

    Copy
    <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>

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.