Skip to content

Commit

Permalink
Fix multi predicate negation in check_mdrpi
Browse files Browse the repository at this point in the history
From commit hash ukf/ukf-testbed/de97bc9f118de854cd627c48bca509d5b28c64d7

see ukf/ukf-meta#432 for details
  • Loading branch information
Phil Smart committed Jun 4, 2024
1 parent ca3ad20 commit d3f22ed
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions mdx/_rules/check_mdrpi.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</xsl:call-template>
</xsl:template>
<xsl:template match="md:Extensions[mdrpi:RegistrationInfo]
[not(parent::md:EntityDescriptor)][not(parent::md:EntitiesDescriptor)]">
[not((parent::md:EntityDescriptor) or (parent::md:EntitiesDescriptor))]">
<xsl:call-template name="error">
<xsl:with-param name="m">RegistrationInfo must only appear within Extensions of EntityDescriptor or EntitiesDescriptor</xsl:with-param>
</xsl:call-template>
Expand Down Expand Up @@ -74,7 +74,7 @@
registrationInstant values MUST be expressed in the UTC timezone using the 'Z' timezone identifier.
-->
<xsl:template match="mdrpi:RegistrationInfo[@registrationInstant]
<xsl:template match="mdrpi:RegistrationInfo[@registrationInstant]
[substring(@registrationInstant, string-length(@registrationInstant)) != 'Z']">
<xsl:call-template name="error">
<xsl:with-param name="m">
Expand Down Expand Up @@ -126,7 +126,7 @@
</xsl:call-template>
</xsl:template>
<xsl:template match="md:Extensions[mdrpi:PublicationInfo]
[not(parent::md:EntityDescriptor)][not(parent::md:EntitiesDescriptor)]">
[not((parent::md:EntityDescriptor) or (parent::md:EntitiesDescriptor))]">
<xsl:call-template name="error">
<xsl:with-param name="m">PublicationInfo must only appear within Extensions of EntityDescriptor or EntitiesDescriptor</xsl:with-param>
</xsl:call-template>
Expand Down Expand Up @@ -162,8 +162,7 @@
Restrict the elements in this namespace which can appear directly within md:Extensions
to the two defined container elements. This will catch mis-spelled containers.
-->
<xsl:template match="md:Extensions/mdrpi:*
[not(local-name()='RegistrationInfo')][not(local-name()='PublicationInfo')]">
<xsl:template match="md:Extensions/mdrpi:*[not(local-name()='RegistrationInfo') and not(local-name()='PublicationInfo')]">
<xsl:call-template name="error">
<xsl:with-param name="m">
<xsl:text>misspelled or misplaced mdrpi element within md:Extensions: </xsl:text>
Expand Down

0 comments on commit d3f22ed

Please sign in to comment.