You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Matt Coolidge <Ma...@pcmove.com> on 2000/08/16 22:03:08 UTC
Dynamic WAP problems
Hi everyone. I'm writing a WAP application. Basically, my XSP talks to the
database and sticks the resulting DocumentFragment into the output. I can
write an XSL stylesheet to make a WAP deck, with a card for each row of
data. But it's FAR too big if I do it this way; and WAP phones error out on
it.
I need a way of paging thru that initial document, 9 or 10 (or less!) rows
per deck. But I dont want to have to do a full DB query each time i page,
and then filter out the unwanted rows from the XML, and then apply a
stylesheet to make WAP. and I cant just break up the document, bacause it's
created dynamically by my XSP page. There's gotta be a better way, right?
Thanks for ANY help,
Matt Coolidge
Re: Dynamic WAP problems
Posted by Jeff Turner <je...@socialchange.net.au>.
Sebastien Koechlin wrote:
>
> Matt Coolidge wrote:
> >
> > Hi everyone. I'm writing a WAP application. Basically, my XSP talks to the
> > database and sticks the resulting DocumentFragment into the output. I can
> > write an XSL stylesheet to make a WAP deck, with a card for each row of
> > data. But it's FAR too big if I do it this way; and WAP phones error out on
> > it.
>
> Welcome in the marvelous world of WAP :-(
>
> Currently, there isn't an easy way to split data without doing a query
> everytime. You can write a proxy with XSP, but it's really expensive.
I don't really know what I'm talking about, but..
Rick Jelliffe recently announced an application for serving XML
fragments (http://www.w3.org/TR/WD-xml-fragment). To quote from his
email (mentioned at http://www.xmlhack.com/read.php?item=706):
Fragserver is a Java Web Application designed for running on Apache
(Tomcat, Xalan, Xerces). It gives two servlets:
fragbody retrieves a branch of an XML document, as specified using
an Xpath
fragserver constructs a small Fragment Context Specification for the
same document and Xpath
For example, if I have the XML document http://www.example.com/a/b.xml
and I want the fragment //c (i.e, the first c element found and its
contents), then I can fetch the fragment body with
http://www.example.com/fragserver/servlet/fragbody/a/b/xml?xpath=//c
and the fcs with
http://www.example.com/fragserver/servlet/fragserver/a/b/xml?xpath=//c"
Possibly useful here; I'm not sure.
--Jeff
>
> You need to tell cocoon which page you want. You can add
> a parameter to your query, like 'mytodo.xsp?page=4'. Cocoon
> cache will not work on this as the query is alway different.
>
> To split your data:
>
> 1. Producer: you can limit your query
> 2. Processor: XSLT/XPath can split your DOM-tree
> 3. Formatter: Currently, XML Formatter can not split data,
> and Formatter are not designed to do that.
>
> Forget about Cocoon's goal of a complete separation of the three
> layers.
>
> --
> Sébastien Koechlin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: Dynamic WAP problems
Posted by Sebastien Koechlin <sk...@ivision.fr>.
Matt Coolidge wrote:
>
> Hi everyone. I'm writing a WAP application. Basically, my XSP talks to the
> database and sticks the resulting DocumentFragment into the output. I can
> write an XSL stylesheet to make a WAP deck, with a card for each row of
> data. But it's FAR too big if I do it this way; and WAP phones error out on
> it.
Welcome in the marvelous world of WAP :-(
Currently, there isn't an easy way to split data without doing a query
everytime. You can write a proxy with XSP, but it's really expensive.
You need to tell cocoon which page you want. You can add
a parameter to your query, like 'mytodo.xsp?page=4'. Cocoon
cache will not work on this as the query is alway different.
To split your data:
1. Producer: you can limit your query
2. Processor: XSLT/XPath can split your DOM-tree
3. Formatter: Currently, XML Formatter can not split data,
and Formatter are not designed to do that.
Forget about Cocoon's goal of a complete separation of the three
layers.
--
Sébastien Koechlin