Hi,

For those who follow this discussion and find it an interesting case, hereby an 
example of the problem I’m facing.

The example throws an error: Static variable depends on itself: ……

The example concerns a 3-step cyclic construct:
       “BASE-TYPE.xqm” -> “SUPER-TYPE.xqm” -> “SUPER-SUPER-TYPE.xqm” -> 
“BASE-TYPE.xqm”,
starting of from “test.xq”.

I need the solution to comply with four rules:
- The module-functions must be %private and may only be addressed from outside 
the module through  a public module-$variable. This way inheritance between 
modules can simply be implemented by the use of variables.
- The internal structure of a module-function must be completely hidden for use 
outside the module. So if the module-function calls another function it is not 
allowed to pass this called upon function or its name in the module-function’s 
parameterlist. That is why I can’t use Leo solution here.
- The 3-step cycle structure can not be changed.
- I need a generic solution.

The solution is of course that it just works; Christian is having a look at it, 
but I thought it an interesting enough case to share and maybe somebody comes 
up with an solution that does complies to these rules as a temporary 😉 work 
around. My solution for the time being is violating my first rule.

Have fun,
Rob Stapper

PS for using the example, just extract it and copy the extracted directory in 
BaseX’s src-directory. Start "test.xq” from within BaseX and it should work

Sent from Mail for Windows 10



--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

<<attachment: cyclic_construct_issue_2020-10-20.zip>>

Reply via email to