> I'm wary of using whitespace as a delimiter.

Right now target names are delimited by white space.  Should we move to this
format?

<target name="foo">
  <depends target="bar"/>
  <depends target="something"/>

  <task1/>
  <task2/>
</target>

I'm joking btw.

What I was proposing (though didn't state very well is that we adopt a clear
well defined way of handling whitespace in elements and attributes).  Other
tasks use whitespace delimiters as well , ie, the <foreach> task.

I was thinking that we could use this algorithm to parse white space:

StringCollection ParseWhiteSpaceSeperatedValues(string elementValue) {

  StringCollection values = new StringCollection();

  String[] tokens = elementValue.Split();
  foreach (string s in tokens) {
    string trimmed = s.Trim();
    if (trimmed.Length > 0) {
      values.Add(trimmed);
    }
  }
  return values;
}

If you need to have a string with spaces you need to use a different method
(ie, the <includes name=""/> style).

I understand that this going against the everything XML DOM parseable but
please keep in mind that many different types of people have to read, edit
and understand these files.  What I'm proposing is a consistent way of
handling whitespace separated tokens in element and attribute values in an
effort to make the files more human readable while at the same time not
hindering their machine parseability.  This would become a standard for all
attributes and elements used by NAnt.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to