[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Parseable output: --xml option for more commands

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2005-01-15 17:42:21 CET

Leslie Kishalmi wrote:
> +1 vote on first class element for filename. Something like this:
> <entry
> committed-date="2003-09-29T22:23:23.939789Z"
> last-author="julianfoad"
> kind="file"
> size="7"
> revision="35">eol-test</entry>

Can you say why you would prefer it this way? I know the choice between
attribute and element can be rather subjective, but if you have any concrete
reasons, that would be very helpful.

FWIW, it looks OK to me and I have no particular objection to it. It is how we
report paths in "svn log --xml -v":

<path
    action="M">/sandbox/b</path>

... and it would be sensible to follow that precedent in the absence of any
stronger requirement.

> And use CDATA as needed.

I'm not sure what you mean: would CDATA be needed in some cases but not other
cases?

I believe we have the follwing three options:

<entry ... name="Hello"/> (where attribute "name" is declared as type "CDATA")
<entry ...>Hello</entry>
<entry ...><![CDATA[Hello]]></entry>

As far I can tell from the XML spec, the set of allowable characters is the
same in each case (being the set of valid XML characters), but the escaping is
different in each case. Bizarrely, the third form seems actually the most
restrictive because I cannot see any way of representing the literal sequence
"]]>" within it; am I missing something?

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jan 15 17:45:24 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.