Xml file is use as input to transformatiio
<SNXDispositionUpdatedMessage
xmlns="urn:tracelink:mapper:sl:serial_number_exchange"
xmlns:cmn="urn:tracelink:mapper:sl:commontypes">
<ControlFileHeader>
<cmn:FileSenderNumber>0358716000006</cmn:FileSenderNumber>
</ControlFileHeader>
</SNXDispositionUpdatedMessage>
xlst file is used to transform rules
<xsl:stylesheet version="2.0"
xmlns="urn:tracelink:mapper:sl:serial_number_exchange"
xmlns:cmn="urn:tracelink:mapper:sl:commontypes"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" />
<xsl:template match="/">
<validation>
<xsl:apply-templates
select="SNXDispositionUpdatedMessage/ControlFileHeader"/>
<xsl:apply-templates
</validation>
</xsl:template>
<xsl:template match="SNXDispositionUpdatedMessage/ControlFileHeader">
<fieldvalidation>
<xsl:choose>
<xsl:when test="cmn:FileSenderNumber != ''">
<validtedfield>FileSenderNumber</validtedfield>
<value><xsl:value-of select="cmn:FileSenderNumber"/></value>
<status>Valid</status>
<reason></reason>
</xsl:when>
<xsl:otherwise>
<validtedfield>FileSenderNumber</validtedfield>
<value><xsl:value-of select="cmn:FileSenderNumber"/></value>
<status>Not Valid</status>
<reason>FileSenderNumber should not be empty.</reason>
</xsl:otherwise>
</xsl:choose>
</fieldvalidation>
</xsl:template>
</xsl:stylesheet>
токовый выход
<?xml version="1.0" encoding="UTF-8"?>
<validation xmlns="urn:tracelink:mapper:sl:serial_number_exchange"
xmlns:cmn="urn:tracelink:mapper:sl:commontypes"/>
<validation xmlns="urn:tracelink:mapper:sl:serial_number_exchange"
xmlns:cmn="urn:tracelink:mapper:sl:commontypes"/>
Когда я использовал без пространства имен cmn, преобразование xslt работает нормально.Проблемы с пространством имен cmn. Как решить эту проблему?Пространство имен cmn, используемое в тегах, и без заголовка пространства имен cmn преобразование прервано.