Project

Profile

Help

Bug #1640 » test_br_1.xsl

Manfred Staudinger, 2012-10-31 16:07

 
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:dr="http://documenta.rudolphina.org/"
exclude-result-prefixes="html"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
java -jar D:\Programme\Saxon9\saxon9he.jar test_br.xml test_br_1.xsl
-->
<xsl:output method="xml" indent="yes"/>
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>

<xsl:template match="/">
<html>
<head>
<xsl:apply-templates select="dr:doc/html:title"/>
<script type="text/javascript" language="javascript" src="../SaxonceDebug/Saxonce.nocache.js"/>
<script type="text/javascript" language="javascript">
onSaxonLoad = function() {
proc = Saxon.run( {
initialTemplate: 'main',
logLevel: 'FINEST',
stylesheet: 'test_br_2.xsl'
});
}
</script>
</head>
<body>
<div id="htmlbody">
<xsl:apply-templates select="dr:doc/html:p"/>
</div>
</body>
</html>
</xsl:template>
<xsl:template match="text()[contains(., '@')]">
<xsl:value-of select="substring-before(., '@')"/>
<xsl:element name="br"/>
<xsl:value-of select="substring-after(., '@')"/>
</xsl:template>
</xsl:stylesheet>
(2-2/3)