You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Peter Verhage <pe...@ibuildings.nl> on 2000/11/06 16:14:54 UTC

More taglib questions...

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