cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

ACL code using servlet request

Newbie

ACL code using servlet request

Help !!! 🙂

Maybe someone has seen something like this to give us help. We havesome ACL code called from the FOSI, it works when we compose from the Editor and from PE interactive. It does not work when the same file is requestedwith the servlet.

This makes no sense to us, does it make sense to anybody else?

Ellen

Tags (2)
5 REPLIES 5
Highlighted

ACL code using servlet request

Hi Ellen-



Some ACL functions behave differently in windowless mode (as in a
servlet request) from interactive mode (where there's a window for the
document). What is your ACL trying to do?



--Clay


Highlighted

RE: ACL code using servlet request


Clay,

Our ACL code is trying to delete empty nodes - using XPATH
example: unorederedlist[not(node())]
this XPATH is not matching

Is there a way we can test this faster in a "windowless" mode without using the servlet?

Ellen (Thanks for the quick answer, we are working late trying to figure this out!)


In Reply to Clay Helberg:

Hi Ellen-

Some ACL functions behave differently in windowless mode (as in a
servlet request) from interactive mode (where there's a window for the
document). What is your ACL trying to do?

--Clay

From: Ellen Headrick

Help !!! 🙂

Maybe someone has seen something like this to give us help. We have
some ACL code called from the FOSI, it works when we compose from the
Editor and from PE interactive. It does not work when the same file is
requested with the servlet.

This makes no sense to us, does it make sense to anybody else?

Ellen
Highlighted

ACL code using servlet request

Hi Ellen-



Hmm. I can't think of a reason for that to fail, unless it's something
to do with the way it's navigating the document tree. (There are some
tricks to getting it to recognize change tracking markup, for example,
in terminal or windowless mode.)



Can you include the entire function code? It might help to see the XPath
in context. It would help to know the e-i-c that calls the function.



(BTW, in your example the element name is misspelled, but I assume that
was a typo in your message rather than an error in your code. But if you
pasted directly from your code, fix the spelling of "unorderedlist" in
your code and try it again. 🙂



--Clay


Highlighted

RE: ACL code using servlet request

Clay,

Yes I am the Queen of typos! 🙂

We have decided to go down the path of traversing the document to find the empty nodes with oid_empty(o). We foundan example in the forum that we are modifying.

Here is our XPATH code:

$noChildren = xpath_nodeset(emptyNodes, "//caution[(not(node()))] | //definitionlist[(not(node()))] | //example[(not(node()))] | //examplelist[(not(node()))] | //inform[(not(node()))] | //listitem[(not(node()))] | //note[(not(node()))] | //notelist[(not(node()))] | //orderedlist[(not(node()))] | //unorderedlist[(not(node()))] | //warning[(not(node()))]");


for (i = 1; i <= noChildren.length; i++) {
oid_delete(emptyNodes[i]);}

Thanks again,

Ellen

Highlighted

ACL code using servlet request

Hi Ellen-



Sorry, I was pretty busy this week, as you can imagine (missed seeing
you at PTC/USER, btw). As for your question, you still didn't say how or
where this is code is invoked. Is it invoked via FOSI #SYSTEM-FUNC, or
as part of a custom publishing script, or some other method? If it's
called from a #SYSTEM-FUNC, which e-i-c is it called from?



--Clay


Announcements