From: Andreas L. <no...@sb...> - 2001-05-28 14:25:30
|
I have been working on a XACE draft specication and prototype. The following is still totally open and subject to change. I just wanted to get your feedback (especially from Eric - since I don't want to waste furthere time on the project if it is not going to make it into GOBO and thus eXML): Here is the XML Schema: -- <?xml version="1.0"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:annotation> <xsd:documentation xml:lang="en"> XACE </xsd:documentation> </xsd:annotation> <!-- the two root level constructs. one for applications, one for libraries --> <xsd:element name="system" type="SystemType"/> <xsd:element name="library" type="LibraryType"/> <!-- the root element for applications. similar to "system" in ACE files --> <xsd:complexType name="SystemType"> <xsd:attribute name="name" type="xsd:string" use="required"> <xsd:sequence> <xsd:element name="root" type="RootType" minOccurs="1" maxOccurs="1"/> <xsd:element name="clusters" type="ClustersType" minOccurs="1" maxOccurs="1"/> </xsd:sequence> </xsd:complexType> <!-- the root element for libraries. --> <xsd:complexType name="LibraryType"> <xsd:attribute name="name" type="xsd:string" use="required"/> <xsd:sequence> <xsd:element name="clusters" type="ClustersType" minOccurs="1" maxOccurs="1"/> </xsd:sequence> </xsd:complexType> <!-- element specifieng the root class and creation procedure of a system --> <xsd:complexType name="RootType"> <xsd:attribute name="name" type="xsd:string" use="required"/> <xsd:attribute name="creation_procedure" type="xsd:string" use="required"/> </xsd:complexType> <!-- sequence of clusters --> <xsd:complexType name="ClustersType"> <xsd:sequence> <xsd:element name="cluster" type="ClusterType" minOccurs="0"/> </xsd:sequence> </xsd:complexType> <!-- individual cluster --> <xsd:complexType name="ClusterType"> <xsd:attribute name="name" type="xsd:string" use="required"/> <xsd:sequence> <xsd:choice> <xsd:element name="path" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="library" type="xsd:string" minOccurs="1" maxOccurs="1"/> </xsd:choice> <xsd:element name="cluster" type="ClusterType" minOccurs="0"/> </xsd:sequence> </xsd:complexType> </xsd:schema> -- The missing bits (besides meta data such as version, author, documentation, ...) are external clauses and option clauses. Here is an example for an XACE file: -- <?xml version="1.0"?> <system name="FOO"> <root class="FOO" creation_procedure="make"/> <clusters> <cluster name="xace_test"> <path location="${EXML}/src/xace/test/"/> <cluster name="KERNEL"> <library location="${EXML}/library/kernel.xace"/> </cluster> </cluster> </clusters> </system> -- It will be a property of XACE that external classes (different from all aproaches done till yet) can be nested. So sub-clusters and libraries each declare their external dependecies and the resulting build files will get this information merged together. This solves the problem of combining differen C dependent libraries. The xace tool has the following command line usage: xace [-DVALUE]* [--se|--ise|--ve|--hact] [options] xace-file Where -D defines conditional variables, that serve a similar process than they do in gepp. I thought a lot about this. But I think going for it is the best way. Here is an example (not yet in Schema) of how such a conditional will look like: Only if a variable is defined the cluster will be included. the same can be done for options and external clauses of course. For every selected compiler a variable with the compiler short hand in upper case will be defined automatically. -- <cluster condition="ISE|HACT"> ... </cluster> -- Also the scheme is quite strict now. It never assumes default values. These can be introduced in a later stage of the project. The use of the KERNEL library is an interesting application of the conditional. An application only needs to inlcude this one-liner and the kernel.xace file that will ship with eXML (together with the xace tool). The kernel cluster will include conditional clusters so your build files will only get what they need. to produce the output for SE for example all that needs to be done in for the above example is: xace --se foo.xace feedback welcome, Andreas |