Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "COSMOS Design 205825"

(SML spec changes)
(SML-IF spec changes)
Line 85: Line 85:
 
# optional schemaComplete attribute added to the model element to define an IF documents where all required documents are being included inline.
 
# optional schemaComplete attribute added to the model element to define an IF documents where all required documents are being included inline.
 
# '''Major change''' : Optional schemaBinding element used to bind instances with definition documents included in IF. In the current implementation of the SML validator, binding of instances with required definition documents is done by namespace matching. Namespace matching is the default approach when  a namespaceBinding is not specified
 
# '''Major change''' : Optional schemaBinding element used to bind instances with definition documents included in IF. In the current implementation of the SML validator, binding of instances with required definition documents is done by namespace matching. Namespace matching is the default approach when  a namespaceBinding is not specified
 +
 +
 +
--[[User:Popescu.ca.ibm.com|Popescu.ca.ibm.com]] 15:32, 28 February 2008 (EST)
 +
Spec changes applied after January 14
 +
 +
# new, optional, SMLIFVersion attribute in the document's model element ( see IF section 5.2.4 SML-IF Document Version )
 +
# sml:nilref attribute can be defined on any element declaration; if that element is not an sml reference ( does not have sml:ref=true ) then the validator should simply ignore the nilref attribute. It can optionally issue a warning message
 +
# Relative reference processing changes:
 +
## the model/identity base URI value has been moved back from being the xml:base attribute on the identity element to a child element of the model/identity element, /model/identity/baseURI
 +
## document aliases can be relative references; in this case, the /model/identity/baseURI must exist and the alias is resolved to an absolute URI using /model/identity/baseURI as the base URI : alias = URI(/model/identity/baseURI).resolve(aliasRelativeURI) - see section 5.3.3 Document Aliases
 +
## (major change) introduced the notion of a baseURI at the document/docInfo level (see section 5.3.2 Base URIs ). This value, if defined, will be used to resolve relative references in the contained document. If this value exists and is not an absolute URI then the base uri for resolving relative references in the contained document is resolved as URI(modelBaseURI).resolve(documentBaseURI). Note that in this case the model's base uri must exist.
 +
##if the document/docInfo/baseURI is not defined on a document and this document contains relative references then the /model/identity/baseURI must exist; /model/identity/baseURI will be used to resolve the relative reference to an absolute URI : absURI = URI(/model/identity/baseURI).resolve(relativeURI)
  
 
=User interface=
 
=User interface=

Revision as of 16:32, 28 February 2008

Bugzilla

  • 205825 Update SML validator implementation based on changes to the SML latest draft

Design document author

  • Valentina Popescu
  • Email : popescu@ca.ibm.com
  • Last Updated --Popescu.ca.ibm.com 17:03, 8 January 2008 (EST)

Workload Estimation

Rough workload estimate in person weeks
Process Sizing Names of people doing the work
Design 0.5
Code 3 (2 weeks for spec changes, one week for UI updates )
Test 1
Documentation 0.5 Documentation currently available only for the IF editor. This sizing includes IF doc only
Build and infrastructure NA
Code review, etc.*
TOTAL 5

'* - includes other committer work (e.g. check-in, contribution tracking)

Note: Code sizing doesn’t include time required to understand the existing code in order to make required changes. It is assumed that somebody familiar with this code will do the changes.

Requirement summary

Update SML validator implementation based on changes to the SML latest draft. The SML and SML-IF specifications have been updated and a new published version will be made available on January 10, 2008. There are changes to the spec that needs to be reflected into the COSMOS implementation. This requirement deals with updating the following COSMOS code to match the new SML spec:

  1. SML validator implementation
  2. Exchanging SML documents between SML repositories. This is done by using the Import from/Export to SMLIF actions available under the Eclipse Import/Export main menu actions.
  3. SML repository API; the COSMOS SML repository API may need to be updated to match the new specification. Based on these changes, some other components residing under Data Visualization or Data Collection project may need to be moved to this new version ( if this is required, I expect changes to the affected components to be fairly easy to do )
  4. SML-IF editor, which is based on the SML and SML-IF specifications

All items above are contained under the Resource Modeling sub project.

Short summary of SML changes ( the spec should be used though to identify the exact set, this is just to help with getting a feeling on the wok effort ):

SML spec changes

  1. sm:refType has been removed. It was used to identify an SML reference. Based on the new spec, any complex type can be an SML reference, the differentiation is done at the runtime by the presence of the sml:ref attribute.
    1. As a result, target* SML constraints can be defined on any xs:element
    2. sml:acyclic can be used on any xs:complexType
  2. SML acyclic : the graph used to verify the acyclic property is now built using elements as nodes ( before, the graph nodes were defined to be the documents containing the instances of elements with acyclic type )
    1. If CT is a complex type definition with {acyclic} true, then instances of CT MUST NOT create cycles in the model. More precisely, the directed graph constructed in the following way MUST be acyclic:
      1. The nodes in the graph are all the elements resolved to by SML references of type CT or types derived from CT.
      2. If a node N in the graph is or contains an SML reference R of type CT or a type derived from CT, and R resolves to T (which must also be a node in the graph), then an arc is drawn from N to T.
  3. smlerr namespace has been completely removed
  4. localizationid has been moved under the sml namespace and renamed to locid
  5. XML output section has been removed completely
  6. SML reference scheme definition has been updated to include a crisp definition of the sml:uri scheme and prescribes what information other reference schemes should offer
    1. SML null references identified by using the sml:nilref attribute on an element declaration.
  7. sml:keybase refer attribute is marked optional
  8. xpath1() XMLSchema scheme has been replaced by a new defined SML scheme, smlxpath1()
  9. Introduced a new attribute, sml:nilref, used to identify references that are meant to be null
    1. Definition of null, unresolved and resolved references has been revised

SML-IF spec changes

  1. smlif:baseURI attribute has been removed and replaced with xml:base ( this will be revised in the next version and baseURI will be added back, in a modified form)
  2. documents can be embedded in encoded format, in which case the base64 format will be used
  3. empty data elements are allowed; maximum one document contained by a data element is allowed
  4. the processContents for dataType is set to skip ( every other extension is lax ), so that the document contained by a data element can be skiped when validating the SML-IF document against the SML-IF schema
  5. optional schemaComplete attribute added to the model element to define an IF documents where all required documents are being included inline.
  6. Major change : Optional schemaBinding element used to bind instances with definition documents included in IF. In the current implementation of the SML validator, binding of instances with required definition documents is done by namespace matching. Namespace matching is the default approach when a namespaceBinding is not specified


--Popescu.ca.ibm.com 15:32, 28 February 2008 (EST) Spec changes applied after January 14

  1. new, optional, SMLIFVersion attribute in the document's model element ( see IF section 5.2.4 SML-IF Document Version )
  2. sml:nilref attribute can be defined on any element declaration; if that element is not an sml reference ( does not have sml:ref=true ) then the validator should simply ignore the nilref attribute. It can optionally issue a warning message
  3. Relative reference processing changes:
    1. the model/identity base URI value has been moved back from being the xml:base attribute on the identity element to a child element of the model/identity element, /model/identity/baseURI
    2. document aliases can be relative references; in this case, the /model/identity/baseURI must exist and the alias is resolved to an absolute URI using /model/identity/baseURI as the base URI : alias = URI(/model/identity/baseURI).resolve(aliasRelativeURI) - see section 5.3.3 Document Aliases
    3. (major change) introduced the notion of a baseURI at the document/docInfo level (see section 5.3.2 Base URIs ). This value, if defined, will be used to resolve relative references in the contained document. If this value exists and is not an absolute URI then the base uri for resolving relative references in the contained document is resolved as URI(modelBaseURI).resolve(documentBaseURI). Note that in this case the model's base uri must exist.
    4. if the document/docInfo/baseURI is not defined on a document and this document contains relative references then the /model/identity/baseURI must exist; /model/identity/baseURI will be used to resolve the relative reference to an absolute URI : absURI = URI(/model/identity/baseURI).resolve(relativeURI)

User interface

Some UI changes may be required to the SML-IF editor as a result of moving to the new spec. One major change is the introduction of the optional schemaBinding element that can be used to bind instance documents with definition documents. Another major change is the removal of the smlif:baseURI attribute, replaced by the sml:base attribute.

Note: Not included in the 10/01/08 spec is the update referring to the SML-IF baseURI attribute. This change will require more consistent changes to the SML-IF editor. This is not covered by this enhancement request though so it will be done post i9.

Prerequisites

Legal approval is required to check into the COSMOS CVS the updated version of the SML and SML-IF specs.

Design summary

To be done during the i9 design phase.

Back to the top