I want to create un master document in which the sub documents are inserted like "references". That's an example from Office Open XML documentation (http://www.ecma-international.org/news/TC45_current_work/Office%20Open%20XML%20Part%201%20-%20Fundamentals.pdf) :
Example: Consider a master document, whose three subdocuments are called Start, Middle, and End, respectively. Master’s Main Document part has a corresponding relationships part that contains the following, in which Start.docx, Middle.docx, and End.docx are packages containing the corresponding subdocuments:
- Code: Select all
<Relationships xmlns="…">
<Relationship Id="rId5"Type="http://…/subDocument" Target="Start.docx" TargetMode="External"/>
<Relationship 1 Id="rId6" Type="http://…/SubDocument" Target="Middle.docx" TargetMode="External"/>
<Relationship Id="rId7" Type="http://…/SubDocument" Target="End.docx" TargetMode="External"/>
</Relationships>
The master document’s Main Document part contains subDoc elements that reference its subdocuments:
- Code: Select all
<w:document xmlns:r="…" xmlns:wx="…" …>
<w:body>
<w:p …>
<w:pPr>
…
</w:pPr>
</w:p>
<w:subDoc r:id="rId5"/>
…
<w:subDoc r:id="rId6"/>
…
<w:subDoc r:id="rId7"/>
…
</w:body>
</w:document>
end example
I want to use docx4j package to do that. But I did find the "subdocument" class in the package. Has anyone an idea where I can find this class? Otherwise, how to use others class in docx4j to creat un <w:subDoc> objet?
Thanks