Skip to main content
1-Visitor
April 14, 2014
Question

How can I use an ACL code inside the APP?

  • April 14, 2014
  • 1 reply
  • 1909 views

Hi all,

I need to use a acl code inside the APP code, and save the informations that the ACL retrieves in a variable.

1 reply

1-Visitor
April 14, 2014

Hi Robson,

ACL code is an Arbortext Editor language and won't execute inside of APP code. If you need to pass variable information between the 2 applications, I would use Javascript or Perl which are 2 languages that both applications support.

Out of curiosity, what information are you trying to pass from APP and to where?

-Jeff

rboneti1-VisitorAuthor
1-Visitor
April 14, 2014

Hi Jeff,

Actually, I could do it with this:

formatting.evaluateXPath("_acl:eval(here the acl code)")

But would be better if was possible to do this without xpath.

Answaring your question, I want to save a value in a variable and use in another element, like a global variable. And for this, I've found two ways:

application.variables and the acl ENV['name']

16-Pearl
April 14, 2014

That's a neat trick, but we have noticed with newer APP (Arbortext) releases that formatting.evaluateXPath() will now only work in a formatting context. That is to say, if try and run a script with that method it won't work. If you run that method from within a formatting tag then it will still work.

Either way, while I like your trick I'm not sure it is the best way to pass information between Arbortext/APP. It feels like that would be something liable to change or break between APP/Arbortext releases. It would be interesting to learn what you are trying to achieve in order to advise if there is a better way.