cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <gree...@hotmail.com>
Subject Fwd: xsp:implements
Date Wed, 28 Mar 2001 18:18:37 GMT
I see no problem with this. It would go inside <xsp:structure>. Any 
objections?

"Peter C. Verhage" <petercv@zeelandnet.nl> wrote:
>Could somehow a tag like this be added to XSP? Why you probably ask. Well
>it's quite simple. As you might know, when programming in JAVA you can
>define flags something like this: public final int FLAGNAME = 1;. You can 
>do
>this within an interface or a class. There's only one minor problem, if you
>want to reference to such a flag from an other (external) class you always
>have to use <interface-/class-name>.<flag-name>, e.g. Interface.FLAG. So 
>you
>can't just import the interface, class and say int test = FLAGNAME for
>example. But there is a way to make this possible, and that is by letting
>your class implement a certain interface with those flags!
>
>So in that case it would be nice if I could let the generated class for my
>page implement (a) certain interface(s) which contains the flag I want to
>use. Why would you ask? Why not just use <interface-name>.<flag-name>? 
>First
>of all, I think it's messy and a lot of unnecessary code. Second, and more
>import, is the fact I'm using an external configuration file, in which a
>certain programmer/user of my taglib can define certain stuff. And I want 
>to
>give them the abillity to activate certain flags. So in the config file you
>will find something like <tag attrib="FLAGNAME1|FLAGNAME2"/>, if select the
>value of this field with xsl:value-of and put it right into an external
>function in an external class it would not work, because it doesn't know 
>the
>flag names. That would mean the user has to do something like <tag
>attrib="Interface.FLAGNAME1|Interface.FLAGNAME2"/>... I think that's ugly,
>and probably not understandable for the average user which is going to use
>my taglib. I also tried something like this: <tag condition1="true"
>condition2="true"/> or something similar like that, and put in my taglib 
>all
>of the attribute nodes into a hashtable and give that hashtable to my class
>it's method. In the method I filter out those conditions, and so it works.
>But this has a great disadvantage because it is slow, and complex (for no
>reason whatsoever).
>
>I hope something like this could be implemented in a future release of
>Cocoon... Or maybe someone can point me into another direction which will
>also solve my "problems" in a much nicer way?!
>
>Regards,
>
>Peter
>
>
>---------------------------------------------------------------------
>Please check that your question has not already been answered in the
>FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
>To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
>For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message