cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ovidiu Predescu <ovi...@cup.hp.com>
Subject Re: Using URLSource for Remote XML Data
Date Sat, 10 Nov 2001 01:35:12 GMT
You can use XScript to insert an XML document into your page
(available on the 2.1-dev CVS tree only). The following XSP fragment
should do it:

<xsp:page language="java"
  xmlns:xsp="http://apache.org/xsp"
  xmlns:xscript="http://apache.org/xsp/xscript/1.0"
>

<page>
  <xscript:variable name="my-var" href="http://your.server.com/path/to/xml"/>
  <xscript:get name="my-var"/>
</page>

</xsp:page>

You can also check out the XScript and SOAP samples on the CVS main
trunk.

Unfortunately there isn't any documentation on XScript yet, I still
need to produce one. So please let me know if you need further
assistance.

Regards,
Ovidiu

On Fri, 9 Nov 2001 16:51:59 -0800 , Mitchell Christensen <mchristensen@redknife.com>
wrote:

> 
> > Is there a way to instantiate an
> > org.apache.cocoon.components.source.URLSource object from within an XSP
> > page?  My problem is providing an
> > org.apache.avalon.framework.component.ComponentManager object to the
> > constructor.  Where would I get one of those from within XSP java code?
> > In a nutshell, I'm trying to read remote XML documents via http from
> > within an XSP page.  I would like to avoid parsing this into a DOM before
> > generating the necessary SAX events.  If I use an URLSource object to
> > retreive the remote document, I believe that I can then simply pass that
> > to the <xsp:expr/> tag, as it implements XMLizable.  However, I can't
> > instantiage the URLSource object without a ComponentManager.
> > Does anyone know how to reference a ComponentManager from within the
> > XSPGenerator?
> > Thanks in advance.
> > -Mitch
> > 
> > --------------------------
> > Mitch Christensen
> > Principal Architect
> > Redknife, Inc.
> > 3095 Independence Dr.
> > Livermore, CA  94550
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message