[
Lists Home |
Date Index |
Thread Index
]
Transformation versus Translation
- some ideas
Suppose there are two syntaxes, A and B
Suppose syntax syntax B is a transformation of syntax A such that each
expression in syntax A maps to exactly one expression in syntax B yet one
expression in syntax B may map to multiple expressions in syntax A, i.e.
there is a 1-n relation between instances of syntaxes A and instances of
syntax B.
If syntax B is some simplification of XML that does not have attributes and
we consider that syntax to be a datamodel of XML, and further that that
datamodel be the basis of all processors that read XML, then it will still
be possible to create valid expressions such as
<book desc="...">
...
</book>
<book>
<desc>...</desc>
...
</book>
where an application associates different semantics for the attribute and
element expression of desc, e.g. short-description and long-description. In
fact this means that any transformation from A to B is not a translation but
a full transformation. The unique possibilities of expression within XML
would be limited as someone has said.
Now suppose instead that B is a binary encoding of XML and that B is a
translation of A such that there is a 1-1 relation between instances of
syntax A and instances of syntax B. Then editors could make it possible to
write in syntax A and yet export to syntax B which would be used as a
transfer syntax. Then we will gain and maintain:
(a) simpler parsers
(b) faster transfer
(c) human readability
If both syntaxes eliminated attributes it would be even nicer; we would gain
(d) simplier applications
the problem is not that a piece of information cannot be adequately
expressed using only elemens, but that the possibility of attributes at all
make it possible to associate a semantic distinction between the two, and
that, if this distinction is not present in the representations that is fed
to an application, it may consequently disrupt that application. However
non-best practice it is to make semantic distinctions between attributes and
elements with the same name, the possibility is there and is fair.
However in the 1-1 relation any semantics of applications will be consistent
because there is exactly one way to transform back and forth, i.e.
translation. Further it may be possible via. schemas to imply that some
element be given an attribute-ish visual representation and interaction
semantics in editors quite similar to current attributes such that the
visual eye-candy aspect of attributes for human readers/writers is
preserved.
Any problems*?
Regards,
Bent Rasmussen
(* except that the boat has left)
(ps. This also seems to be somewhat related to the concepts of intensional
and extensional logic as per RDF-MT.)
_________________________________________________________________
Hold kontakten med dine venner med MSN Messenger http://messenger.msn.dk
|