Hallo,
Es funktioniert leider nicht...
<media:bild /> wird aber transformiert wenn es NICHT INNERHALB der <html> Tags steht!
Es lag am Namensraum.
versuche so: (http://example.com kannst du durch eine belibige URI ersetzen)
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?xml-stylesheet type="text/xsl" href="wilde.xsl"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:media="http://example.com" lang="de" xml:lang="de">
<media:bild />
<b>nur html</b>
</html>
--------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:media="http://example.com">
<xsl:output
method="xml"
omit-xml-declaration="yes"
indent="yes"
encoding="iso-8859-1"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" />
<xsl:template match="* | @* | text()">
xsl:copy
<xsl:apply-templates select="@*" />
<xsl:apply-templates />
</xsl:copy>
</xsl:template>
<xsl:template match="media:bild">
<em>wurde ersetzt</em>
</xsl:template>
</xsl:stylesheet>
Grüße
Thomas