SGMLXML.net A place for SGML and XML application developers.

July 10, 2006

show functions – new to Arbortext 5.2

Filed under: ACL,Software — cangione @ 4:49 pm






<tt>show functions [package] [output=filename]</tt>

A useful new command was added to Arbortext 5.2. The show functions command displays a list of all the functions defined in the specified package along with a count of the number of times each function was called in the current session.

package is the name of a loaded package or the fully qualified path name of the file defining the functions.

Example:

"show functions main" displayed...

Functions defined in file C:\Program Files\Epic\v5.2\lib\init.acl:

Name Calls
is_unix 29
is_windows 12
oid_is_tbl_wrapper 0
oid_is_tbl_viewimage 0
save_point 0
restore_point 0
clear_point 0
re_search_forward 0
...


May 5, 2006

Adding URL Menu Item to Arbortext Editor

Filed under: ACL — cangione @ 3:17 pm







This example shows how to add a URL as a menu item using ACL in Arbortext Editor:

<tt>menu_add &quot;.Help.&quot; &quot;W3C Technical Reports&quot;</tt>
<tt> -cmd {browse_url('<a HREF="http://www.w3c.org/tr">http://www.w3c.org/tr</a>')}</tt>


August 16, 2005

Return Path of APTCUSTOM Folder

Filed under: ACL — @ 11:58 pm

Function for finding the location of the customer folder for Epic
Editor and Styler.

_custom::get_custom_directory();

March 11, 2005

Change the color of change tracking in Epic Using ACL

Filed under: ACL — cangione @ 2:27 pm




modify_tag -global aticldel

How to run a batch file from ACL

Filed under: ACL — cangione @ 2:27 pm




You can use the ACL “sh” command, which shells out to the operating system.

For example:

sh start mybatchfile.cmd;

Return Unqiue Element Content

Filed under: ACL — cangione @ 2:27 pm




Notes:

  • Quick helper function when going after unique elements known to be present in a document.
  • No Error Handeling
  • If there are two of the same element only returns the first

Example:

function return_unique_element_content(elementname){

local status = oid_find_children(oid_null(), $arr, $elementname)

if ($status == 1) {

local elemoid = $arr[1]

local elemcontent = oid_content($arr[1]);

return $elemcontent

}

}

Searching a List for a Value in ACL

Filed under: ACL — cangione @ 2:27 pm




This provides a way of checking a value against a list.
Example:
$DOCTYPES[“FOO//BAR//EN”] = 1
$DOCTYPES[“FOO//BAR2//EN”] = 1
function check_doctype() {
$name=check_public_id();
if ($name in DOCTYPES) {
#DO SOMETHING
}
}

See what the Java class path is in Epics embedded JVM

Filed under: ACL — cangione @ 2:27 pm




Example:
 eval  java_static('java.lang.System', 'getProperty',     'java.class.path')

Show the command behind the menu item

Filed under: ACL — cangione @ 2:27 pm




Example:
eval menu_cmd(“.Format.Modify Element in Context”)

Powered by WordPress