ok thanks, what i did is to change manually the template doc to introduce this feature. (quite easy to do using )
FindReplaceOptions replaceOptions = new FindReplaceOptions();
// <<doc [".
replaceOptions.ReplacingCallback = new ReplaceRelativePathInSubTemplateEvaluator(templatePath);
doc.Range.Replace(new Regex("<<doc \["\.\/"), string.Empty, replaceOptions);
internal class ReplaceRelativePathInSubTemplateEvaluator : IReplacingCallback
{
string relativePath = string.Empty;
public ReplaceRelativePathInSubTemplateEvaluator(string templatePath)
{
this.relativePath = Path.GetDirectoryName(templatePath).Replace("\\", "/");
}
public ReplaceAction Replacing(ReplacingArgs e)
{
DocumentBuilder builder = new DocumentBuilder((Document)e.MatchNode.Document);
builder.MoveTo(e.MatchNode);
string docTag = string.Format("<<doc [\"{0}/", this.relativePath);
builder.Write(docTag);
return ReplaceAction.Replace;
}
}