more gitlab export cleanups
This commit is contained in:
parent
8a04af8494
commit
582406221a
@ -2,6 +2,8 @@
|
|||||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
<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">
|
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:template match="@* | node()">
|
||||||
<xsl:copy>
|
<xsl:copy>
|
||||||
<xsl:apply-templates select="@* | node()"/>
|
<xsl:apply-templates select="@* | node()"/>
|
||||||
@ -29,8 +31,10 @@
|
|||||||
<!-- remove @class from a -->
|
<!-- remove @class from a -->
|
||||||
<xsl:template match="a/@class"/>
|
<xsl:template match="a/@class"/>
|
||||||
|
|
||||||
<!-- remove @alt from img -->
|
<!-- remove h*, make bold paragraph -->
|
||||||
<xsl:template match="img/@alt"/>
|
<xsl:template match="h2 | h3 | h4 | h5">
|
||||||
|
<p><b><xsl:apply-templates/></b></p>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
<!-- TODO: change <img src="/uploads/ac943b3c98d3630f7b1d787c00aa9417/file.png"/> to
|
<!-- TODO: change <img src="/uploads/ac943b3c98d3630f7b1d787c00aa9417/file.png"/> to
|
||||||
<img src="../screenshots/file.png"/> -->
|
<img src="../screenshots/file.png"/> -->
|
||||||
|
|||||||
20
xml/xslt/gitlab_export_splitter.xsl
Normal file
20
xml/xslt/gitlab_export_splitter.xsl
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?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>
|
||||||
Loading…
x
Reference in New Issue
Block a user