source: ccr2ccd-xslt/trunk/templates/directions.xsl@ 1437

Last change on this file since 1437 was 758, checked in by Richard Braman, 15 years ago

add files from Ken Miller

File size: 2.9 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="urn:astm-org:CCR" xmlns:fo="http://www.w3.org/1999/XSL/Format">
3 <xsl:template match="a:Directions">
4 <xsl:for-each select="a:Direction">
5 <xsl:choose>
6 <xsl:when test="position() mod 2=0">
7 <tr class="even">
8 <xsl:choose>
9 <xsl:when test="a:Description/a:Text">
10 <td>
11 <xsl:value-of select="a:Description/a:Text"/>
12 </td>
13 </xsl:when>
14 <xsl:otherwise>
15 <td>
16 <xsl:value-of select="a:Dose/a:Value"/><xsl:text xml:space="preserve"> </xsl:text><xsl:value-of select="a:Dose/a:Units/a:Unit"/><xsl:text xml:space="preserve"> </xsl:text><xsl:value-of select="a:Route/a:Text"/><xsl:text xml:space="preserve"> </xsl:text><xsl:value-of select="a:Frequency/a:Value"/>
17 <xsl:if test="a:Duration"><xsl:text xml:space="preserve"> </xsl:text>(for <xsl:value-of select="a:Duration/a:Value"/><xsl:text xml:space="preserve"> </xsl:text><xsl:value-of select="a:Duration/a:Units/a:Unit"/>)
18 </xsl:if>
19 </td>
20 <xsl:if test="a:MultipleDirectionModifier/a:ObjectAttribute">
21 <td>
22 <xsl:for-each select="a:MultipleDirectionModifier/a:ObjectAttribute">
23 <xsl:value-of select="a:Attribute"/>
24 <br/>
25 <xsl:value-of select="a:AttributeValue/a:Value"/>
26 </xsl:for-each>
27 </td>
28 </xsl:if>
29 </xsl:otherwise>
30 </xsl:choose>
31 </tr>
32 </xsl:when>
33 <xsl:otherwise>
34 <tr class="odd">
35 <xsl:choose>
36 <xsl:when test="a:Description/a:Text">
37 <td>
38 <xsl:value-of select="a:Description/a:Text"/>
39 </td>
40 </xsl:when>
41 <xsl:otherwise>
42 <td>
43 <xsl:value-of select="a:Dose/a:Value"/><xsl:text xml:space="preserve"> </xsl:text><xsl:value-of select="a:Dose/a:Units/a:Unit"/><xsl:text xml:space="preserve"> </xsl:text><xsl:value-of select="a:Route/a:Text"/><xsl:text xml:space="preserve"> </xsl:text><xsl:value-of select="a:Frequency/a:Value"/>
44 <xsl:if test="a:Duration"><xsl:text xml:space="preserve"> </xsl:text>(for <xsl:value-of select="a:Duration/a:Value"/><xsl:text xml:space="preserve"> </xsl:text><xsl:value-of select="a:Duration/a:Units/a:Unit"/>)
45 </xsl:if>
46 </td>
47 <xsl:if test="a:MultipleDirectionModifier/a:ObjectAttribute">
48 <td>
49 <xsl:for-each select="a:MultipleDirectionModifier/a:ObjectAttribute">
50 <xsl:value-of select="a:Attribute"/>
51 <br/>
52 <xsl:value-of select="a:AttributeValue/a:Value"/>
53 </xsl:for-each>
54 </td>
55 </xsl:if>
56 </xsl:otherwise>
57 </xsl:choose>
58 </tr>
59 </xsl:otherwise>
60 </xsl:choose>
61 </xsl:for-each>
62 </xsl:template>
63</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.