Hallo Matthias,
Ich bin schon ganz stolz soweit gekommen zu sein, da mir die xsl-Danke immer wieder Probleme bereitet, an den drei Punkten beisse ich mir aber nun die Zähne aus. Kann mir jemand einen Tip geben?
Probiere es so:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://docbook.org/ns/docbook"
xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
xmlns:xlink="http://www.w3.org/1999/xlink">
<xsl:output method="xml" version="1.0" encoding="UTF-8"/>
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="*[@revision='test' and @revisionflag='deleted']"/>
<xsl:template match="@revision[.='test'] | @revisionflag[.='added']"/>
<xsl:template match="text()[normalize-space(.)='']"/>
</xsl:stylesheet>
Das letzte Template vermeidet alle Whitespace-Knoten, im XML-Editor kann via "Pretty-Print"-Knopf die eingerückte Variante wiederhergestellt werden.
Grüße,
Thomas