This project has moved and is read-only. For the latest updates, please go here.

Question about modifying XSL-T

Topics: Developer Forum
Aug 17, 2010 at 4:26 PM

I have what may be a simple question, but much googling has turned up little information.

I am trying to modify the main_sandcastle.xsl to support some custom tags. I have had some success getting this working, but its quite a headache.

It would be alot simpler to troubleshoot if I could find the actual .xml file that the XSL-T is processing on. I see that the skeleton.xml file is the basis for the file that the xsl works on, but I don't see the results of the population of the skeleton anywhere (I see the config files which assemble the various pieces into the skeleton). I have turned off CleanIntermediates so I am keeping the Working folder. Is each intermediate xml file I'm looking for only kept in memory and then discarded? Is there atleast a sample one somewhere (beyond the skeleton.xml) that I can use as a point of reference for writing the xpath queries when editing the xsl files?


Mark Huber

Aug 17, 2010 at 8:28 PM

All XSL transformations are handled in memory by BuildAssembler so it doesn't actually save the working copy as it goes along.  It loads the skeleton and then the various build components import and modify the in-memory copy.  Only the final result is saved.  Since you've turned off CleanIntermediates, you will find all the files from the build in the .\Working folder under the project's output folder.  In there, you will find a Sandcastle.config file.  You can open it and insert the following at various points between the main components to dump the document in its current state at that point:

    assembly="C:\Program Files\Sandcastle\ProductionTools\BuildComponents.dll" />

You can run BuildAssembler from the working folder and redirect the output to a file to capture the output.  You can run the BuildReferenceTopics.proj with MSBuild as it's configured to run using the stuff in the working folder.  The article Creating Custom Build Components for Sandcastle gives some background information on the build component stack and how the config file is put together if you want more information.




Aug 17, 2010 at 9:57 PM


Thanks for the input, and all your work on the project.

Mark Huber