Re: [xml-dev] XML Redux
One last point, after reading through my previous post:
Such a notation doesn't preclude namespaces also using the colon (":") character; as far as I'm aware there should be no instance where a colon ever appears as the end character in XML. I.e.,
(svg:circle:(@r:(10) @fill:(red) @cx:(100) @cy:(120) @myns:foo:(bar)))
works just fine.
I also suspect that you could use implied parentheses when the first term is interpreted, but that may make parsing more complex. That is,
(svg:circle:( @r: 10 @fill: red @cx: 100 @cy: 120 @myns:foo: bar))
is probably more legible, but may be more ambiguous in terms of its interpretation. Will have to think about that one.
Finally, I've been using enclosing parameters simply an an indication that the expression is an implied sequence, but I'm not really sure that's necessary either. This would mean that a normal text block with internal markup but no container could in fact be kept as is:
It was the i:best of times, it was the i:(worst of times).
would be converted into an XDM model of
("It was the ",<i>best</i>,"of times, it was the ",<i>worst of times</i>,".")
If you had dual wrapped elements that were implied, then you would have to watch white space:
It was the b: i:best of times.
would be interpreted as
("It was the ",<b><i>best</i></b>," of times.")
while
It was the b:i:best of times.
would be
("It was the ",<b:i>best</b:i>," of times.")
Making this explicit would of course resolve the dilemma:
It was the b:(i:(best)) of times.