Newer
Older
XML / modules / native-code.xml
<?xml version="1.0" encoding="utf-8"?>

<!--
	Sometimes we might need to embed raw LaTeX or HTML code to handle something tricky.
-->

<stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">


	<!--
		Raw LaTeX code.
	-->
	<template name="raw-latex" match="raw-code[@format = 'latex']|raw-latex">
		<common formats="/latex/xelatex/"><xsl:apply-templates /></common>
	</template>
	
	
	<!--
		Raw HTML code. This can be a tricky if the document being processed declares any namespaces, as they generally end up attached to the first element of the raw HTML. I haven't discovered a workaround yet :(.
	-->
	<template name="raw-html" match="raw-code[@format = 'html']|raw-html">
		<common formats="/html/xhtml/"><xsl:copy-of select="*" /></common>
	</template>


</stylesheet>