Return-Path: Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 77055 invoked by uid 500); 5 Aug 2003 01:26:05 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 77041 invoked from network); 5 Aug 2003 01:26:04 -0000 Received: from palrel13.hp.com (156.153.255.238) by daedalus.apache.org with SMTP; 5 Aug 2003 01:26:04 -0000 Received: from gort.cv.hp.com (smtp1.cv.hp.com [15.0.200.101]) by palrel13.hp.com (Postfix) with ESMTP id 3205B1C0124C for ; Mon, 4 Aug 2003 18:26:13 -0700 (PDT) Received: from iseran.com (ranier.cv.hp.com [15.87.25.18]) by gort.cv.hp.com (Postfix) with ESMTP id 7D8521FE78 for ; Mon, 4 Aug 2003 18:39:38 -0700 (PDT) Message-ID: <3F2F078B.5010205@iseran.com> Date: Mon, 04 Aug 2003 18:25:31 -0700 From: Steve Loughran User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ant Developers List Subject: Re: "echo"-task, ignorable whitespace and CDATA-elements References: <8B4A710A4FF0E8449E1066277C45C58E9405@Fenris> In-Reply-To: <8B4A710A4FF0E8449E1066277C45C58E9405@Fenris> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Morten Mortensen wrote: > ...Sure, I understand your points. And I also admit - the XML-spec does > *not* say that; it does say white-space should be passed to the app! I just > had a harder look. dont worry about it, XML is a complex little spec. And then there is XSD... > > But the same section (http://www.xml.com/axml/target.html#sec-white-space > ) does say something about "In editing XML documents, it is often convenient > to use "white space" ... to set apart the markup for greater readability". > The "xml:space" is there for some reason. Is this formulation targeted at > element-bodies? I am not at all sure, but the section does say "xml:space > may be attached to an element to signal an intention that in that element, > white space should be preserved by applications". yes, they sort of hint that, dont they. I think the hints go on DTDs, but of course ant is too complex for a classic DTD, only schema and relaxng > > Here, "in that element" can hardly mean anything but "within the body of > that element"? Or can it? > > XML-spec or not, from what I have seen, it is somewhat common within > XML-formats, that leading/trailing white-space is ignorable, I belive. Certainly everything I know ignores whitespace in places other than inside pure text elements, because it removes the ability to choose a layout of choice. We do it inline because (a) its always been that way and (b) it was that way originally because it was easier for end users. Ant build files have been, by and large, hand edited. You can see that in the build files, and you can see that in how ant works with it. There are some features that are just hard to parse (why arent dependency targets a proper XML list, for example), but easy for humans. That does make it harder for machines, but easier for people to use, which helped ant succeed. If you are doing some automated thing, incidentally, can you try and preserve whitespace wherever possible. I abhor ant gui tools that make the build file unreadable afterwards. Even reordering attributes can be distracting... --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org