You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Alex Muc <al...@utoronto.ca> on 2000/04/11 21:37:53 UTC

Hi,

Quick question,

Has anyone successfully been able to use the <util:include-uri
href="..."/> tag which is part of the XSP Util tag library?

For example, with the following tag in my XSP file
  <util:include-uri href="192.168.0.4:8080/cocoon.pubs/goodxml.xml"/>

I get the following result in my XSP page:
{Unable to include: 'http://192.168.0.4:8080/cocoon/pubs/goodxml.xml'}

If you've been able to get it to work can you show an example.

Thanks
Alex.


Re:

Posted by Alex Muc <al...@utoronto.ca>.
Rob,  Thanks, that works perfectly!  And it makes my life so much easier.

Alex.

Rob Parker wrote:

> >
> > Another question for you.  Have you been able to dynamically specify the
> > include file with XSP markup such as:
> >
> > <xsp:page>
> > ...
>
> Yes, see below for some code which dynamically includes files (via http) but
> the same
> applies to an included file. This eaxample includes based on the query
> string....
>
>       <util:include-uri>
>           <util:href>
>                   <xsp:expr>
>                      &Application_URL; +
> ((request.getParameter("contentContext") == null) ? &Application_Home; :
> (request.getParameter("contentContext") + "?" + request.getQueryString()))
>            </xsp:expr>
>           </util:href>
>       </util:include-uri>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re:

Posted by Rob Parker <ro...@webcybernetics.com>.
>
> Another question for you.  Have you been able to dynamically specify the
> include file with XSP markup such as:
>
> <xsp:page>
> ...

Yes, see below for some code which dynamically includes files (via http) but
the same
applies to an included file. This eaxample includes based on the query
string....

      <util:include-uri>
          <util:href>
                  <xsp:expr>
                     &Application_URL; +
((request.getParameter("contentContext") == null) ? &Application_Home; :
(request.getParameter("contentContext") + "?" + request.getQueryString()))
           </xsp:expr>
          </util:href>
      </util:include-uri>





Re:

Posted by Alex Muc <al...@utoronto.ca>.
Great, thanks for the info.  It was a problem with the output of the called
file not being XML parseable.

Another question for you.  Have you been able to dynamically specify the
include file with XSP markup such as:

<xsp:page>
...
<xsp:logic>
 <util:include-uri>
  <xsp:attribute name=href>
   <xsp:expr>[computed string value based on parameters]</xsp:expr>
  </xsp:attribute>
 </util:include-uri>
</xsp:logic>
..
</xsp:page>

Or with some similar construct?

Thanks
Alex.

Rob Parker wrote:

> Yes I've used it alot without problems. What you're experiencing is your
> included
> documnet is causing an exception to be thrown. Access the URL on its own to
> make
> sure that the url is ok. Then look at the output - it needs to be able to be
> parsed by an
> xml parser. If its from another cocoon document you may need a cocoon-format
> instruction
> such as the output is text/xml
>
> ----- Original Message -----
> From: Alex Muc <al...@utoronto.ca>
> To: <co...@xml.apache.org>
> Sent: Wednesday, April 12, 2000 5:37 AM
> Subject: <util:include-uri>
>
> > Hi,
> >
> > Quick question,
> >
> > Has anyone successfully been able to use the <util:include-uri
> > href="..."/> tag which is part of the XSP Util tag library?
> >
> > For example, with the following tag in my XSP file
> >   <util:include-uri href="192.168.0.4:8080/cocoon.pubs/goodxml.xml"/>
> >
> > I get the following result in my XSP page:
> > {Unable to include: 'http://192.168.0.4:8080/cocoon/pubs/goodxml.xml'}
> >
> > If you've been able to get it to work can you show an example.
> >
> > Thanks
> > Alex.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: cocoon-users-help@xml.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re:

Posted by Rob Parker <ro...@webcybernetics.com>.
Yes I've used it alot without problems. What you're experiencing is your
included
documnet is causing an exception to be thrown. Access the URL on its own to
make
sure that the url is ok. Then look at the output - it needs to be able to be
parsed by an
xml parser. If its from another cocoon document you may need a cocoon-format
instruction
such as the output is text/xml

----- Original Message -----
From: Alex Muc <al...@utoronto.ca>
To: <co...@xml.apache.org>
Sent: Wednesday, April 12, 2000 5:37 AM
Subject: <util:include-uri>


> Hi,
>
> Quick question,
>
> Has anyone successfully been able to use the <util:include-uri
> href="..."/> tag which is part of the XSP Util tag library?
>
> For example, with the following tag in my XSP file
>   <util:include-uri href="192.168.0.4:8080/cocoon.pubs/goodxml.xml"/>
>
> I get the following result in my XSP page:
> {Unable to include: 'http://192.168.0.4:8080/cocoon/pubs/goodxml.xml'}
>
> If you've been able to get it to work can you show an example.
>
> Thanks
> Alex.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>