General XMetaL Discussion
XMetaL Community Forum › General XMetaL Discussion › How to include templates in xac file?
-
biswajitsr July 22, 2010 at 12:20 pm
How to include templates in xac file?
July 22, 2010 at 12:20 pmParticipants 0Replies 1Last Activity 12 years, 8 months agoHow 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?
Derek Read July 23, 2010 at 1:03 am
Reply to: How to include templates in xac file?
July 23, 2010 at 1:03 amFiles 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);[/code] -
AuthorPosts
- You must be logged in to reply to this topic.