This page is a subpage of [[CMDI 1.2]] = Mandatory MDProfile header element = [[PageOutline(1-4)]] == The issue == In CMDI 1.1, all header elements are optional including !MdProfile. Because of this, and the fact that the xsi:schemaLocation attribute cannot be made mandatory either, it is possible to create schema valid CMDI instances that do not link back to the profile they are based on. == Proposed solution == Make /CMD/Header/!MdProfile a mandatory element path in all CMDI instance (through the new version of the [/metadata/trunk/toolkit/xslt/comp2schema-v2/comp2schema-header.xsl comp2schema-header XSD]). === Pros === With this solution, it is guaranteed that all valid metadata instances have the ID of their profile specified. === Cons === * the correctness of the referenced profile (i.e. the value of !MdProfile actually identifying the profile the instance was based on) is not enforced (this could be done through the schema but may be overly restrictive) * upgrading from 1.1 instances without a !MdProfile header item may be complicated or in some (theoretical) cases impossible because the information is simply not available (which is the issue being addressed here!). Possibly a dummy 'unknown' profile ID could be inserted in those cases if there are any. === Centre impact === Aside from the general conversion, generation scripts may need to be updated. === Implementation examples === comp2schema-header: {{{#!xml ... ... }}} == Tickets == {{{#!comment Below replace the word 'keyword' in both the the text and the ticket query }}} Tickets in the CMDI 1.2 milestone with the keyword ''mdprofile'': [[TicketQuery(keywords=~mdprofile,milestone=CMDI 1.2,format=table,col=summary|owner|component|priority|status)]] == Discussion == Axel Herold: I would strongly oppose an 'unknown' value for missing profile IDs on upgrade. We couldn't prevent people from misusing this option in native 1.2 profiles. Conceptually, introducing 'unknown' makes (the value of) !MdProfile optional again.