The Schematron file uses the prefix plcs: in the schematron rules.
E.g.
<sch:rule context="//plcs:LifeCycleStage"></sch:rule>
As the XSD is elementFormDefault="unqualified" remove the prefix.
Also, the XPATH in a number of rules has an additional @uidRef=
E.g.
test="./plcs:Definition[not(@uidRef=(@uidRef=//plcs:ExternalItem/@uid or @uidRef=//plcs:ExternalOwlObject/@uid))]"
fixed in:
plcslib/xsl/generate_sch/plcs_psm_xmi2sch.xsl revision: 1.6 and
plcslib/data/PLCS/psm_model/plcs_psm.sch revision: 1.25
and in:
plcslib/data/PLCS/psm_model/plcs_psm.sch revision: 1.26
plcslib/xsl/generate_sch/plcs_psm_config.xml revision: 1.4
In addition the schematron is not checking for the elements that are defined by @xsi:type
E.g in XML
The rule:
Fails as it is looking for <productdesigntoindividual> which will never exist
It needs to be:</productdesigntoindividual>
Last edit: Rob Bodington 2013-05-24
A further issue is the rule
This assumes that Classification is a Property of type ExternalClass
In fact the Block SecurityClassificationAssignment has a Property Classification of type SecurityClassification
<sch:rule context="//Classification"> changed to <sch:rule context="//ClassifiedAs/Classification"> and <sch:rule context="//Identifier"> changed to <sch:rule context="//Id/Identifier"> in plcslib/xsl/generate_sch/plcs_psm_xmi2sch.xsl revision: 1.7
and
plcslib/xsl/generate_sch/plcs_psm_config.xml revision: 1.5
and
plcslib/data/PLCS/psm_model/plcs_psm.sch revision: 1.27
Last edit: Mike Ward 2013-06-07
These changes <sch:rule context="//Classification"> changed to <sch:rule context="//ClassifiedAs/Classification"> and <sch:rule context="//Identifier"> changed to <sch:rule context="//Id/Identifier"> reverted in:</sch:rule></sch:rule></sch:rule></sch:rule>
plcslib/xsl/generate_sch/plcs_psm_xmi2sch.xsl revision: 1.7
and
plcslib/xsl/generate_sch/plcs_psm_config.xml revision: 1.5
and
plcslib/data/PLCS/psm_model/plcs_psm.sch revision: 1.28
CCB Call 2013-06-10
Accepted
fixed to cope with xsi:type declarations - eg:
<sch:rule context="//AnalysisAssignment">
<sch:report test="./AssignedAnalysis<span>[not(\@uidRef=//ProductVersion[substring-after(\@xsi:type, ':')='AnalysisVersion']/\@uid)]</span>">AnalysisAssignment: AssignedAnalysis/@uidRef declared for which there is no
corresponding ProductVersion/@xsi:type='AnalysisVersion' @uid</sch:report>
</sch:rule>
plcslib/xsl/generate_sch/plcs_psm_config.xml revision: 1.6
plcslib/xsl/generate_sch/plcs_psm_xmi2sch.xsl revision: 1.8
plcslib/data/PLCS/psm_model/plcs_psm.sch revision: 1.29
BaseRootObjects should NOT use xsi:type.
E.g.
Should be
There should be a schematron rule that enforces this:
Last edit: Rob Bodington 2013-06-16
abstract blocks removed from xsi:typed element tests and pattern added that prevents creation of top level elements cotaining xsi:type -->
<sch:pattern id="user-content-XsiPattern">
<sch:rule context="//PlcsDataContainer|DataContainer/*">
<sch:report test="@xsi:type"> The element <name> is defined by @xsi:type <value-of select="@xsi:type">. Do not use @xsi:type for BaseRootObjects The element
should be: [<value-of select="substring-after(@xsi:type,':')">]</value-of> </value-of></name></sch:report>
</sch:rule>
</sch:pattern>
plcslib/data/PLCS/psm_model/plcs_psm.sch revision: 1.32
plcslib/xsl/generate_sch/plcs_psm_xmi2sch.xsl revision: 1.9
plcslib/xsl/generate_sch/plcs_psm_xmi2sch.xsl,v <-- plcs_psm_xmi2sch.xsl
psm prefix changed back to plcs:
plcslib/plcslib/xsl/generate_sch/plcs_psm_xmi2sch.xsl revision: 1.10
plcslib/data/PLCS/psm_model/plcs_psm.sch revision: 1.33