Dave Sexton

Hi,

Are the GUID names generated by Sandcastle actually MD5 hashes of a topic's ID value

Eric mentions this here and I was just wondering if I've understood him correctly:

Sandcastle Help File Builder, Output Deleted When New Build Starts

http://www.codeplex.com/SHFB/Thread/View.aspx ThreadId=13263

This is interesting to me because a user of DocProject has recently requested a new option for naming files with a hashed value so that topics can be bookmarked.

Thanks,

Dave




Re: Developer Documentation and Help System Sandcastle: Are GUID file names actually hashes?

EWoodruff

See ProductionTransforms\AddGuidFilenames.xsl. I always assumed that GUID filenames meant that it created a new GUID for each file and thus they would be unique with each build. However, I noticed a little while ago that I got the same filenames from build to build. I looked at the transform and saw that it was actually doing an MD5 hash of the filename and returning a GUID using that value. So, instead of a GUID filename, it's probably more accurate to call it a GUID-formatted filename, one based on the MD5 hash which is constant provided the topic name doesn't change.

Note also that you can use the other transformation (ProductionTransforms\AddFriendlyFilenames.xsl) to create friendly names based on the name of the topic. The help file builder adds another option to hash the friendly name to keep it short.

Eric





Re: Developer Documentation and Help System Sandcastle: Are GUID file names actually hashes?

Dave Sexton

Thanks Eric, that's exactly what the user had asked.

DocProject does provide the option to choose friendly names or GUID names, but as you implied friendly names can be too long for some projects. I'm not sure that's it's worth the effort to hash friendly file names though since the GUID names are doing that anyway Smile

Thanks,

Dave