Meddelandekvittens schematron

På denna sida hittar du schematronscript för meddelandekvittens.

DIGG-XHE-Business-Rules.scmt

<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://purl.oclc.org/dsdl/schematron" xmlns:u="utils" schemaVersion="iso" queryBinding="xslt2">  <title>Regler för DIGG XHE Profil</title>  <ns uri="http://docs.oasis-open.org/bdxr/ns/XHE/1/ExchangeHeaderEnvelope" prefix="x"/>  <ns uri="http://docs.oasis-open.org/bdxr/ns/XHE/1/AggregateComponents" prefix="xha"/>  <ns uri="http://docs.oasis-open.org/bdxr/ns/XHE/1/BasicComponents" prefix="xhb"/>  <ns uri="http://docs.oasis-open.org/bdxr/ns/XHE/1/ExtensionComponents" prefix="ext"/>  <ns uri="http://www.w3.org/2001/04/xmlenc#" prefix="en"/>  <ns uri="http://www.w3.org/2000/09/xmldsig#" prefix="ds"/>  <ns uri="http://www.w3.org/2001/XMLSchema" prefix="xs"/>  <ns uri="utils" prefix="u"/>    <!-- Context rules -->  <pattern>    <rule context="/x:XHE/ext:XHEExtensions | /x:XHE/xhb:ProfileID | /x:XHE/xhb:ProfileExecutionID | /x:XHE/xha:Header/xha:BusinessScope/xha:ExternalReference | /x:XHE/xha:Payloads/xha:Payload/xhb:Description | /x:XHE/xha:Payloads/xha:Payload/xhb:CustomizationID | /x:XHE/xha:Payloads/xha:Payload/xhb:ProfileID | /x:XHE/xha:Payloads/xha:Payload/xhb:ProfileExecutionID | /x:XHE/xha:Payloads/xha:Payload/xhb:ValidationTypeCode | /x:XHE/xha:Payloads/xha:Payload/xhb:InstanceEncryptionMethod | /x:XHE/xha:Payloads/xha:Payload/xhb:InstanceHashValue | /x:XHE/xha:Payloads/xha:Payload/xha:InstanceDecryptionInformationExternalReference | /x:XHE/xha:Payloads/xha:Payload/xha:InstanceDecryptionKeyExternalReference | /x:XHE/xha:Payloads/xha:Payload/xha:RelevantExternalReference">      <assert id="R1-XHE" test="false()" flag="fatal">Endast XML-element och attribut som angivits i denna specifikation får användas</assert>    </rule>  </pattern>  <pattern>    <rule context="/x:XHE">      <assert id="R14-XHE" test="exists(xhb:CustomizationID)" flag="fatal">CustomizationID är obligatoriskt. Element och attribut ska anges i enlighet med den tillåtna kardinalitet som framgår i syntaxmappningen.</assert>      <assert id="R14-XHE" test="exists(xha:Header/xha:BusinessScope/xha:BusinessScopeCriterion)" flag="fatal">BusinessScopeCriterionär är obligatoriskt. Element och attribut ska anges i enlighet med den tillåtna kardinalitet som framgår i syntaxmappningen.</assert>      <assert id="R14-XHE" test="exists(xha:Header/xha:FromParty)" flag="fatal">FromParty är obligatoriskt. Element och attribut ska anges i enlighet med den tillåtna kardinalitet som framgår i syntaxmappningen.</assert>      <assert id="R14-XHE" test="count(xha:Header/xha:FromParty/xha:PartyIdentification)=1" flag="fatal">FromParty/PartyIdentification får anges max 1 gång. Element och attribut ska anges i enlighet med den tillåtna kardinalitet som framgår i syntaxmappningen.</assert>            <assert id="R14-XHE" test="count(xha:Header/xha:ToParty/xha:PartyIdentification)=1" flag="fatal">ToParty/PartyIdentification får anges max 1 gång. Element och attribut ska anges i enlighet med den tillåtna kardinalitet som framgår i syntaxmappningen.</assert>            <assert id="R14-XHE" test="count(xha:Payloads/xha:Payload)=1" flag="fatal">Payload är obligatoriskt och får bara anges en gång. Element och attribut ska anges i enlighet med den tillåtna kardinalitet som framgår i syntaxmappningen.</assert>      <assert id="R14-XHE" test="exists(xha:Payloads/xha:Payload/xhb:DocumentTypeCode)" flag="fatal">DocumentTypeCode är obligatoriskt. Element och attribut ska anges i enlighet med den tillåtna kardinalitet som framgår i syntaxmappningen.</assert>      <assert id="R14-XHE" test="exists(xha:Payloads/xha:Payload/xhb:ContentTypeCode)" flag="fatal">ContentTypeCode är obligatoriskt. Element och attribut ska anges i enlighet med den tillåtna kardinalitet som framgår i syntaxmappningen.</assert>            <assert id="R14-XHE" test="exists(xha:Payloads/xha:Payload/xha:PayloadContent)" flag="fatal">PayloadContent är obligatoriskt. Element och attribut ska anges i enlighet med den tillåtna kardinalitet som framgår i syntaxmappningen.</assert>          </rule>  </pattern>      <!-- Empty elements -->  <pattern>    <rule context="//*[not(*) and not(normalize-space()) and not(ancestor::xha:PayloadContent)]">      <assert id="R2-XHE" test="false() or (namespace-uri(.)='http://www.w3.org/2001/04/xmlenc#' or namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#')" flag="fatal">Tomma element eller attribut får inte anges</assert>    </rule>  </pattern>  <!-- Business rules -->  <pattern>    <rule context="/x:XHE/xhb:CustomizationID">      <assert id="R3-XHE" test="normalize-space(.)='urn:fdc:digg.se:edelivery:xhe:1'" flag="fatal">CustomizationID måste ha korrekt värde enligt kodlista</assert>    </rule>  </pattern>  <pattern>    <rule context="/x:XHE">      <assert id="R4-XHE" test="xha:Header/xha:BusinessScope/xha:BusinessScopeCriterion[normalize-space(xhb:BusinessScopeCriterionTypeCode)='DOCUMENTID']" flag="fatal">Ett BusinessScopeCriterionTypeCode ska anges med koden DOCUMENTID</assert>    </rule>  </pattern>  <pattern>    <rule context="/x:XHE">      <assert id="R5-XHE" test="xha:Header/xha:BusinessScope/xha:BusinessScopeCriterion[normalize-space(xhb:BusinessScopeCriterionTypeCode)='DOCUMENTID_SCHEME']" flag="fatal">Ett BusinessScopeCriterionTypeCode ska anges med koden DOCUMENTID_SCHEME</assert>    </rule>  </pattern>    <pattern>    <rule context="/x:XHE">      <assert id="R6-XHE" test="xha:Header/xha:BusinessScope/xha:BusinessScopeCriterion[normalize-space(xhb:BusinessScopeCriterionTypeCode)='PROCESSID']" flag="fatal">Ett BusinessScopeCriterionTypeCode ska anges med koden PROCESSID</assert>    </rule>  </pattern>  <pattern>    <rule context="/x:XHE">      <assert id="R7-XHE" test="xha:Header/xha:BusinessScope/xha:BusinessScopeCriterion[normalize-space(xhb:BusinessScopeCriterionTypeCode)='PROCESSID_SCHEME']" flag="fatal">Ett BusinessScopeCriterionTypeCode ska anges med koden PROCESSID_SCHEME</assert>    </rule>  </pattern>    <pattern>    <rule context="/x:XHE">      <assert id="R8-XHE" test="xha:Header/xha:BusinessScope/xha:BusinessScopeCriterion[normalize-space(xhb:BusinessScopeCriterionTypeCode)='FEDERATIONID']" flag="fatal">Ett BusinessScopeCriterionTypeCode ska anges med koden FEDERATIONID</assert>    </rule>  </pattern>  <pattern>    <rule context="/x:XHE/xhb:XHEVersionID">      <assert id="R9-XHE" test="normalize-space(.)='1.0'" flag="fatal">XHEVersionID ska ha värde 1.0</assert>    </rule>  </pattern>  <pattern>    <rule context="/x:XHE/xha:Header/xha:FromParty/xha:PartyIdentification/xhb:ID">      <assert id="R10-XHE" test="normalize-space(@schemeID)='iso6523-actorid-upis'" flag="fatal">ID för FromParty ska ha attributet 'iso6523-actorid-upis'</assert>    </rule>  </pattern>  <pattern>    <rule context="/x:XHE/xha:Header/xha:FromParty/xha:PartyIdentification/xhb:ID">      <assert id="R11-XHE" test="normalize-space(@schemeID)='iso6523-actorid-upis'" flag="fatal">ID för ToParty ska ha attributet 'iso6523-actorid-upis'</assert>    </rule>  </pattern>  <pattern>    <rule context="/x:XHE/xha:Payloads/xha:Payload[xhb:InstanceEncryptionIndicator=true()]">      <assert id="R12-XHE" test="xha:PayloadContent/en:EncryptedData" flag="fatal">PayloadContent ska innehålla elementet 'EncryptedData' om InstanceEncryptionIndicator är 'true'</assert>    </rule>  </pattern>  <pattern>    <rule context="/x:XHE/xha:Payloads/xha:Payload[xhb:InstanceEncryptionIndicator=false()]">      <assert id="R13-XHE" test="not(xha:PayloadContent/en:EncryptedData)" flag="fatal">PayloadContent ska inte innehålla elementet 'EncryptedData' om InstanceEncryptionIndicator är 'false'</assert>    </rule>  </pattern>  </schema>

