..
/
download
<?xml version='1.0'?>
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<!--The following elements are prohibited by the following MIL-STD-3031A requirements:
MIL-STD-3031A, para 5.23.1.1, "The optional element <captionGroup> shall not be used."
<captionBody> is a child of <captionGroup>,
<captionRow> is a child of <captionBody>,
<captionEntry> is a child of <captionRow>
<captionText> is a child of <captionEntry>
MIL-STD-3031A, para 5.21.1.15, "The element <behavior> shall not be used in any <refs> child elements."
MIL-STD-3031A, para 5.19.1.16, "The element <logo> shall not be used."
MIL-STD-3031A, para 5.28.1.10, "The element <partAndSerialNumber> shall not be used in <preliminaryRqmts."
<partNumber> is a child of <partAndSerialNumber>
<serialNumber> is a child of <partAndSerialNumber>
MIL-STD-3031A, para 5.19.1.18, The element <productSafety> shall not be used.
MIL-STD-3031A, para 5.23.1.1, The element <title> is not allowed in <proceduralStep>.
MIL-STD-3031A, para 5.28.1.6, The element <person> shall not be used. (in preliminary requirements
and requirements after job completion)
MIL-STD-3031A, para 5.37.1.44 Physical security.
The element <physicalSecurityPilferageCode> shall not be used in parts list data.
MIL-STD-3031A, para 5.37.1.40 Initial provisioning project number.
The element <initialProvisioningProject> and its attributes shall not be used.
-->
<!-- 2011 01 20 - KW - Added match for title in proceduralStep -->
<!-- 2011 01 20 - BE - Added separate test for preliminaryRqmts//partAndSerialNumber/partNumber | preliminaryRqmts//partAndSerialNumber/serialNumber
added separate test for refs/dmRef/behavior | refs/externalPubRef/behavior | refs/pmRef/behavior-->
<xsl:template
match="captionBody | captionEntry | captionGroup | captionRow | captionText
| refs/dmRef/behavior | refs/externalPubRef/behavior | refs/pmRef/behavior
| logo
| preliminaryRqmts//partAndSerialNumber/partNumber | preliminaryRqmts//partAndSerialNumber/serialNumber
| preliminaryRqmts//person
| productSafety | proceduralStep/title
| partIdentSegment/physicalSecurityPilferageCode | initialProvisioningProject">
<xsl:choose>
<xsl:when test="self::title">
<fo:block color="red">
<xsl:text>Element </xsl:text>
<xsl:value-of select="local-name()"/>
<xsl:text> prohibited in element </xsl:text>
<xsl:value-of select="local-name(parent::*)"/>
</fo:block>
</xsl:when>
<xsl:when test="self::partNumber | self::serialNumber">
<fo:block color="red">
<xsl:text>Element </xsl:text>
<xsl:value-of select="local-name()"/>
<xsl:text> prohibited in element </xsl:text>
<xsl:value-of select="local-name(ancestor::preliminaryRqmts)"/>
</fo:block>
</xsl:when>
<xsl:when test="self::behavior">
<fo:block color="red">
<xsl:text>Element </xsl:text>
<xsl:value-of select="local-name()"/>
<xsl:text> prohibited in element </xsl:text>
<xsl:value-of select="local-name(ancestor::refs)"/>
</fo:block>
</xsl:when>
<xsl:otherwise>
<fo:block color="red">
<xsl:text>Element </xsl:text>
<xsl:value-of select="local-name()"/>
<xsl:text> is prohibited.</xsl:text>
</fo:block>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!--s1000d_Iss_4_0_1_r1.pdf, Chapter 3.9.5.3, Data modules - Applicability, para 2.1.2 Applicability branches:
The element <applic> has two logical branches (three branches for process data modules)
which are used for separate purposes:
...
A computable applicability annotation – consists of the element <assert> and element
<evaluate> which provide applicability information in a computable format which can be
used to support dynamic display of the annotated content. -->
<!--The following elements are prohibited because they cannot be printed. -->
<xsl:template
match="multimedia | multimediaObject | parameter | evaluate | assert">
<xsl:if test="string(.)">
<fo:block color="red">
<xsl:text>Error: Element </xsl:text>
<xsl:value-of select="local-name()"/>
<xsl:text> is prohibited because it cannot be printed.</xsl:text>
</fo:block>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
gopher://khzae.net/0/s1000d/links/projects/3031/sample/PhunGun/CSDB/FO-3031-A00-S1000DGUN-PROHIBITED_001-00_EN-US.xsl