Page 1 of 1

Export template for work items (doc /xml)

Posted: Mon Feb 19, 2018 2:50 pm
by natasia0603

I am currently trying to generate a doc template for work item export. I found out, that MS Word does not support the used custom markup XML 2003 stuff anymore. Anyway, I started to directly edit the .doc file in an XML editor. That worked quite well so far. But still there are some points which I don't manage to get as I wish to.

My XML code is basically structured like this. (There are multiple <workitem> definitions for multiple types)

Code: Select all

   <workitem type="productRequirement">
      <w:p><w:r><w:t> <type/> </w:t></w:r></w:p>
      <w:p><w:r><w:t> <title/> </w:t></w:r></w:p>
      <w:p><w:r><w:t> <description/> </w:t></w:r></w:p>
      <w:p><w:r><w:t> <customFields id="xxxx"/> </w:t></w:r></w:p>
      <w:p><w:r><w:t> <linkedWorkitems role="medpack_traces_to"></linkedWorkitems> </w:t></w:r></w:p>

My questions:
a) no matter what I do, the <title/> gets always the Heading style in word (I just want to have it standard).
b) I only want to have certain custom fields and certain linked work items listed. I tried to do this via "role=...", but it didn't work. After finding the XML Export Schema (, I tried the code snippet below. No success so far.

Code: Select all

         <LinkedWorkItem role="medpack_traces_to"></LinkedWorkItem>

Does anyone knows how this stuff works?
For reference, I attached the XML full code and an example of the output, feel free to use it. (Note: Even though, export_test.doc is a doc file, it cannot be opened by word. Use an XML editor)

Thank you