cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Verhage <pe...@ibuildings.nl>
Subject More taglib questions...
Date Mon, 06 Nov 2000 15:14:54 GMT
I've made a taglib, that uses the Cocoon session object to store some
things... The method
to do this gets initialized as soon as it finds the <test:page> tag in a
document.

The problem is that the <test:page> tag may not be the first tag after
the <xsp:page...> tag. Because if I do so like this:

<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<xsp:page
  language="java"
  xmlns:xsp="http://www.apache.org/1999/XSP/Core"
  xmlns:test="http://test"
>
<test:page>
<page>
  <paragraph>
     balaat!
  </paragraph>
</page>
</test:page>
</xsp:page>

The "session" object is not available yet. Because the XSP library
hasn't it created yet. And also the code I've wrote in the taglib gets
included in the class declaration instead of a method of the class...

If I do it like this:

<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<xsp:page
  language="java"
  xmlns:xsp="http://www.apache.org/1999/XSP/Core"
  xmlns:test="http://test"
>
<page>
<test:page>
  <paragraph>
     balaat!
  </paragraph>
</test:page>
</page>
</xsp:page>

It works fine. But I want the <test:page> and </test:page> tags to be
the first tag after the xsp:page tag, and the last tag before the
</xsp:page> tag... How can this be accomplished, if it's even possible?
And if it isn't, why is this? I've studied the java code that gets
generated, and I've seen that the <xsp> tags only created a class that
is extended by some XSP class. That's probably the reason, but can I get
around of this?

With best regards,

Peter

Mime
View raw message