> First off, I'm a fully fledged newbie when it comes to cocoon, so at this > stage I'm looking for pointers rather than absolute answers - although that > would be nice ;-) > > I've used Cocoon to translate some xml documents to wml format using the > bog-standard wml converter that the "Hello, World" samples use and it works > without any problems when viewing them using a desktop browser. > > The problem that I have to solve is concerned with using wml with mobile > devices. These devices often have small amounts of memory, and a limited > file size that they can accept (eg the Nokia 7110 has a maximum file size of > 1397 bytes.) > > What would be the best strategy to adopt to split the xml or wml file into a > suitable size (NB the split file must, of course be valid xml.) How have > other people dealt with this problem?
I have handled this by by using statements in a style sheet that extracts out one subsection of a single XML file before transforming it to WML. So, the sitemap looks like: <map:match pattern="browser/features.xml"> <map:generate src="xml/browser/modules.xml"/> <map:transform src="stylesheets/onesection.xsl" > <!-- this style sheet extracts out --> <map:parameter name="where" value="Features"/> <!-- the section named 'Features' only --> </map:transform> <map:call resource="xml-page"> <!-- the primary stylesheets for conversion to --> <map:parameter name="level" value="back" /> <!-- WML or HTML depending upon the browser --> </map:call> </map:match> <map:match pattern="browser/info.xml"> <map:generate src="xml/browser/modules.xml"/> <map:transform src="stylesheets/onesection.xsl" > <map:parameter name="where" value="Modules Info"/> <!-- this one extracts 'Modules Info' --> </map:transform> <map:call resource="xml-page"> <map:parameter name="level" value="back" /> </map:call> </map:match> The XML file, (modules.xml) has the structure, <section><id>Modules Info</id> ... </section> <section><id>Features</id> ... </section> <section><id>Benefits</id> ... </section> ... etc.. Then we just arrange it so that an HTML browser will only see links to 'modules.xml' while a WML browser will see links to 'features.xml' and 'info.xml', etc. -- Dr. Everett (Skip) Carter Phone: 831-641-0645 FAX: 831-641-0647 Taygeta Scientific Inc. INTERNET: [EMAIL PROTECTED] 1340 Munras Ave., Suite 314 WWW: http://www.taygeta.com Monterey, CA. 93940 --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>