Agree with that analysis. XML itself is pretty close to being raw syntax
for data structures. Those structures certainly *can* express
programming operations (XSLT being the obvious example but not the only
one), but even when that's done the document which describes the
operations is generally separate from the document which describes the
data to be operated on.
Much the same as the separation of program and data files in any other
syntax(es).
I see your point. I'll try to keep that in mind.
The word 'rule' might be poorly chosen though, how about 'constrain'.
You still want to write your 'rule' in xslt to make your xml goes from
one state to the other.
Now consider
<person name="John Doe" Balance="100"/>
<item name="dvd" price="10"/>
Each time you buy a dvd, your balance goes down by 10, which can be
expressed in your xslt script. However I can see different type of
constrain: depending if your bank allows you to have a balance below 0
or not.
The constrain -as I see it- are more like 'data', it is defined when
you open your account. And you still somehow need to say <bank-account
is-valid-if="$balance > $limit"/>
I am not sure it actually make sense, but I am just discovering the
field.
Thx anyway