Tom,

>> Not sure if this is discussed here before, but I wonder why you don't 
>> use
>> XML for ADL. So that, it will be possible to use tens of ready made
>> parsers and validators against a DTD for a number of programming 
>> language;
>> visualize using a xslt etc. Here a quick example:
>
> XML will be one of the formats we can save to, but it is nearly 
> useless when writing new syntaxes which you want to compute with. What 
> XML is good at is only one thing really: platform independent machine 
> representation and machine-to-machine communication.

That's two!

> For example, OWL has an abstract syntax - see 
> http://www.w3.org/TR/owl-semantics/syntax.html - you might notice that 
> raw RDF is nearly impossible for humans to read or think with.

 From http://www.w3.org/TR/owl-semantics/ it seems that the abstract 
syntaxes are used to restrict the possible expressions of OWL into 
smaller subsets. Full OWL has the same syntax as RDF:

>> First, Section 2 contains a high-level, abstract syntax for both OWL 
>> Lite, a subset of OWL, and OWL DL, a fuller style of using OWL but 
>> one that still places some limitations on how OWL ontologies are 
>> constructed. Eliminating these limitations results in the full OWL 
>> language, called OWL Full, which has the same syntax as RDF.

It's interesting that from the adl-1_2_draft_d.pdf page 13, we're 
offered the following:

<owl:Class rdf:about="#Opera">
   <rdfs:subClassOf>
      <owl:Restriction>
        <owl:onProperty rdf:resource="#hasLibrettist" />
        <owl:minCardinality 
rdf:datatype="&xsd;nonNegativeInteger">1</owl:minCardinality>
      </owl:Restriction>
    </rdfs:subClassOf>
  </owl:Class>

vs.

DOCUMENT ? {
   class ? {[ac0001]}
   type ? {[ac0002]}
   attributes cardinality ? {0..*} ? {
    DOC_ATTR occurrences ? {1..*} ? {
      name ? {ac0003}
      value ? {*}
    }
   }
  }
and: OPERA ? {
   A ? { librettist cardinality ? {1..*} ? {*}
}

I've removed the comments in the second extract. Now I'm not sure about 
anyone else, and it may have a lot to do with my not being especially 
mathematically minded, but I don't regard myself as a "tortured soul" 
(page 12 para 2) for having relatively less difficulty with the first 
than the second. And I think it could be parsed by a schema-reading XML 
parser?

> We don't write in XML when writing in Java for example.

I won't unduly labour the point but that is probably more to do with 
the compactness of the latter than the lack of human readability of the 
former:

<package>org.openehr.a_package</package>
<public><class>A_class<implements>Another_class</implements>

vs.

package org.openehr.a_package;
public class A_class implements Another_class { ...

for example. I think most would still be able to "read" the former 
without difficulty. The compiled versions of either of these would not 
be human-readable (being binary) and that of course is what 
"human-readability" typically means.

>> After all, parsing is easy,

I'm not sure that this is justified. Parsing is difficult. As you well 
know, I still can't use your ADL parser and that is presently the only 
entr?e into the use of the language you have defined. Contrast this 
with the many parsers that Ergin Soysal alluded to. Writing a syntax is 
"easy" in the sense that you can sit down one day and dream one up, but 
that doesn't give it market credibility or widespread support.

> Saving ADL as XML is easy, but then of course it is no longer readable 
> in any meaningful way by humans, just by machines.

In the version of the document I cited above there are a number of 
object models given (which I haven't had a chance to unpick yet). It 
might be contended that ADL is also only really readable by machines, 
given the highly mathematical nature of its format and at the least the 
enormity of a likely script. Now, given the object model, is there any 
longer a special need for ADL? Am I right that the stated purpose was 
to enable archetype development unencumbered by issues associated with 
additional syntax? Is not the object model now the necessary and 
sufficient condition to call that process "done"? Put another way, do 
you see an archetype repository as a persistence engine for objects of 
the sort given in the document, with ADL just one of a range of 
languages for inserting and retrieving archetypes?

> In terms of validation, we wouldn't use DTD in any case, we would use 
> one of the XML schema languages, since these have typing and better 
> ability to represent higher-level concepts like constraints.

Agreed.

                Very best wishes as always, and see you soon,
                                                        Tony.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 6645 bytes
Desc: not available
URL: 
<http://lists.openehr.org/mailman/private/openehr-technical_lists.openehr.org/attachments/20040508/cff99b8f/attachment.bin>

Reply via email to