Re: empty lines

Subject: Re: empty lines
From: Chris Maden <crism@xxxxxxxxxxx>
Date: Thu, 29 Jul 1999 17:50:23 -0400 (EDT)
[Jean-Philippe Theberge]
> I'm converting a xml file to another xml DTD
> (actually weatherlabs.dtd -> wddxPacket.dtd)
>  
> The input file is a very long list of <GEOREFERENCE> elements 
> but only one of it is to be in the output file.
> 
> To select the required one I use:
> 
> (element GEOREFERENCE
>   (if (equal? (attribute-string "WMO") "71627")
>       (process-children)
>       (empty-sosofo)))
> 
> The problem is that the resulting output file is 2000 lines long
> (with the relevant code somewhere in the middle)
> 
> It seem that (empty-sosofo) is outputing a newline.

No... the newlines in the input file are generating newlines.

Try

(root
 (process-node-list
  (node-list-filter
   (lambda (snl)
     (match-element? '("GEOREFERENCE" '("WMO" "71627"))
		     snl))
   (descendants (current-node)))))

-Chris
-- 
<!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN">
<!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN"
"<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487
<USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread