Is there a way to use the contents of the Content File (DXC) across multiple assemblies? We have several products and several versions that each have separate assemblies but share most of the same information. We would like to be able to re-use the content in the DXC but see no way to store this centrally. Right now we make the same edit to multiple DXC files when there is an update. Is there a way of making the change in one file and making it available to multiple products and multiple versions.
4 comments
-
Richard Sloggett This functionality isn't available directly from Document! X, however it is possible to modify a Content File for use with a different assembly if the structure of your different assemblies is the same and only differs by Assembly / Namespace name.
A single item of content in a Document! X Content File looks something like this (Content Files are XML files):
<c eid="myassembly~mynamespace.myclass~mymember" tid="##SUMMARY" q="" cd="39125.811724537"> (content) </c>
The "eid" attribute contains the identifier of the item with which the content is associated. The format of the eid differs for different documentation types, but for .NET it contains the assembly name and namespace name as the prefix. You can use this fact in order to create a copy of an existing .dxc for use in different versions of the same assembly - a simple find and replace for the old assembly / namespace name would normally be all that is required to repurpose the content file for a different assembly / namespace name with the same members. Because hyperlinks also use this prefix, links will be updated also.
I should probably stress that doing this is not required for different versions of the same assembly - it's only required if you have multiple copies of an assembly where the assembly or namespace names in some way and you want to use the a copy of the same Content File.
You could do the find / replace operation in something like notepad, or you could perhaps build a script to do this as part of your build process using a command line grep tool.
-
FarPointDoc Thanks. So you are saying I can use the lines (the content) in the Content Files, though I don't have to use the UI that Document! X provides -- I can just use another editor to grab the lines I need and store them centrally, and then create a particular DXC file as needed to generate help for a particular product and version. I'll have to investigate that. We've always created a separate help file for each product and each version, and now I'm thinking I could create a help file that is a superset and includes the older version stuff but just says which version it applies to (if it is limited to a version) and says which version it is available in (if it is only available in the newer versions), so that we have only one file for all versions of a product. And then it's just a matter of saving stuff common to separate products using the scheme you propose.
-
Richard Sloggett What I was describing was a method you could use to convert a content file created against one assembly such that it could be used for another assembly that had the same content but a renamed namespace or assembly name (e.g. if you products include a version number in the assembly / namespace name).
Bear in mind that regardless of what is in the content file, Document! X will only document the members in the assembly your Document! X project references - so this isn't a magic solution to include additional pages in your documentation, just a way to ensure you can re-use your content files when assembly / namespace names change.
-
SuperOffice We do something like that when we build our help.
We have two COM DLLs: One.DLL contains a bunch of objects (CFoo and CBar).
The Other.DLL contains references to the interfaces (IFoo and IBar).
We have a perl script that wrangles the One.DXC file into a new one OneForOther.DXC.
It renames the documentation for CFoo to being documentation for IFoo
The DXP for the other dll then references the OneForOther.DXC to pull in the documentation we wrote for the One.dxc