[903] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?> |
---|
| 2 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/TR/xhtml1/strict"> |
---|
| 3 | <xsl:output method="html" version="4.1" encoding="ISO-8859-1" omit-xml-declaration="yes"/> |
---|
| 4 | |
---|
| 5 | <xsl:template match="/"> |
---|
| 6 | <html> |
---|
| 7 | <head> |
---|
| 8 | </head> |
---|
| 9 | <body> |
---|
| 10 | <table> |
---|
| 11 | <xsl:choose> |
---|
| 12 | <xsl:when test='descendant::FN or descendant::NICKNAME or descendant::DESC or descendant::ORGNAME or descendant::ORGUNIT or descendant::ROLE or descendant::BDAY'> |
---|
| 13 | <xsl:apply-templates select="descendant::FN" /> |
---|
| 14 | <xsl:apply-templates select="descendant::NICKNAME" /> |
---|
| 15 | <xsl:apply-templates select="descendant::DESC" /> |
---|
| 16 | <xsl:apply-templates select="descendant::ORGNAME" /> |
---|
| 17 | <xsl:apply-templates select="descendant::ORGUNIT" /> |
---|
| 18 | <xsl:apply-templates select="descendant::ROLE" /> |
---|
| 19 | <xsl:apply-templates select="descendant::BDAY" /> |
---|
| 20 | </xsl:when> |
---|
| 21 | <xsl:otherwise> |
---|
| 22 | <div>TESTE</div> |
---|
| 23 | </xsl:otherwise> |
---|
| 24 | </xsl:choose> |
---|
| 25 | </table> |
---|
| 26 | </body> |
---|
| 27 | </html> |
---|
| 28 | </xsl:template> |
---|
| 29 | |
---|
| 30 | <xsl:template match="FN"> |
---|
| 31 | <tr> |
---|
| 32 | <td width="30%" align="right"> |
---|
| 33 | <label id="{ancestor::*/attribute::id}_FN"></label> |
---|
| 34 | <script defer="true"> |
---|
| 35 | <![CDATA[ |
---|
| 36 | IM.labelVcard[']]><xsl:value-of select="ancestor::*/attribute::id" /><![CDATA[_FN'] = IM.get_lang('Full Name'); |
---|
| 37 | //document.getElementById(']]><xsl:value-of select="ancestor::*/attribute::id" /><![CDATA[_FN').innerHTML = IM.get_lang('Full Name') + ' .: '; |
---|
| 38 | ]]> |
---|
| 39 | </script> |
---|
| 40 | </td> |
---|
| 41 | <td width="70%" align="left"> |
---|
| 42 | <xsl:value-of select="." /> |
---|
| 43 | </td> |
---|
| 44 | </tr> |
---|
| 45 | </xsl:template> |
---|
| 46 | |
---|
| 47 | <xsl:template match="NICKNAME"> |
---|
| 48 | <tr> |
---|
| 49 | <td width="30%" align="right"> |
---|
| 50 | <label id="{ancestor::*/attribute::id}_NICKNAME"></label> |
---|
| 51 | <script defer="true"> |
---|
| 52 | <![CDATA[ |
---|
| 53 | IM.labelVcard[']]><xsl:value-of select="ancestor::*/attribute::id" /><![CDATA[_NICKNAME'] = IM.get_lang('NickName'); |
---|
| 54 | //document.getElementById(']]><xsl:value-of select="ancestor::*/attribute::id" /><![CDATA[_NICKNAME').innerHTML = IM.get_lang('NickName') + ' .: '; |
---|
| 55 | ]]> |
---|
| 56 | </script> |
---|
| 57 | </td> |
---|
| 58 | <td width="70%" align="left"> |
---|
| 59 | <xsl:value-of select="." /> |
---|
| 60 | </td> |
---|
| 61 | </tr> |
---|
| 62 | </xsl:template> |
---|
| 63 | |
---|
| 64 | <xsl:template match="DESC"> |
---|
| 65 | <tr> |
---|
| 66 | <td width="30%" align="right"> |
---|
| 67 | <label id="{ancestor::*/attribute::id}_DESC"></label> |
---|
| 68 | <script defer="true"> |
---|
| 69 | <![CDATA[ |
---|
| 70 | IM.labelVcard[']]><xsl:value-of select="ancestor::*/attribute::id" /><![CDATA[_DESC'] = IM.get_lang('your message'); |
---|
| 71 | //document.getElementById(']]><xsl:value-of select="ancestor::*/attribute::id" /><![CDATA[_DESC').innerHTML = IM.get_lang('your message') + ' .: '; |
---|
| 72 | ]]> |
---|
| 73 | </script> |
---|
| 74 | </td> |
---|
| 75 | <td width="70%" align="left"> |
---|
| 76 | <xsl:value-of select="." /> |
---|
| 77 | </td> |
---|
| 78 | </tr> |
---|
| 79 | </xsl:template> |
---|
| 80 | |
---|
| 81 | <xsl:template match="ORGNAME"> |
---|
| 82 | <tr> |
---|
| 83 | <td width="30%" align="right"> |
---|
| 84 | <label id="{ancestor::*/attribute::id}_ORGNAME"></label> |
---|
| 85 | <script defer="true"> |
---|
| 86 | <![CDATA[ |
---|
| 87 | IM.labelVcard[']]><xsl:value-of select="ancestor::*/attribute::id" /><![CDATA[_ORGNAME'] = IM.get_lang('Orgname'); |
---|
| 88 | //document.getElementById(']]><xsl:value-of select="ancestor::*/attribute::id" /><![CDATA[_ORGNAME').innerHTML = IM.get_lang('Orgname') + ' .: '; |
---|
| 89 | ]]> |
---|
| 90 | </script> |
---|
| 91 | </td> |
---|
| 92 | <td width="70%" align="left"> |
---|
| 93 | <xsl:value-of select="." /> |
---|
| 94 | </td> |
---|
| 95 | </tr> |
---|
| 96 | </xsl:template> |
---|
| 97 | |
---|
| 98 | <xsl:template match="ORGUNIT"> |
---|
| 99 | <tr> |
---|
| 100 | <td width="30%" align="right"> |
---|
| 101 | <label id="{ancestor::*/attribute::id}_ORGUNIT"></label> |
---|
| 102 | <script defer="true"> |
---|
| 103 | <![CDATA[ |
---|
| 104 | IM.labelVcard[']]><xsl:value-of select="ancestor::*/attribute::id" /><![CDATA[_ORGUNIT'] = IM.get_lang('Orgunit'); |
---|
| 105 | //document.getElementById(']]><xsl:value-of select="ancestor::*/attribute::id" /><![CDATA[_ORGUNIT').innerHTML = IM.get_lang('Orgunit') + ' .: '; |
---|
| 106 | ]]> |
---|
| 107 | </script> |
---|
| 108 | </td> |
---|
| 109 | <td width="70%" align="left"> |
---|
| 110 | <xsl:value-of select="." /> |
---|
| 111 | </td> |
---|
| 112 | </tr> |
---|
| 113 | </xsl:template> |
---|
| 114 | |
---|
| 115 | <xsl:template match="ROLE"> |
---|
| 116 | <tr> |
---|
| 117 | <td width="30%" align="right"> |
---|
| 118 | <label id="{ancestor::*/attribute::id}_ROLE"></label> |
---|
| 119 | <script defer="true"> |
---|
| 120 | <![CDATA[ |
---|
| 121 | IM.labelVcard[']]><xsl:value-of select="ancestor::*/attribute::id" /><![CDATA[_ROLE'] = IM.get_lang('Role'); |
---|
| 122 | //document.getElementById(']]><xsl:value-of select="ancestor::*/attribute::id" /><![CDATA[_ROLE').innerHTML = IM.get_lang('Role') + ' .: '; |
---|
| 123 | ]]> |
---|
| 124 | </script> |
---|
| 125 | </td> |
---|
| 126 | <td width="70%" align="left"> |
---|
| 127 | <xsl:value-of select="." /> |
---|
| 128 | </td> |
---|
| 129 | </tr> |
---|
| 130 | </xsl:template> |
---|
| 131 | |
---|
| 132 | <xsl:template match="BDAY"> |
---|
| 133 | <tr> |
---|
| 134 | <td width="30%" align="right"> |
---|
| 135 | <label id="{ancestor::*/attribute::id}_BDAY"></label> |
---|
| 136 | <script defer="true"> |
---|
| 137 | <![CDATA[ |
---|
| 138 | IM.labelVcard[']]><xsl:value-of select="ancestor::*/attribute::id" /><![CDATA[_BDAY'] = IM.get_lang('Birthday'); |
---|
| 139 | //document.getElementById(']]><xsl:value-of select="ancestor::*/attribute::id" /><![CDATA[_BDAY').innerHTML = IM.get_lang('Birthday') + ' .: '; |
---|
| 140 | ]]> |
---|
| 141 | </script> |
---|
| 142 | </td> |
---|
| 143 | <td width="70%" align="left"> |
---|
| 144 | <xsl:value-of select="." /> |
---|
| 145 | </td> |
---|
| 146 | </tr> |
---|
| 147 | </xsl:template> |
---|
| 148 | |
---|
| 149 | </xsl:stylesheet> |
---|