| 1 |
<?xml version="1.0"?> |
| 2 |
<xsl:stylesheet version="1.0" |
| 3 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
| 4 |
xmlns:myNS="http://devedge.netscape.com/2002/de"> |
| 5 |
|
| 6 |
<xsl:output method="html" /> |
| 7 |
|
| 8 |
<xsl:template match="/"> |
| 9 |
<html> |
| 10 |
|
| 11 |
<head> |
| 12 |
|
| 13 |
<title> |
| 14 |
<xsl:value-of select="/myNS:Article/myNS:Title"/> |
| 15 |
</title> |
| 16 |
|
| 17 |
<style> |
| 18 |
.myBox {margin:10px 155px 0 50px; border: 1px dotted #639ACE; padding:0 5px 0 5px;} |
| 19 |
</style> |
| 20 |
|
| 21 |
</head> |
| 22 |
|
| 23 |
<body> |
| 24 |
<p class="myBox"> |
| 25 |
<span class="title"> |
| 26 |
<xsl:value-of select="/myNS:Article/myNS:Title"/> |
| 27 |
</span> <br /> |
| 28 |
|
| 29 |
Authors: <br /> |
| 30 |
<xsl:apply-templates select="/myNS:Article/myNS:Authors/myNS:Author"/> |
| 31 |
</p> |
| 32 |
|
| 33 |
<p class="myBox"> |
| 34 |
<xsl:apply-templates select="//myNS:Body"/> |
| 35 |
</p> |
| 36 |
|
| 37 |
</body> |
| 38 |
|
| 39 |
</html> |
| 40 |
</xsl:template> |
| 41 |
|
| 42 |
<xsl:template match="myNS:Author"> |
| 43 |
-- <xsl:value-of select="." /> |
| 44 |
|
| 45 |
<xsl:if test="@company"> |
| 46 |
:: <b> <xsl:value-of select="@company" /> </b> |
| 47 |
</xsl:if> |
| 48 |
|
| 49 |
<br /> |
| 50 |
</xsl:template> |
| 51 |
|
| 52 |
<xsl:template match="myNS:Body"> |
| 53 |
<xsl:copy> |
| 54 |
<xsl:apply-templates select="@*|node()"/> |
| 55 |
</xsl:copy> |
| 56 |
</xsl:template> |
| 57 |
|
| 58 |
<xsl:template match="@*|node()"> |
| 59 |
<xsl:copy> |
| 60 |
<xsl:apply-templates select="@*|node()"/> |
| 61 |
</xsl:copy> |
| 62 |
</xsl:template> |
| 63 |
</xsl:stylesheet> |
| 64 |
|
| 65 |
<!-- https://developer.mozilla.org/en-US/docs/Web/XSLT/XSLT_JS_interface_in_Gecko/Basic_Example --> |
| 66 |
|