[plt-scheme] reading HTML as XML
I'm officially maintaining the XML collection.
In the comments to xml->xexpr it says "The contract is loosely
enforced." and looking at all the uses of it in the PLT tree, it
doesn't seem to matter, because all the uses obey the contract.
If I turn back on the contract enforcement, there aren't any errors in
the test suite. So, I turned it on in SVN.
Jay
On Fri, Dec 12, 2008 at 9:27 AM, Robby Findler <robby at cs.uchicago.edu> wrote:
> The docs do say that read-html-as-xml produces a list of content.
> Probably because there can be multiple html expressions in a single
> input stream.
>
> But I agree that it seems like xml->xexpr should signal an error. Its
> documented contract even suggests it should, but I'm reluctant to
> change it, not knowing how it is used ...?
>
> Robby
>
> On Fri, Dec 12, 2008 at 10:05 AM, Prabhakar Ragde <plragde at uwaterloo.ca> wrote:
>> Matthew Flatt wrote:
>>
>>> I've run into this before. The `read-html'as-xml' function produces a
>>> list of content values, and `xml->xexpr' wants a single content value.
>>> So, you probably want to `map xml->xexr'. (I'm not sure why
>>> `xml->xexpr' doesn't complain when it's given a list.)
>>
>> That works, thanks. I would never have thought to try it. --PR
>> _________________________________________________
>> For list-related administrative tasks:
>> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>
>>
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
--
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://jay.teammccarthy.org
"The glory of God is Intelligence" - D&C 93