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

Re: XML attributes (was: Re: CVS update: ....)

From: Karl Fogel <kfogel_at_galois.collab.net>
Date: 2000-10-23 15:52:17 CEST

There are some attributes which we *know* will never be long or hold
binary data. Such as: what is the type of this diff data, is it
gnudiff, or vcdiff, or svndiff, or something else?

Where we are privately labelling some property of pcdata that comes
later, an attribute seems appropriate and convenient. Do you foresee
any danger from such uses?

-K

Greg Stein <gstein@lyra.org> writes:
> A little note re: the attribute comment below: at some point, I'm probably
> going to start a gentle push to *not* use XML attributes at all. Consider
> that attributes can be child elements with a simple transform:
>
> <set name="foo">bar</set>
>
> becomes
>
> <set><name>foo</name>bar</set>
>
> The interesting point is that a child element is *much* more flexible than
> an attribute. Elements can hold structured data, they can be extended, etc.
> Attributes can only be a simple string. Read: less flexible, harsher upgrade
> path.
>
> Cheers,
> -g
>
> On Mon, Oct 23, 2000 at 08:27:46AM -0500, Karl Fogel wrote:
> > Yes, I just forgot the DTD. Ignore my worries from earlier.
> > -K
> >
> > Greg Hudson <ghudson@MIT.EDU> writes:
> > > I wrote:
> > > >> What precisely are you anticipating here? I don't see how it would
> > > >> make sense to put anything directly in the pcdata of a prop-delta.
> > >
> > > Karl wrote:
> > > > If a prop change includes binary data, how would we encode it as an
> > > > attribute? Or, even if encoding random binary data as XML attribute
> > > > values is legal (which I don't know but could be the case), what if
> > > > the prop change is *huge*? What if someone's sending a GIF image as
> > > > the value of the property?
> > > [and a bunch of other stuff, which I understood but which is also
> > > beside the point]
> > >
> > > Right now a prop-delta looks like this:
> > >
> > > <prop-delta>
> > > <set name="foo">bar</set>
> > > <delete name="baz"/>
> > > </prop-delta>
> > >
> > > So we already put property values in pcdata, but not the pcdata of the
> > > prop-delta element. (And the pcdata of the set element is already
> > > protected.)
> > >
> > > I don't see how it would ever make sense to put anything in the pcdata
> > > of the prop-delta element itself; you wouldn't know which property you
> > > were modifying.
>
> --
> Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:12 2006

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.