DIGG-XHE-Business-Rules.xslt

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><xsl:stylesheet xmlns:xs="http://www.w3.org/2001/XMLSchema"                xmlns:xsd="http://www.w3.org/2001/XMLSchema"                xmlns:saxon="http://saxon.sf.net/"                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"                xmlns:schold="http://www.ascc.net/xml/schematron"                xmlns:iso="http://purl.oclc.org/dsdl/schematron"                xmlns:xhtml="http://www.w3.org/1999/xhtml"                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"                xmlns:x="http://docs.oasis-open.org/bdxr/ns/XHE/1/ExchangeHeaderEnvelope"                xmlns:xha="http://docs.oasis-open.org/bdxr/ns/XHE/1/AggregateComponents"                xmlns:xhb="http://docs.oasis-open.org/bdxr/ns/XHE/1/BasicComponents"                xmlns:ext="http://docs.oasis-open.org/bdxr/ns/XHE/1/ExtensionComponents"                xmlns:en="http://www.w3.org/2001/04/xmlenc#"                xmlns:ds="http://www.w3.org/2000/09/xmldsig#"                xmlns:u="utils"                version="2.0"><!--Implementers: please note that overriding process-prolog or process-root is     the preferred method for meta-stylesheets to use where possible. -->   <xsl:param name="archiveDirParameter"/>   <xsl:param name="archiveNameParameter"/>   <xsl:param name="fileNameParameter"/>   <xsl:param name="fileDirParameter"/>   <xsl:variable name="document-uri">      <xsl:value-of select="document-uri(/)"/>   </xsl:variable>   <!--PHASES-->   <!--PROLOG-->   <xsl:output xmlns:svrl="http://purl.oclc.org/dsdl/svrl"               method="xml"               omit-xml-declaration="no"               standalone="yes"               indent="yes"/>   <!--XSD TYPES FOR XSLT2-->   <!--KEYS AND FUNCTIONS-->   <!--DEFAULT RULES-->   <!--MODE: SCHEMATRON-SELECT-FULL-PATH-->   <!--This mode can be used to generate an ugly though full XPath for locators-->   <xsl:template match="*" mode="schematron-select-full-path">      <xsl:apply-templates select="." mode="schematron-get-full-path"/>   </xsl:template>   <!--MODE: SCHEMATRON-FULL-PATH-->   <!--This mode can be used to generate an ugly though full XPath for locators-->   <xsl:template match="*" mode="schematron-get-full-path">      <xsl:apply-templates select="parent::*" mode="schematron-get-full-path"/>      <xsl:text>/</xsl:text>      <xsl:choose>         <xsl:when test="namespace-uri()=''">            <xsl:value-of select="name()"/>         </xsl:when>         <xsl:otherwise>            <xsl:text>*:</xsl:text>            <xsl:value-of select="local-name()"/>            <xsl:text>[namespace-uri()='</xsl:text>            <xsl:value-of select="namespace-uri()"/>            <xsl:text>']</xsl:text>         </xsl:otherwise>      </xsl:choose>      <xsl:variable name="preceding"                    select="count(preceding-sibling::*[local-name()=local-name(current())                                   and namespace-uri() = namespace-uri(current())])"/>      <xsl:text>[</xsl:text>      <xsl:value-of select="1+ $preceding"/>      <xsl:text>]</xsl:text>   </xsl:template>   <xsl:template match="@*" mode="schematron-get-full-path">      <xsl:apply-templates select="parent::*" mode="schematron-get-full-path"/>      <xsl:text>/</xsl:text>      <xsl:choose>         <xsl:when test="namespace-uri()=''">@<xsl:value-of select="name()"/>         </xsl:when>         <xsl:otherwise>            <xsl:text>@*[local-name()='</xsl:text>            <xsl:value-of select="local-name()"/>            <xsl:text>' and namespace-uri()='</xsl:text>            <xsl:value-of select="namespace-uri()"/>            <xsl:text>']</xsl:text>         </xsl:otherwise>      </xsl:choose>   </xsl:template>   <!--MODE: SCHEMATRON-FULL-PATH-2-->   <!--This mode can be used to generate prefixed XPath for humans-->   <xsl:template match="node() | @*" mode="schematron-get-full-path-2">      <xsl:for-each select="ancestor-or-self::*">         <xsl:text>/</xsl:text>         <xsl:value-of select="name(.)"/>         <xsl:if test="preceding-sibling::*[name(.)=name(current())]">            <xsl:text>[</xsl:text>            <xsl:value-of select="count(preceding-sibling::*[name(.)=name(current())])+1"/>            <xsl:text>]</xsl:text>         </xsl:if>      </xsl:for-each>      <xsl:if test="not(self::*)">         <xsl:text/>/@<xsl:value-of select="name(.)"/>      </xsl:if>   </xsl:template>   <!--MODE: SCHEMATRON-FULL-PATH-3-->   <!--This mode can be used to generate prefixed XPath for humans 	(Top-level element has index)-->   <xsl:template match="node() | @*" mode="schematron-get-full-path-3">      <xsl:for-each select="ancestor-or-self::*">         <xsl:text>/</xsl:text>         <xsl:value-of select="name(.)"/>         <xsl:if test="parent::*">            <xsl:text>[</xsl:text>            <xsl:value-of select="count(preceding-sibling::*[name(.)=name(current())])+1"/>            <xsl:text>]</xsl:text>         </xsl:if>      </xsl:for-each>      <xsl:if test="not(self::*)">         <xsl:text/>/@<xsl:value-of select="name(.)"/>      </xsl:if>   </xsl:template>   <!--MODE: GENERATE-ID-FROM-PATH -->   <xsl:template match="/" mode="generate-id-from-path"/>   <xsl:template match="text()" mode="generate-id-from-path">      <xsl:apply-templates select="parent::*" mode="generate-id-from-path"/>      <xsl:value-of select="concat('.text-', 1+count(preceding-sibling::text()), '-')"/>   </xsl:template>   <xsl:template match="comment()" mode="generate-id-from-path">      <xsl:apply-templates select="parent::*" mode="generate-id-from-path"/>      <xsl:value-of select="concat('.comment-', 1+count(preceding-sibling::comment()), '-')"/>   </xsl:template>   <xsl:template match="processing-instruction()" mode="generate-id-from-path">      <xsl:apply-templates select="parent::*" mode="generate-id-from-path"/>      <xsl:value-of select="concat('.processing-instruction-', 1+count(preceding-sibling::processing-instruction()), '-')"/>   </xsl:template>   <xsl:template match="@*" mode="generate-id-from-path">      <xsl:apply-templates select="parent::*" mode="generate-id-from-path"/>      <xsl:value-of select="concat('.@', name())"/>   </xsl:template>   <xsl:template match="*" mode="generate-id-from-path" priority="-0.5">      <xsl:apply-templates select="parent::*" mode="generate-id-from-path"/>      <xsl:text>.</xsl:text>      <xsl:value-of select="concat('.',name(),'-',1+count(preceding-sibling::*[name()=name(current())]),'-')"/>   </xsl:template>   <!--MODE: GENERATE-ID-2 -->   <xsl:template match="/" mode="generate-id-2">U</xsl:template>   <xsl:template match="*" mode="generate-id-2" priority="2">      <xsl:text>U</xsl:text>      <xsl:number level="multiple" count="*"/>   </xsl:template>   <xsl:template match="node()" mode="generate-id-2">      <xsl:text>U.</xsl:text>      <xsl:number level="multiple" count="*"/>      <xsl:text>n</xsl:text>      <xsl:number count="node()"/>   </xsl:template>   <xsl:template match="@*" mode="generate-id-2">      <xsl:text>U.</xsl:text>      <xsl:number level="multiple" count="*"/>      <xsl:text>_</xsl:text>      <xsl:value-of select="string-length(local-name(.))"/>      <xsl:text>_</xsl:text>      <xsl:value-of select="translate(name(),':','.')"/>   </xsl:template>   <!--Strip characters-->   <xsl:template match="text()" priority="-1"/>   <!--SCHEMA SETUP-->   <xsl:template match="/">      <svrl:schematron-output xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                              title="Regler för DIGG XHE Profil"                              schemaVersion="iso">         <xsl:comment>            <xsl:value-of select="$archiveDirParameter"/>   		 <xsl:value-of select="$archiveNameParameter"/>  		 <xsl:value-of select="$fileNameParameter"/>  		 <xsl:value-of select="$fileDirParameter"/>         </xsl:comment>         <svrl:ns-prefix-in-attribute-values uri="http://docs.oasis-open.org/bdxr/ns/XHE/1/ExchangeHeaderEnvelope"                                             prefix="x"/>         <svrl:ns-prefix-in-attribute-values uri="http://docs.oasis-open.org/bdxr/ns/XHE/1/AggregateComponents"                                             prefix="xha"/>         <svrl:ns-prefix-in-attribute-values uri="http://docs.oasis-open.org/bdxr/ns/XHE/1/BasicComponents"                                             prefix="xhb"/>         <svrl:ns-prefix-in-attribute-values uri="http://docs.oasis-open.org/bdxr/ns/XHE/1/ExtensionComponents"                                             prefix="ext"/>         <svrl:ns-prefix-in-attribute-values uri="http://www.w3.org/2001/04/xmlenc#" prefix="en"/>         <svrl:ns-prefix-in-attribute-values uri="http://www.w3.org/2000/09/xmldsig#" prefix="ds"/>         <svrl:ns-prefix-in-attribute-values uri="http://www.w3.org/2001/XMLSchema" prefix="xs"/>         <svrl:ns-prefix-in-attribute-values uri="utils" prefix="u"/>         <svrl:active-pattern>            <xsl:attribute name="document">               <xsl:value-of select="document-uri(/)"/>            </xsl:attribute>            <xsl:apply-templates/>         </svrl:active-pattern>         <xsl:apply-templates select="/" mode="M9"/>         <svrl:active-pattern>            <xsl:attribute name="document">               <xsl:value-of select="document-uri(/)"/>            </xsl:attribute>            <xsl:apply-templates/>         </svrl:active-pattern>         <xsl:apply-templates select="/" mode="M10"/>         <svrl:active-pattern>            <xsl:attribute name="document">               <xsl:value-of select="document-uri(/)"/>            </xsl:attribute>            <xsl:apply-templates/>         </svrl:active-pattern>         <xsl:apply-templates select="/" mode="M11"/>         <svrl:active-pattern>            <xsl:attribute name="document">               <xsl:value-of select="document-uri(/)"/>            </xsl:attribute>            <xsl:apply-templates/>         </svrl:active-pattern>         <xsl:apply-templates select="/" mode="M12"/>         <svrl:active-pattern>            <xsl:attribute name="document">               <xsl:value-of select="document-uri(/)"/>            </xsl:attribute>            <xsl:apply-templates/>         </svrl:active-pattern>         <xsl:apply-templates select="/" mode="M13"/>         <svrl:active-pattern>            <xsl:attribute name="document">               <xsl:value-of select="document-uri(/)"/>            </xsl:attribute>            <xsl:apply-templates/>         </svrl:active-pattern>         <xsl:apply-templates select="/" mode="M14"/>         <svrl:active-pattern>            <xsl:attribute name="document">               <xsl:value-of select="document-uri(/)"/>            </xsl:attribute>            <xsl:apply-templates/>         </svrl:active-pattern>         <xsl:apply-templates select="/" mode="M15"/>         <svrl:active-pattern>            <xsl:attribute name="document">               <xsl:value-of select="document-uri(/)"/>            </xsl:attribute>            <xsl:apply-templates/>         </svrl:active-pattern>         <xsl:apply-templates select="/" mode="M16"/>         <svrl:active-pattern>            <xsl:attribute name="document">               <xsl:value-of select="document-uri(/)"/>            </xsl:attribute>            <xsl:apply-templates/>         </svrl:active-pattern>         <xsl:apply-templates select="/" mode="M17"/>         <svrl:active-pattern>            <xsl:attribute name="document">               <xsl:value-of select="document-uri(/)"/>            </xsl:attribute>            <xsl:apply-templates/>         </svrl:active-pattern>         <xsl:apply-templates select="/" mode="M18"/>         <svrl:active-pattern>            <xsl:attribute name="document">               <xsl:value-of select="document-uri(/)"/>            </xsl:attribute>            <xsl:apply-templates/>         </svrl:active-pattern>         <xsl:apply-templates select="/" mode="M19"/>         <svrl:active-pattern>            <xsl:attribute name="document">               <xsl:value-of select="document-uri(/)"/>            </xsl:attribute>            <xsl:apply-templates/>         </svrl:active-pattern>         <xsl:apply-templates select="/" mode="M20"/>         <svrl:active-pattern>            <xsl:attribute name="document">               <xsl:value-of select="document-uri(/)"/>            </xsl:attribute>            <xsl:apply-templates/>         </svrl:active-pattern>         <xsl:apply-templates select="/" mode="M21"/>         <svrl:active-pattern>            <xsl:attribute name="document">               <xsl:value-of select="document-uri(/)"/>            </xsl:attribute>            <xsl:apply-templates/>         </svrl:active-pattern>         <xsl:apply-templates select="/" mode="M22"/>      </svrl:schematron-output>   </xsl:template>   <!--SCHEMATRON PATTERNS-->   <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">Regler för DIGG XHE Profil</svrl:text>   <!--PATTERN -->   <!--RULE -->   <xsl:template match="/x:XHE/ext:XHEExtensions | /x:XHE/xhb:ProfileID | /x:XHE/xhb:ProfileExecutionID | /x:XHE/xha:Header/xha:BusinessScope/xha:ExternalReference | /x:XHE/xha:Payloads/xha:Payload/xhb:Description | /x:XHE/xha:Payloads/xha:Payload/xhb:CustomizationID | /x:XHE/xha:Payloads/xha:Payload/xhb:ProfileID | /x:XHE/xha:Payloads/xha:Payload/xhb:ProfileExecutionID | /x:XHE/xha:Payloads/xha:Payload/xhb:ValidationTypeCode | /x:XHE/xha:Payloads/xha:Payload/xhb:InstanceEncryptionMethod | /x:XHE/xha:Payloads/xha:Payload/xhb:InstanceHashValue | /x:XHE/xha:Payloads/xha:Payload/xha:InstanceDecryptionInformationExternalReference | /x:XHE/xha:Payloads/xha:Payload/xha:InstanceDecryptionKeyExternalReference | /x:XHE/xha:Payloads/xha:Payload/xha:RelevantExternalReference"                 priority="1000"                 mode="M9">      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                       context="/x:XHE/ext:XHEExtensions | /x:XHE/xhb:ProfileID | /x:XHE/xhb:ProfileExecutionID | /x:XHE/xha:Header/xha:BusinessScope/xha:ExternalReference | /x:XHE/xha:Payloads/xha:Payload/xhb:Description | /x:XHE/xha:Payloads/xha:Payload/xhb:CustomizationID | /x:XHE/xha:Payloads/xha:Payload/xhb:ProfileID | /x:XHE/xha:Payloads/xha:Payload/xhb:ProfileExecutionID | /x:XHE/xha:Payloads/xha:Payload/xhb:ValidationTypeCode | /x:XHE/xha:Payloads/xha:Payload/xhb:InstanceEncryptionMethod | /x:XHE/xha:Payloads/xha:Payload/xhb:InstanceHashValue | /x:XHE/xha:Payloads/xha:Payload/xha:InstanceDecryptionInformationExternalReference | /x:XHE/xha:Payloads/xha:Payload/xha:InstanceDecryptionKeyExternalReference | /x:XHE/xha:Payloads/xha:Payload/xha:RelevantExternalReference"/>      <!--ASSERT -->      <xsl:choose>         <xsl:when test="false()"/>         <xsl:otherwise>            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="false()">               <xsl:attribute name="id">R1-XHE</xsl:attribute>               <xsl:attribute name="flag">fatal</xsl:attribute>               <xsl:attribute name="location">                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>               </xsl:attribute>               <svrl:text>Endast XML-element och attribut som angivits i denna specifikation får användas</svrl:text>            </svrl:failed-assert>         </xsl:otherwise>      </xsl:choose>      <xsl:apply-templates select="*" mode="M9"/>   </xsl:template>   <xsl:template match="text()" priority="-1" mode="M9"/>   <xsl:template match="@*|node()" priority="-2" mode="M9">      <xsl:apply-templates select="*" mode="M9"/>   </xsl:template>   <!--PATTERN -->   <!--RULE -->   <xsl:template match="/x:XHE" priority="1000" mode="M10">      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="/x:XHE"/>      <!--ASSERT -->      <xsl:choose>         <xsl:when test="exists(xhb:CustomizationID)"/>         <xsl:otherwise>            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                                test="exists(xhb:CustomizationID)">               <xsl:attribute name="id">R14-XHE</xsl:attribute>               <xsl:attribute name="flag">fatal</xsl:attribute>               <xsl:attribute name="location">                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>               </xsl:attribute>               <svrl:text>CustomizationID är obligatoriskt. Element och attribut ska anges i enlighet med den tillåtna kardinalitet som framgår i syntaxmappningen.</svrl:text>            </svrl:failed-assert>         </xsl:otherwise>      </xsl:choose>      <!--ASSERT -->      <xsl:choose>         <xsl:when test="exists(xha:Header/xha:BusinessScope/xha:BusinessScopeCriterion)"/>         <xsl:otherwise>            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                                test="exists(xha:Header/xha:BusinessScope/xha:BusinessScopeCriterion)">               <xsl:attribute name="id">R14-XHE</xsl:attribute>               <xsl:attribute name="flag">fatal</xsl:attribute>               <xsl:attribute name="location">                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>               </xsl:attribute>               <svrl:text>BusinessScopeCriterionär är obligatoriskt. Element och attribut ska anges i enlighet med den tillåtna kardinalitet som framgår i syntaxmappningen.</svrl:text>            </svrl:failed-assert>         </xsl:otherwise>      </xsl:choose>      <!--ASSERT -->      <xsl:choose>         <xsl:when test="exists(xha:Header/xha:FromParty)"/>         <xsl:otherwise>            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                                test="exists(xha:Header/xha:FromParty)">               <xsl:attribute name="id">R14-XHE</xsl:attribute>               <xsl:attribute name="flag">fatal</xsl:attribute>               <xsl:attribute name="location">                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>               </xsl:attribute>               <svrl:text>FromParty är obligatoriskt. Element och attribut ska anges i enlighet med den tillåtna kardinalitet som framgår i syntaxmappningen.</svrl:text>            </svrl:failed-assert>         </xsl:otherwise>      </xsl:choose>      <!--ASSERT -->      <xsl:choose>         <xsl:when test="count(xha:Header/xha:FromParty/xha:PartyIdentification)=1"/>         <xsl:otherwise>            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                                test="count(xha:Header/xha:FromParty/xha:PartyIdentification)=1">               <xsl:attribute name="id">R14-XHE</xsl:attribute>               <xsl:attribute name="flag">fatal</xsl:attribute>               <xsl:attribute name="location">                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>               </xsl:attribute>               <svrl:text>FromParty/PartyIdentification får anges max 1 gång. Element och attribut ska anges i enlighet med den tillåtna kardinalitet som framgår i syntaxmappningen.</svrl:text>            </svrl:failed-assert>         </xsl:otherwise>      </xsl:choose>      <!--ASSERT -->      <xsl:choose>         <xsl:when test="count(xha:Header/xha:ToParty/xha:PartyIdentification)=1"/>         <xsl:otherwise>            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                                test="count(xha:Header/xha:ToParty/xha:PartyIdentification)=1">               <xsl:attribute name="id">R14-XHE</xsl:attribute>               <xsl:attribute name="flag">fatal</xsl:attribute>               <xsl:attribute name="location">                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>               </xsl:attribute>               <svrl:text>ToParty/PartyIdentification får anges max 1 gång. Element och attribut ska anges i enlighet med den tillåtna kardinalitet som framgår i syntaxmappningen.</svrl:text>            </svrl:failed-assert>         </xsl:otherwise>      </xsl:choose>      <!--ASSERT -->      <xsl:choose>         <xsl:when test="count(xha:Payloads/xha:Payload)=1"/>         <xsl:otherwise>            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                                test="count(xha:Payloads/xha:Payload)=1">               <xsl:attribute name="id">R14-XHE</xsl:attribute>               <xsl:attribute name="flag">fatal</xsl:attribute>               <xsl:attribute name="location">                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>               </xsl:attribute>               <svrl:text>Payload är obligatoriskt och får bara anges en gång. Element och attribut ska anges i enlighet med den tillåtna kardinalitet som framgår i syntaxmappningen.</svrl:text>            </svrl:failed-assert>         </xsl:otherwise>      </xsl:choose>      <!--ASSERT -->      <xsl:choose>         <xsl:when test="exists(xha:Payloads/xha:Payload/xhb:DocumentTypeCode)"/>         <xsl:otherwise>            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                                test="exists(xha:Payloads/xha:Payload/xhb:DocumentTypeCode)">               <xsl:attribute name="id">R14-XHE</xsl:attribute>               <xsl:attribute name="flag">fatal</xsl:attribute>               <xsl:attribute name="location">                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>               </xsl:attribute>               <svrl:text>DocumentTypeCode är obligatoriskt. Element och attribut ska anges i enlighet med den tillåtna kardinalitet som framgår i syntaxmappningen.</svrl:text>            </svrl:failed-assert>         </xsl:otherwise>      </xsl:choose>      <!--ASSERT -->      <xsl:choose>         <xsl:when test="exists(xha:Payloads/xha:Payload/xhb:ContentTypeCode)"/>         <xsl:otherwise>            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                                test="exists(xha:Payloads/xha:Payload/xhb:ContentTypeCode)">               <xsl:attribute name="id">R14-XHE</xsl:attribute>               <xsl:attribute name="flag">fatal</xsl:attribute>               <xsl:attribute name="location">                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>               </xsl:attribute>               <svrl:text>ContentTypeCode är obligatoriskt. Element och attribut ska anges i enlighet med den tillåtna kardinalitet som framgår i syntaxmappningen.</svrl:text>            </svrl:failed-assert>         </xsl:otherwise>      </xsl:choose>      <!--ASSERT -->      <xsl:choose>         <xsl:when test="exists(xha:Payloads/xha:Payload/xha:PayloadContent)"/>         <xsl:otherwise>            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                                test="exists(xha:Payloads/xha:Payload/xha:PayloadContent)">               <xsl:attribute name="id">R14-XHE</xsl:attribute>               <xsl:attribute name="flag">fatal</xsl:attribute>               <xsl:attribute name="location">                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>               </xsl:attribute>               <svrl:text>PayloadContent är obligatoriskt. Element och attribut ska anges i enlighet med den tillåtna kardinalitet som framgår i syntaxmappningen.</svrl:text>            </svrl:failed-assert>         </xsl:otherwise>      </xsl:choose>      <xsl:apply-templates select="*" mode="M10"/>   </xsl:template>   <xsl:template match="text()" priority="-1" mode="M10"/>   <xsl:template match="@*|node()" priority="-2" mode="M10">      <xsl:apply-templates select="*" mode="M10"/>   </xsl:template>   <!--PATTERN -->   <!--RULE -->   <xsl:template match="//*[not(*) and not(normalize-space()) and not(ancestor::xha:PayloadContent)]"                 priority="1000"                 mode="M11">      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                       context="//*[not(*) and not(normalize-space()) and not(ancestor::xha:PayloadContent)]"/>      <!--ASSERT -->      <xsl:choose>         <xsl:when test="false() or (namespace-uri(.)='http://www.w3.org/2001/04/xmlenc#' or namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#')"/>         <xsl:otherwise>            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                                test="false() or (namespace-uri(.)='http://www.w3.org/2001/04/xmlenc#' or namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#')">               <xsl:attribute name="id">R2-XHE</xsl:attribute>               <xsl:attribute name="flag">fatal</xsl:attribute>               <xsl:attribute name="location">                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>               </xsl:attribute>               <svrl:text>Tomma element eller attribut får inte anges</svrl:text>            </svrl:failed-assert>         </xsl:otherwise>      </xsl:choose>      <xsl:apply-templates select="*" mode="M11"/>   </xsl:template>   <xsl:template match="text()" priority="-1" mode="M11"/>   <xsl:template match="@*|node()" priority="-2" mode="M11">      <xsl:apply-templates select="*" mode="M11"/>   </xsl:template>   <!--PATTERN -->   <!--RULE -->   <xsl:template match="/x:XHE/xhb:CustomizationID" priority="1000" mode="M12">      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                       context="/x:XHE/xhb:CustomizationID"/>      <!--ASSERT -->      <xsl:choose>         <xsl:when test="normalize-space(.)='urn:fdc:digg.se:edelivery:xhe:1'"/>         <xsl:otherwise>            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                                test="normalize-space(.)='urn:fdc:digg.se:edelivery:xhe:1'">               <xsl:attribute name="id">R3-XHE</xsl:attribute>               <xsl:attribute name="flag">fatal</xsl:attribute>               <xsl:attribute name="location">                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>               </xsl:attribute>               <svrl:text>CustomizationID måste ha korrekt värde enligt kodlista</svrl:text>            </svrl:failed-assert>         </xsl:otherwise>      </xsl:choose>      <xsl:apply-templates select="*" mode="M12"/>   </xsl:template>   <xsl:template match="text()" priority="-1" mode="M12"/>   <xsl:template match="@*|node()" priority="-2" mode="M12">      <xsl:apply-templates select="*" mode="M12"/>   </xsl:template>   <!--PATTERN -->   <!--RULE -->   <xsl:template match="/x:XHE" priority="1000" mode="M13">      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="/x:XHE"/>      <!--ASSERT -->      <xsl:choose>         <xsl:when test="xha:Header/xha:BusinessScope/xha:BusinessScopeCriterion[normalize-space(xhb:BusinessScopeCriterionTypeCode)='DOCUMENTID']"/>         <xsl:otherwise>            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                                test="xha:Header/xha:BusinessScope/xha:BusinessScopeCriterion[normalize-space(xhb:BusinessScopeCriterionTypeCode)='DOCUMENTID']">               <xsl:attribute name="id">R4-XHE</xsl:attribute>               <xsl:attribute name="flag">fatal</xsl:attribute>               <xsl:attribute name="location">                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>               </xsl:attribute>               <svrl:text>Ett BusinessScopeCriterionTypeCode ska anges med koden DOCUMENTID</svrl:text>            </svrl:failed-assert>         </xsl:otherwise>      </xsl:choose>      <xsl:apply-templates select="*" mode="M13"/>   </xsl:template>   <xsl:template match="text()" priority="-1" mode="M13"/>   <xsl:template match="@*|node()" priority="-2" mode="M13">      <xsl:apply-templates select="*" mode="M13"/>   </xsl:template>   <!--PATTERN -->   <!--RULE -->   <xsl:template match="/x:XHE" priority="1000" mode="M14">      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="/x:XHE"/>      <!--ASSERT -->      <xsl:choose>         <xsl:when test="xha:Header/xha:BusinessScope/xha:BusinessScopeCriterion[normalize-space(xhb:BusinessScopeCriterionTypeCode)='DOCUMENTID_SCHEME']"/>         <xsl:otherwise>            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                                test="xha:Header/xha:BusinessScope/xha:BusinessScopeCriterion[normalize-space(xhb:BusinessScopeCriterionTypeCode)='DOCUMENTID_SCHEME']">               <xsl:attribute name="id">R5-XHE</xsl:attribute>               <xsl:attribute name="flag">fatal</xsl:attribute>               <xsl:attribute name="location">                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>               </xsl:attribute>               <svrl:text>Ett BusinessScopeCriterionTypeCode ska anges med koden DOCUMENTID_SCHEME</svrl:text>            </svrl:failed-assert>         </xsl:otherwise>      </xsl:choose>      <xsl:apply-templates select="*" mode="M14"/>   </xsl:template>   <xsl:template match="text()" priority="-1" mode="M14"/>   <xsl:template match="@*|node()" priority="-2" mode="M14">      <xsl:apply-templates select="*" mode="M14"/>   </xsl:template>   <!--PATTERN -->   <!--RULE -->   <xsl:template match="/x:XHE" priority="1000" mode="M15">      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="/x:XHE"/>      <!--ASSERT -->      <xsl:choose>         <xsl:when test="xha:Header/xha:BusinessScope/xha:BusinessScopeCriterion[normalize-space(xhb:BusinessScopeCriterionTypeCode)='PROCESSID']"/>         <xsl:otherwise>            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                                test="xha:Header/xha:BusinessScope/xha:BusinessScopeCriterion[normalize-space(xhb:BusinessScopeCriterionTypeCode)='PROCESSID']">               <xsl:attribute name="id">R6-XHE</xsl:attribute>               <xsl:attribute name="flag">fatal</xsl:attribute>               <xsl:attribute name="location">                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>               </xsl:attribute>               <svrl:text>Ett BusinessScopeCriterionTypeCode ska anges med koden PROCESSID</svrl:text>            </svrl:failed-assert>         </xsl:otherwise>      </xsl:choose>      <xsl:apply-templates select="*" mode="M15"/>   </xsl:template>   <xsl:template match="text()" priority="-1" mode="M15"/>   <xsl:template match="@*|node()" priority="-2" mode="M15">      <xsl:apply-templates select="*" mode="M15"/>   </xsl:template>   <!--PATTERN -->   <!--RULE -->   <xsl:template match="/x:XHE" priority="1000" mode="M16">      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="/x:XHE"/>      <!--ASSERT -->      <xsl:choose>         <xsl:when test="xha:Header/xha:BusinessScope/xha:BusinessScopeCriterion[normalize-space(xhb:BusinessScopeCriterionTypeCode)='PROCESSID_SCHEME']"/>         <xsl:otherwise>            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                                test="xha:Header/xha:BusinessScope/xha:BusinessScopeCriterion[normalize-space(xhb:BusinessScopeCriterionTypeCode)='PROCESSID_SCHEME']">               <xsl:attribute name="id">R7-XHE</xsl:attribute>               <xsl:attribute name="flag">fatal</xsl:attribute>               <xsl:attribute name="location">                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>               </xsl:attribute>               <svrl:text>Ett BusinessScopeCriterionTypeCode ska anges med koden PROCESSID_SCHEME</svrl:text>            </svrl:failed-assert>         </xsl:otherwise>      </xsl:choose>      <xsl:apply-templates select="*" mode="M16"/>   </xsl:template>   <xsl:template match="text()" priority="-1" mode="M16"/>   <xsl:template match="@*|node()" priority="-2" mode="M16">      <xsl:apply-templates select="*" mode="M16"/>   </xsl:template>   <!--PATTERN -->   <!--RULE -->   <xsl:template match="/x:XHE" priority="1000" mode="M17">      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="/x:XHE"/>      <!--ASSERT -->      <xsl:choose>         <xsl:when test="xha:Header/xha:BusinessScope/xha:BusinessScopeCriterion[normalize-space(xhb:BusinessScopeCriterionTypeCode)='FEDERATIONID']"/>         <xsl:otherwise>            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                                test="xha:Header/xha:BusinessScope/xha:BusinessScopeCriterion[normalize-space(xhb:BusinessScopeCriterionTypeCode)='FEDERATIONID']">               <xsl:attribute name="id">R8-XHE</xsl:attribute>               <xsl:attribute name="flag">fatal</xsl:attribute>               <xsl:attribute name="location">                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>               </xsl:attribute>               <svrl:text>Ett BusinessScopeCriterionTypeCode ska anges med koden FEDERATIONID</svrl:text>            </svrl:failed-assert>         </xsl:otherwise>      </xsl:choose>      <xsl:apply-templates select="*" mode="M17"/>   </xsl:template>   <xsl:template match="text()" priority="-1" mode="M17"/>   <xsl:template match="@*|node()" priority="-2" mode="M17">      <xsl:apply-templates select="*" mode="M17"/>   </xsl:template>   <!--PATTERN -->   <!--RULE -->   <xsl:template match="/x:XHE/xhb:XHEVersionID" priority="1000" mode="M18">      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                       context="/x:XHE/xhb:XHEVersionID"/>      <!--ASSERT -->      <xsl:choose>         <xsl:when test="normalize-space(.)='1.0'"/>         <xsl:otherwise>            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="normalize-space(.)='1.0'">               <xsl:attribute name="id">R9-XHE</xsl:attribute>               <xsl:attribute name="flag">fatal</xsl:attribute>               <xsl:attribute name="location">                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>               </xsl:attribute>               <svrl:text>XHEVersionID ska ha värde 1.0</svrl:text>            </svrl:failed-assert>         </xsl:otherwise>      </xsl:choose>      <xsl:apply-templates select="*" mode="M18"/>   </xsl:template>   <xsl:template match="text()" priority="-1" mode="M18"/>   <xsl:template match="@*|node()" priority="-2" mode="M18">      <xsl:apply-templates select="*" mode="M18"/>   </xsl:template>   <!--PATTERN -->   <!--RULE -->   <xsl:template match="/x:XHE/xha:Header/xha:FromParty/xha:PartyIdentification/xhb:ID"                 priority="1000"                 mode="M19">      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                       context="/x:XHE/xha:Header/xha:FromParty/xha:PartyIdentification/xhb:ID"/>      <!--ASSERT -->      <xsl:choose>         <xsl:when test="normalize-space(@schemeID)='iso6523-actorid-upis'"/>         <xsl:otherwise>            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                                test="normalize-space(@schemeID)='iso6523-actorid-upis'">               <xsl:attribute name="id">R10-XHE</xsl:attribute>               <xsl:attribute name="flag">fatal</xsl:attribute>               <xsl:attribute name="location">                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>               </xsl:attribute>               <svrl:text>ID för FromParty ska ha attributet 'iso6523-actorid-upis'</svrl:text>            </svrl:failed-assert>         </xsl:otherwise>      </xsl:choose>      <xsl:apply-templates select="*" mode="M19"/>   </xsl:template>   <xsl:template match="text()" priority="-1" mode="M19"/>   <xsl:template match="@*|node()" priority="-2" mode="M19">      <xsl:apply-templates select="*" mode="M19"/>   </xsl:template>   <!--PATTERN -->   <!--RULE -->   <xsl:template match="/x:XHE/xha:Header/xha:FromParty/xha:PartyIdentification/xhb:ID"                 priority="1000"                 mode="M20">      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                       context="/x:XHE/xha:Header/xha:FromParty/xha:PartyIdentification/xhb:ID"/>      <!--ASSERT -->      <xsl:choose>         <xsl:when test="normalize-space(@schemeID)='iso6523-actorid-upis'"/>         <xsl:otherwise>            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                                test="normalize-space(@schemeID)='iso6523-actorid-upis'">               <xsl:attribute name="id">R11-XHE</xsl:attribute>               <xsl:attribute name="flag">fatal</xsl:attribute>               <xsl:attribute name="location">                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>               </xsl:attribute>               <svrl:text>ID för ToParty ska ha attributet 'iso6523-actorid-upis'</svrl:text>            </svrl:failed-assert>         </xsl:otherwise>      </xsl:choose>      <xsl:apply-templates select="*" mode="M20"/>   </xsl:template>   <xsl:template match="text()" priority="-1" mode="M20"/>   <xsl:template match="@*|node()" priority="-2" mode="M20">      <xsl:apply-templates select="*" mode="M20"/>   </xsl:template>   <!--PATTERN -->   <!--RULE -->   <xsl:template match="/x:XHE/xha:Payloads/xha:Payload[xhb:InstanceEncryptionIndicator=true()]"                 priority="1000"                 mode="M21">      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                       context="/x:XHE/xha:Payloads/xha:Payload[xhb:InstanceEncryptionIndicator=true()]"/>      <!--ASSERT -->      <xsl:choose>         <xsl:when test="xha:PayloadContent/en:EncryptedData"/>         <xsl:otherwise>            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                                test="xha:PayloadContent/en:EncryptedData">               <xsl:attribute name="id">R12-XHE</xsl:attribute>               <xsl:attribute name="flag">fatal</xsl:attribute>               <xsl:attribute name="location">                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>               </xsl:attribute>               <svrl:text>PayloadContent ska innehålla elementet 'EncryptedData' om InstanceEncryptionIndicator är 'true'</svrl:text>            </svrl:failed-assert>         </xsl:otherwise>      </xsl:choose>      <xsl:apply-templates select="*" mode="M21"/>   </xsl:template>   <xsl:template match="text()" priority="-1" mode="M21"/>   <xsl:template match="@*|node()" priority="-2" mode="M21">      <xsl:apply-templates select="*" mode="M21"/>   </xsl:template>   <!--PATTERN -->   <!--RULE -->   <xsl:template match="/x:XHE/xha:Payloads/xha:Payload[xhb:InstanceEncryptionIndicator=false()]"                 priority="1000"                 mode="M22">      <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                       context="/x:XHE/xha:Payloads/xha:Payload[xhb:InstanceEncryptionIndicator=false()]"/>      <!--ASSERT -->      <xsl:choose>         <xsl:when test="not(xha:PayloadContent/en:EncryptedData)"/>         <xsl:otherwise>            <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"                                test="not(xha:PayloadContent/en:EncryptedData)">               <xsl:attribute name="id">R13-XHE</xsl:attribute>               <xsl:attribute name="flag">fatal</xsl:attribute>               <xsl:attribute name="location">                  <xsl:apply-templates select="." mode="schematron-select-full-path"/>               </xsl:attribute>               <svrl:text>PayloadContent ska inte innehålla elementet 'EncryptedData' om InstanceEncryptionIndicator är 'false'</svrl:text>            </svrl:failed-assert>         </xsl:otherwise>      </xsl:choose>      <xsl:apply-templates select="*" mode="M22"/>   </xsl:template>   <xsl:template match="text()" priority="-1" mode="M22"/>   <xsl:template match="@*|node()" priority="-2" mode="M22">      <xsl:apply-templates select="*" mode="M22"/>   </xsl:template></xsl:stylesheet>
Hjälpte denna information dig?

Ditt svar hjälper oss att förbättra sidan

Senast uppdaterad: