pentext/xml/xslt/gitlab_export_splitter.xsl
2019-12-10 18:42:32 +01:00

21 lines
570 B
XML

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" version="2.0">
<xsl:output indent="yes" method="xml"/>
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="p[child::img[not(preceding-sibling::*)][not(following-sibling::*)]]">
<xsl:copy-of select="img"/>
</xsl:template>
</xsl:stylesheet>