1<?xml version="1.0" ?> 2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 3 version="1.0"> 4 5 <!-- Test FileName: mk049.xsl --> 6 <!-- Source Attribution: 7 This test was written by Michael Kay and is taken from 8 'XSLT Programmer's Reference' published by Wrox Press Limited in 2000; 9 ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 10 Now updated in the second edition (ISBN 1861005067), http://www.wrox.com. 11 No part of this book may be reproduced, stored in a retrieval system or 12 transmitted in any form or by any means - electronic, electrostatic, mechanical, 13 photocopying, recording or otherwise - without the prior written permission of 14 the publisher, except in the case of brief quotations embodied in critical articles or reviews. 15 --> 16 <!-- Example: orgchart.xml, orgchart.xsl --> 17 <!-- Chapter/Page: 8-534 --> 18 <!-- Purpose: Illustrate a fill-in the blanks stylesheet --> 19 20<xsl:template match="/"> 21<html> 22<head> 23 <title>Management Structure</title> 24</head> 25<body> 26 <h1>Management Structure</h1> 27 <p>The following responsibilies were announced on 28 <xsl:value-of select="/orgchart/@date"/>:</p> 29 <table border="2" cellpadding="5"> 30 <tr> 31 <th>Name</th><th>Role</th><th>Reporting to</th> 32 </tr> 33 <xsl:for-each select="//person"> 34 <tr> 35 <td><xsl:value-of select="name"/></td> 36 <td><xsl:value-of select="title"/></td> 37 <td><xsl:value-of select="ancestor::person[1]/name"/></td> 38 </tr> 39 </xsl:for-each> 40 </table> 41 <hr/> 42</body> 43</html> 44</xsl:template> 45 46 <!-- 47 * Licensed to the Apache Software Foundation (ASF) under one 48 * or more contributor license agreements. See the NOTICE file 49 * distributed with this work for additional information 50 * regarding copyright ownership. The ASF licenses this file 51 * to you under the Apache License, Version 2.0 (the "License"); 52 * you may not use this file except in compliance with the License. 53 * You may obtain a copy of the License at 54 * 55 * http://www.apache.org/licenses/LICENSE-2.0 56 * 57 * Unless required by applicable law or agreed to in writing, software 58 * distributed under the License is distributed on an "AS IS" BASIS, 59 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 60 * See the License for the specific language governing permissions and 61 * limitations under the License. 62 --> 63 64</xsl:stylesheet> 65