Transformation XSLT : apply-templates manquant
Bonjour tout le monde,
Dans une feuille de style de transformation qui a cette allure :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/doc/members/member" />
<xsl:template match="doc/members/member">
<tr>
<td>
<xsl:value-of select="@name" />
</td>
</tr>
</xsl:template>
<HTML xmlns="http://schemas.microsoft.com/XML-Document-Transform">
<HEAD>
</HEAD>
<BODY>
<TABLE border="1">
<xsl:apply-templates />
</TABLE>
</BODY>
</HTML>
</xsl:stylesheet> |
La balise <xsl:apply-templates> est soulignée en ondulé et pointe sur l'erreur suivante :
Code:
1 2
| Severity Code Description Project File Line Suppression State
Warning The element 'stylesheet' in namespace 'http://www.w3.org/1999/XSL/Transform' has invalid child element 'apply-templates' in namespace 'http://www.w3.org/1999/XSL/Transform'. List of possible elements expected: 'include, strip-space, preserve-space, output, key, decimal-format, attribute-set, variable, param, template, namespace-alias' in namespace 'http://www.w3.org/1999/XSL/Transform' as well as any element in namespace '##other'. MergeDoc MergeDoc\docsheet.xslt 16 |
La conformité de cette erreur avec la doc m'apparaît tout sauf évident.
https://www.w3schools.com/xml/ref_xs...-templates.asp
Quelqu'un peut-il me dépanner ?