[plt-scheme] make-custom-input-port missing?

From: Paulo J. Matos (pocmatos at gmail.com)
Date: Tue Apr 18 08:20:18 EDT 2006

On 17/04/06, Doug Orleans <dougorleans at gmail.com> wrote:
> Paulo J. Matos writes:
>  > Hi all,
>  >
>  > Why parsing a XML file took from the net with the line (using net/url
>  > collection):
>  > (xml->xexpr (document-element (read-xml (get-pure-port (string->url
>  > server-list-url))))))
>  >
>  > The following is returned:
>  > (Data
>  >   ()
>  >   "\r\n\t"
>  >   (FileName () "menu.asp")
>  >   "\r\n\t"
>  >   (Version () "1.1")
>  >   "\r\n\t"
>  > ...)
>  >
>  > I don't like the "\r\n\t"... I went to net docs:
>  > read-xml : [Input-port] -> Document
>  >         (...)
>  > Any non-characters other than eof read from the input-port will
>  >        appear in the document content.  Such special values may only appear
>  >        where XML content may.  See make-custom-input-port for information
>  >        about creating ports that return non-character values.
>
> You may not like "\r\n\t", but they are not `non-characters', so this
> is probably not what you want.  You probably want to look at
> `eliminate-whitespace' (in the XML collection), and then realize that
> it sucks and write your own version.  (E.g. Hans Oesterholt-Dijkema
> suggested removing whitespace strings from all non-leaf nodes.  Maybe
> this is easy with SXSLT?)
>

OK, thanks, I'll take a look at it.

> --dougorleans at gmail.com
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>


--
Paulo Jorge Matos - pocm at sat inesc-id pt
Web: http://sat.inesc-id.pt/~pocm
Computer and Software Engineering
INESC-ID - SAT Group


Posted on the users mailing list.