diff options
| -rw-r--r-- | source/02_data/articles.xsl | 32 | ||||
| -rw-r--r-- | source/99_result/article/article.xsl | 2 | ||||
| -rw-r--r-- | utility/datasource.xsl | 2 | ||||
| -rw-r--r-- | utility/formatter.xsl | 2 | ||||
| -rw-r--r-- | utility/master.xsl | 2 | 
5 files changed, 18 insertions, 22 deletions
| diff --git a/source/02_data/articles.xsl b/source/02_data/articles.xsl index bbe6f40..b3ac0df 100644 --- a/source/02_data/articles.xsl +++ b/source/02_data/articles.xsl @@ -15,6 +15,19 @@  	<target     mode="plain" value="articles.xml"/>   </xsl:variable> +<xsl:template match="@*|node()" mode="embellish"> +	<xsl:copy> +		<xsl:apply-templates select="@*|node()" mode="embellish"/> +	</xsl:copy> +</xsl:template> + +<xsl:template match="pre" mode="embellish"> +	<xsl:call-template name="formatter"> +		<xsl:with-param name="format">/usr/bin/highlight.sh</xsl:with-param> +		<xsl:with-param name="source" select="code/text()"/> +	</xsl:call-template> +</xsl:template> +  <xsl:template name="list_tags">  	<xsl:param name="path"/> @@ -29,23 +42,6 @@  	</xsl:apply-templates>  </xsl:template> -<xsl:template match="@*|node()" mode="content_transform"> -	<xsl:copy> -		<xsl:apply-templates select="@*|node()" mode="content_transform"/> -	</xsl:copy> -</xsl:template> - -<xsl:template match="pre/code" mode="content_transform"> -	<xsl:variable name="formatted_code"> -		<xsl:call-template name="formatter"> -			<xsl:with-param name="format">/usr/bin/highlight.sh</xsl:with-param> -			<xsl:with-param name="source" select="text()"/> -		</xsl:call-template> -	</xsl:variable> - -	<xsl:copy-of select="xalan:nodeset($formatted_code)/pre/node()"/> -</xsl:template> -  <xsl:template match="files/articles/file[./extension = '.md']">  	<xsl:variable name="content">  		<xsl:call-template name="formatter"> @@ -72,7 +68,7 @@  			</xsl:call-template>  		</tags>  		<content> -			<xsl:apply-templates mode="content_transform" select="xalan:nodeset($content)/*[name() != 'h1']"/> +			<xsl:apply-templates select="xalan:nodeset($content)/*[name() != 'h1']" mode="embellish"/>  		</content>  	</entry>  </xsl:template> diff --git a/source/99_result/article/article.xsl b/source/99_result/article/article.xsl index a82dcb1..bd7ed14 100644 --- a/source/99_result/article/article.xsl +++ b/source/99_result/article/article.xsl @@ -34,7 +34,7 @@  			</xsl:for-each>  			| Adrian Kummerländer  		</p> -		<xsl:copy-of select="content/*"/> +		<xsl:copy-of select="content/node()"/>  	</div>  </xsl:template> diff --git a/utility/datasource.xsl b/utility/datasource.xsl index ce31d41..411086a 100644 --- a/utility/datasource.xsl +++ b/utility/datasource.xsl @@ -8,7 +8,7 @@  	method="xml"  	omit-xml-declaration="no"  	encoding="UTF-8" -	indent="yes" +	indent="no"  />  <xsl:variable name="root" select="/datasource"/> diff --git a/utility/formatter.xsl b/utility/formatter.xsl index 49d8630..0f7643e 100644 --- a/utility/formatter.xsl +++ b/utility/formatter.xsl @@ -14,7 +14,7 @@  	<xsl:copy-of select="InputXSLT:external-text-formatter(  		$format,  		$source -	)/self::output/*"/> +	)/self::output/node()"/>  </xsl:template>  </xsl:stylesheet> diff --git a/utility/master.xsl b/utility/master.xsl index c682072..66cfdb3 100644 --- a/utility/master.xsl +++ b/utility/master.xsl @@ -10,7 +10,7 @@  	doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"  	omit-xml-declaration="yes"  	encoding="UTF-8" -	indent="yes" +	indent="no"  />  <xsl:variable name="root" select="/datasource"/> | 
