Ralf Mattes wrote:
> On Mon, 2007-04-16 at 10:33 -0400, Ryan Davis wrote:
At my workplace we've used cxml in an intranet app to generate XHTML,
using SBCL.  The only real problem we ran into was with Internet
Explorer's parser.  It choked on snippets like:

    <textarea>
    <![CDATA[
    this & that
    ]]>
    </textarea>

I don't think we've tried it with the rel-2007-02-18 version of cxml,
so there might be ways around this now.

> Can you elaborate a bit on this? I'm using cxml for quite a while and
> never had problems parsing CDATA sections. What's the problem?
It's been a while since I wrote or debugged on this code so my memory is a bit hazy, but this is what I recall:

The problem is not particularly an issue with CDATA blocks, but that we are generating xml in the xhtml namespace:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml">

Firefox correctly recognizes this as xhtml, but IE doesn't. http://www.w3.org/MarkUp/2004/xhtml-faq#ie and 
http://blogs.msdn.com/ie/archive/2005/09/15/467901.aspx

I think it is possible to get cxml to put everything in the default namespace (so you don't have the xhtml: all over the place) but this was difficult to do or caused other problems (I think this may be where the CDATA bug that Ryan referred to showed its head). For the purposes of our project we were just as happy to mandate Firefox usage rather than spend time trying to hack it into working across browsers. 

> Cheers, Ralf Mattes

  We solved that problem by
mandating Firefox usage.

That was my favorite part. :-)
Thanks,

Ryan Davis
Acceleration.net
Director of Programming Services
2831 NW 41st street, suite B
Gainesville, FL 32606

Office: 352-335-6500 x 124
Fax: 352-335-6506



Bob Hutchison wrote:
>>> Hi Bruce,
>>>
>>> On 15-Apr-07, at 4:08 PM, Bruce Durling wrote:
>>>
>>>> I'm not sure which one of the various xml libraries out there
would  
>>>> be the
>>>> best. I know that library reviews have been discussed on this list
>>>> before and I was wondering if anyone had done any xml programming
>>>> recently with lisp and could share their experience.
>>> I needed a SAX-like API, unicode (UTF-8 minimally), CDATA, and  
>>> namespaces. That left me with cl-xml and cxml. I tried cl-xml
first,  
>>> very big and complex (and for some unknown reason I couldn't
access  
>>> the cl-xml website from work, but I could from home). Moved to
cxml,  
>>> and have been quite happy with it. Primarily working with it in  
>>> Lispworks, it seems to work in SBCL as well but I haven't really  
>>> exercised it there.
>>>
>>> Good luck!
>>>
>>> Cheers,
>>> Bob
>>>
>>> ----
>>> Bob Hutchison                  -- tumblelog at <http://
>>> www.recursive.ca/so/>
>>> Recursive Design Inc.          -- <http://www.recursive.ca/>
>>> xampl for Ruby                 --
<http://rubyforge.org/projects/xampl/>


_______________________________________________
Gardeners mailing list
[email protected]
http://www.lispniks.com/mailman/listinfo/gardeners

Reply via email to