[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Whitespace

  • From: matt@w... (Matthew Fuchs)
  • To: digitome@i...
  • Date: Thu, 28 Aug 97 9:21:33 PDT

matt fuchs
> 
> 
> >>Won't our desperate Perl hackers' beloved $_ variable be significantly less
> >>useful if it contains the *entire* document.
> >
> >Just as it's not useful in processing HTML. Regexps that don't match across
> >line boundaries are the most common problem I've seen in HTML-processing
> >Perl scripts. Looks like that will continue until people figure out that
> >Perl's line "Feature" is jsut a big when used with XML/HTML.
> >
> 
> Bang goes the the notion of a lightweigth XML app. then! Thou shalt always
> parse!
> 
Nonsense! Regexps that fail across line boundaries are only due to
lazy DPHs.  The "s" modifer to a regex will treat the entire string
(i.e., document) as a single target.  The problem here is that
_insignificant_ whitespace (a newline) is treated significantly.
A regex modifier which treated newline, tabs, etc., as spaces would
really help reduce this problem. (Larry Wall doesn't follow this
mailing list does he?)


> XML as a friendly format to, say, DPH needs some explaining. To use Perl to
> read/write XML 
> you *must* use an XML parser. Indeed any tool intending to read/write XML
> needs to use a 
> *fully blown parser* to get at the document. Bye bye the entire Unix family
> of line oriented text processing apps:-(
> 

Maybe you just need to put a filter at the beginning of your pipeline
to normalize whitespace to whatever you need.

Matthew

-----------------------------------------------------
Matthew Fuchs
matt@w...
http://cs.nyu.edu/phd_students/fuchs
-----------------------------------------------------

xml-dev: A list for W3C XML Developers
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To unsubscribe, send to majordomo@i... the following message;
unsubscribe xml-dev
List coordinator, Henry Rzepa (rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.