Pages: 1
Print
Author Topic: How to include templates in xac file?  (Read 3106 times)
biswajitsr
Member

Posts: 44


« on: July 22, 2010, 06:20:10 AM »

How to include templates in xac file? And how to use that when opening the file. will it be present on webserver only, withing the .XAC file?
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #1 on: July 22, 2010, 07:03:46 PM »

Files you place inside an XAC file will be extracted to a temp folder when that XAC file is used. You can locate this folder using script by asking the product where the schema (DTD or XSD), complied schema or CSS file is located.

ActiveDocument.RulesFile tells you where the schema is.
ActiveDocument.DisplayStylesFile tells you where the CSS file is.
In both cases, provided they have been extracted from an XAC file the path will be the same and all other files extracted from the XAC should be there too.

The following shows one way to extract just the path from those properties. We do not have a dedicated API for providing just the folder path at this time.

Code:
//JScript Example:
var rulesFilePath = ActiveDocument.RulesFile;
var xacFolder = rulesFilePath.substr(0,rulesFilePath.lastIndexOf("\\"));
ActiveDocument.Host.Alert(xacFolder);

Logged
Pages: 1
Print
Jump to: