(forw) Re: [Webwork-user] Name collision
Brought to you by:
baldree,
rickardoberg
From: Maurice C . P. <Ma...@Vi...> - 2000-12-08 16:25:10
|
* Rickard Öberg (ri...@jb...) wrote: > > I think the above allows arbitrary scoping. And it also allow included > pages to refer to any attribute of any property in parent page (without > this scoping the child included pages can only refer to attributes in > the result!). > I think that being able to refer to parent pages is *very* important. I'm glad that this may be coming soon. Just to clarify, you would be referring to the parent action and not the parent view, right? > Seems ok. > > Any flaws with? Pros/cons? Would the id parameter do the upward search the same way that the name parameter does today? If so, we could potentially still have name collisions, this time on the id parameter instead of the name parameter. Since we are dealing hierarchial data maybe taking a look at some of the XML syntaxes isn't such a bad idea. Maybe X-Path or XSLT? These technologies have had to deal with problem already and may have some good ideas. The @ syntax is confusing me. Using the hierarchy below: Main.action | +--name +--address (iterator) | | | +--name | +--street | +--city | (main.jsp) | +--Message.action | | | +--name | +--subject | +--text | | | (message.jsp) | | | +--Message.action | | | | | +--name | | +--subject | | +--text | | | | | (message.jsp) | | | | +--Message.action | | | | . . . . . . . . . . . . How to I address the name element of the Main.action while using address as an iterator? This example is the same problem as the original control problem. Inside the Message.action recursion, is it possible to access the parent actions elements? Inside of these, would it be possible to specify the name on the first address? Pretty harsh (but hopefully not unfair) examples. I don't just don't want to see us get locked into a syntax that can't be flexible as the rest of Webwork has so far proven to be. Later, Maurice |