[kepler-dev] Proposal for changing kar xml schema

Jing Tao tao at nceas.ucsb.edu
Mon Apr 19 15:52:18 PDT 2010


Hi, devs:

Ben and I dicussed the kar xml schema a little bit. We think the 
karEntryAttributeType should be loose since we may add more elements in 
the future. For example, wrp suite will need more elements. If we keep it 
as fixed elements, we may end up upgrading the schema very frequently.

Here is the current schema:

https://code.kepler-project.org/code/kepler/branches/releases/release-branches/core-2.0/src/org/kepler/kar/karxml/KARFile.xsd

Here are parts about karEntryAttributesType:

<xs:complexType name="karEntryType">
     <xs:sequence>
        <xs:element name="karEntryAttributes" type="karEntryAttributesType"/>
        <xs:element name="karEntryXML" type="xs:anyType" />
      </xs:sequence>
</xs:complexType>

<xs:complexType name="karEntryAttributesType">
     <xs:sequence>
        <xs:element name ="Name"  type="xs:string" />
        <xs:element name ="dependsOn" minOccurs="0" />
        <xs:element name ="dependsOnModule" minOccurs="0" />
        <xs:element name ="handler" />
        <xs:element name ="lsid" />
        <xs:element name ="type" />
     </xs:sequence>
</xs:complexType>

We propose two options to add the flexibility:

1. Change the type of the element "karEntryAttributes" to "anyType", also 
remove complexType "karEntryAttributesType". So the schema will look like:

<xs:complexType name="karEntryType">
     <xs:sequence>
        <xs:element name="karEntryAttributes" type="xs:anyType"/>
        <xs:element name="karEntryXML" type="xs:anyType" />
      </xs:sequence>
</xs:complexType>

2. Add a new element "customAttribute" to the complexType 
"karEntryAttributesType" and the "customAttribute" will be "anyType". So 
the schema will looks like:

<xs:complexType name="karEntryType">
     <xs:sequence>
        <xs:element name="karEntryAttributes" type="karEntryAttributesType"/>
        <xs:element name="karEntryXML" type="xs:anyType" />
      </xs:sequence>
</xs:complexType>

<xs:complexType name="karEntryAttributesType">
     <xs:sequence>
        <xs:element name ="Name"  type="xs:string" />
        <xs:element name ="dependsOn" minOccurs="0" />
        <xs:element name ="dependsOnModule" minOccurs="0" />
        <xs:element name ="handler" />
        <xs:element name ="lsid" />
        <xs:element name ="type" />
        <xs:element name="customAttribute" type="xs:anyType" minOccurs="0"/>
     </xs:sequence>
</xs:complexType>

So option 1 will looser than option 2. Do you have any comment and 
suggestion about these two possible changes? Thank you very much!

By the way, since we haven't officially released kepler 2.0 yet, so the 
namespace of the schema will still keep 
"http://www.kepler-project.org/kar-2.0.0" even though we will make some 
change on it.

Thanks,

Jing


Jing Tao
National Center for Ecological
Analysis and Synthesis (NCEAS)
735 State St. Suite 204
Santa Barbara, CA 93101


More information about the Kepler-dev mailing list