On 09/30/10 02:52, Jack Schwartz wrote:
On 09/29/10 02:23 PM, Alok Aggarwal wrote:
Hi Jack,
On Wed, 29 Sep 2010, Jack Schwartz wrote:
IIRC, XML doesn't look at white space. If this is so, you can still
use option A (which I prefer) and still have files listed on their
own line. Something like this:
<kwargs>
<arg name="uncompressed_files">
file1
file2
file3
</arg>
</kwargs>
... and even if XML does look at white space, you can still parse
the list you get from XML into individual words (files).
True, we could do it this way. The parsing just becomes
harder though so I'd like to keep it really simple and stupid
if possible.
So according to Keith, XML preserves whitespace.
Yes, the XML libraries will not modify the element text. So, if the
manifest
contained a list of one-file-per-line, as above, then that text would be
available
for the program to process, exactly as it appeared in the manifest.
Perhaps we could require a comma between names (to account for blanks
in a name) and split() on commas and then left and right strip the
resulting strings of whitespace. That would be only a few additional
lines of python, unless there is something I'm not taking into account.
Commas are also valid parts of filenames!
% touch file,name
If you wanted to use this approach (of having a list of filenames within
a single XML element), then putting each name in (possibly optional?)
double-quotes, would probably be the way to go, eg:
<arg name="uncompressed_files">
file1
"file,2"
"file 3"
</arg>
but Keith's suggestion of having some new XML sub-element to contain each
filename is better:
<arg name="uncompressed_files">
<li>file1</li>
<li>file2</li>
<li>file3</li>
</arg>
This is also more consistent with other parts of the new schema. Eg, we
changed
a comma-separated list of pkg names in the old schema:
<ai_install_packages>
<pkg name="SUNWcsd, SUNWcd"/>
</ai_install_packages>
to a list of sub-elements in the new schema:
<software_spec ... >
<name>SUNWcsd</name>
<name>SUNWcs</name>
</software_spec>
- Dermot
Thanks,
Jack
Thanks,
Alok
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss