Your question is a bit open-ended, but let's interpret as meaning that you want to validate the sequence of children against a content model
A? B? C? D? E?
Here's one way:
<xsl:template match="header">
<xsl:apply-templates select="*" mode="v"/>
</xsl:template>
<xsl:template match="A" mode="v">
<xsl:if test="preceding::sibling::*"><error/></xsl:if>
</xsl:template>
<xsl:template match="B" mode="v">
<xsl:variable name="p" select="preceding-sibling::*[1]"/>
<xsl:if test="$p and not(name($p) = 'A')"><error/></xsl:if>
</xsl:template>
<xsl:template match="C" mode="v">
<xsl:variable name="p" select="preceding-sibling::*[1]"/>
<xsl:if test="$p and not(name($p) = 'A' or name($p) = 'B')"><error/></xsl:if>
</xsl:template>
etc.