You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ulrich Mayring <ul...@denic.de> on 2000/07/14 17:54:32 UTC

How to execute embedded XSP?

Hello,

say I have an XSP page, which includes another XSP page. How can I tell
the parent XSP page to process the included XSP page?

Basically, I have this:

<xsp:page>
<xsp:logic>
	xspCurrentNode.appendChild(
	     XSPUtil.cloneNode(
	         
this.xspParser.parse(inputsource).getDocumentElement(),document));

	expand-included-XSP-tags-here-but-how();
</xsp:logic>
</xsp:page>

inputsource is my InputSource, that points to the XSP page to be
included.

thanks in advance for any pointers,

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: How to execute embedded XSP?

Posted by Uli Mayring <ul...@denic.de>.
On Fri, 14 Jul 2000, Donald Ball wrote:

> > say I have an XSP page, which includes another XSP page. How can I tell
> > the parent XSP page to process the included XSP page?
> 
> i can't think of any way this could possibly work. i'd use xinclude or an
> external entity.

Me too, but in this case I think it doesn't work any way else (not your
fault, probably my architecture sucks ;-)

You probably know the .htaccess files that apache has. They are great, you
can distribute them liberally over your filesystem and they work for the
directory they are in and all sub-directories - except if in one
subdirectory there is a new .htaccess file.

Now we want something like this for cocoon. Ok, wrong - *I* want something
like this for cocoon :)

Only that I don't want to base the system on directories, but on the XML
files themselves. Meaning that the XML file itself says which
authorization file it uses. That saves me the overhead of locating the
right access file in 99% of the cases, because most files (on a website
at least) are public. So, a protected file would say something like:

<mytaglib:accessfile href="myaccessfile.xml"/>

Finally, myaccessfile.xml might have:

<mytaglib:allow>
<user>ulrich</user>
<user>pete</user>
<group>admin</group>
</mytaglib:allow>

So, whenever mytaglib:accessfile is executed, it has to include
myaccessfile.xml and expand the mytaglib:allow tags from the included
data. Perhaps this idea is seriously flawed, but it was the first that
came to my mind :)

Ulrich

-- 
Ulrich Mayring
DENIC eG, Softwareentwicklung


Re: How to execute embedded XSP?

Posted by Donald Ball <ba...@webslingerZ.com>.
On Fri, 14 Jul 2000, Ulrich Mayring wrote:

> Hello,
> 
> say I have an XSP page, which includes another XSP page. How can I tell
> the parent XSP page to process the included XSP page?
> 
> Basically, I have this:
> 
> <xsp:page>
> <xsp:logic>
> 	xspCurrentNode.appendChild(
> 	     XSPUtil.cloneNode(
> 	         
> this.xspParser.parse(inputsource).getDocumentElement(),document));
> 
> 	expand-included-XSP-tags-here-but-how();
> </xsp:logic>
> </xsp:page>
> 
> inputsource is my InputSource, that points to the XSP page to be
> included.

i can't think of any way this could possibly work. i'd use xinclude or an
external entity.

- donald