Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 76131 invoked by uid 500); 20 Apr 2001 13:33:18 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 76091 invoked from network); 20 Apr 2001 13:33:18 -0000 Message-ID: <20010420133319.36516.qmail@web10703.mail.yahoo.com> Date: Fri, 20 Apr 2001 06:33:19 -0700 (PDT) From: Cassandra Bonner Subject: Fwd: WML "encoding" $,<,>,',", etc... To: cocoon-users@xml.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Hello, Answer to my own question. After pulling my head out of my %^#, I realized this could be much easier handled by converting the text within my xsl template for my WML. Found this link on dpawson.co.uk (a great xslt & xpath reference btw) and thought i'd pass on the solution. http://www.dpawson.co.uk/xsl/N8343.html#d44e36871 thanks, cass --- Cassandra Bonner wrote: > Date: Wed, 18 Apr 2001 18:50:00 -0700 (PDT) > From: Cassandra Bonner > Subject: WML "encoding" $,<,>,',", etc... > To: cocoon-users@xml.apache.org > CC: cbonner_98@yahoo.com > > Hi, > > Did a quick search through the archives and didn't see this one > covered. > > I'm currently demo-ing a site using cocoon, that will be returning > ouput to multiple devices (e.g. any WAP-enabled device, ipac IE > browser, ipac EZWap browser, netscape, ie, etc). > > Cocoon's pretty cool and working great for this, but I was > wondering > if there's anything that's been done for WML-specific "encoding" to > translate $'s to $$'s and &'s to &, etc. These translations > only > needs to occur for WML - which is particularly relevant for the > dollar sign - as it will display two (2) $$'s for all non-WML. For > example, our current perl code to do this specifically for our WML > is > as follows: > > NOTE:: Some of these will be translated via the email if viewing as > html - as many people do - so just know that these originally (when > i > sent this message) said some like & to & + amp + ;, etc.... > > if (defined ($str)) { > $str =~ s/\&/\&/g; > $str =~ s/\ $str =~ s/\>/\>/g; > $str =~ s/\'/\'/g; > $str =~ s/\"/\"/g; > $str =~ s/\$/\$\$/g; > > # return the encoded string > return $str; > } > > I'm currently hacking it for a demo (hard-coding on the user-agent > header), but I'd like to be able to leverage cocoon's functionality > with respect handling output based on the user agent. > > If there isn't an existing solution, I'm planning to write a > content > manager which leverages the Browser and Manager classes within the > cocoon src to determine if the user agent coming in is one of the > cocoon.properties browser configs that will be returning WML - and > only encode for those. I'd really rather not have to do this > though > as it somewhat nullifies the whole cocoon functionality. > > Any advice on how this can be handled other than checking UserAgent > "cagetory" and only encoding for those returning WML will be > greatly > appreciated. > > thanks in advance, > cass > > > __________________________________________________ > Do You Yahoo!? > Yahoo! Auctions - buy the things you want at great prices > http://auctions.yahoo.com/ > __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: