General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion How to include templates in xac file?

  • biswajitsr

    How to include templates in xac file?

    Participants 0
    Replies 1
    Last Activity 11 years, 11 months ago

    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?

    Reply

    Derek Read

    Reply to: How to include templates in xac file?

    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);[/code]

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support