J'ai un document comme celui-ci:problème xslt (namespaces?)
<?xml-stylesheet type="text/css" href="http://ltw1001.web.cs.unibo.it/svg.css" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg= "http://www.w3.org/2000/svg">
<body>
<svg:svg width="500" height="560" version="1.1" >
...
...
</svg:svg></body></html>
i doit extraire uniquement le contenu du corps i Tred avec:
<?xml version="1.0" standalone="no"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/HTML/1998/html4">
<xsl:template match="/">
<xsl:value-of select="//body" />
</xsl:template>
</xsl:stylesheet>
mais il ne fonctionne pas
Bonne question (+1).Voir ma réponse pour une solution complète et simple qui fonctionne avec n'importe quelle structure de document. –