[ 
https://issues.apache.org/jira/browse/UIMA-50?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12473162
 ] 

Adam Lally commented on UIMA-50:
--------------------------------

Adding this comment, which was I sent in an email some time ago:

I can add a schemaVersion=xxx attribue to our component descriptors.
What should xxx be?  Is there any relation to the framework version,
or is it completely different?  I think we agreed it's not the exact
same thing as the framework version number (v2.2 could potentially use
the same schemaVersion as 2.1, or not, we don't really know until we
get there).  If it's completely different, how do we decide on the
numbering scheme to use?

Also what effect does this have on the actual beahvior of the
framework.  Should the descriptor parsing check the version number and
immediately reject any descriptor with schemaVersion > xxx?  It some
ways it seems like the current "unknown element" errors are superior -
at least that tells you what exactly about your descriptor is not
supported in the framework version you are using, so you might have
some hope of fixing it.

Also this might end up rejecting descriptors that would actually parse
fine, if for example the newer schemaVersion introduced new optional
elements (e.g., <flowController> in an aggregate), but those elements
were not used in the descriptor currently being parsed).

So maybe it is best not to actually have the version number have any
effect on processing, but just be there so that someday we could use
it.  A future UIMA SDK version might make a change to part of the
schema but still want to provide support for older descriptors, and
could try to use the schemaVersion element to affect how it processed
that particular part of the descriptor.

Also maybe if a parse exception occurs we could include the schema
mismatch as part of the error message, in addition to the precise
reason for the parse exception.  (Maybe I could catch
InvalidXMLExceptions at the top-level of the parse and wrap them in
another InvalidXMLException whose message states that there was a
schemaVersion incompatibility?)



> Add version number to descriptors
> ---------------------------------
>
>                 Key: UIMA-50
>                 URL: https://issues.apache.org/jira/browse/UIMA-50
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Adam Lally
>            Priority: Minor
>
> It has been suggested that our component descriptor XML files should include 
> a version number, so that it would be possible to give more meaningful error 
> messages in the case of a version mismatch.  I'm not sure whether this should 
> just be the framework version number, or a different "descriptor model 
> version number" that might change less frequently.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to