Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <x:stylesheet version="1.0" xmlns:x="http://www.w3.org/1999/XSL/Transform">
- <x:output method="html" />
- <x:template match="/">
- <html>
- <head>
- <title></title>
- </head>
- <body>
- <table border="1">
- <x:apply-templates select="persons/person" />
- </table>
- </body>
- </html>
- </x:template>
- <x:template match="person">
- <x:apply-templates select="children/child" />
- </x:template>
- <x:template match="child">
- <tr>
- <x:if test="position() = 1">
- <td rowspan="2">
- <x:value-of select="ancestor::person/name" />
- </td>
- </x:if>
- <td>
- <x:value-of select="name" />
- </td>
- <td>
- <x:value-of select="age" />
- </td>
- </tr>
- </x:template>
- </x:stylesheet>
Add Comment
Please, Sign In to add comment