1*1212f9a0SAndroid Build Coastguard Worker<?xml version="1.0" ?> 2*1212f9a0SAndroid Build Coastguard Worker<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 3*1212f9a0SAndroid Build Coastguard Worker 4*1212f9a0SAndroid Build Coastguard Worker <!-- FileName: copy38 --> 5*1212f9a0SAndroid Build Coastguard Worker <!-- Document: http://www.w3.org/TR/xslt --> 6*1212f9a0SAndroid Build Coastguard Worker <!-- DocVersion: 19991116 --> 7*1212f9a0SAndroid Build Coastguard Worker <!-- Section: 11.3 --> 8*1212f9a0SAndroid Build Coastguard Worker <!-- Creator: Michael Kay --> 9*1212f9a0SAndroid Build Coastguard Worker <!-- Purpose: Using copy-of for repeated output of an RTF (HTML output) --> 10*1212f9a0SAndroid Build Coastguard Worker 11*1212f9a0SAndroid Build Coastguard Worker <!-- Source Attribution: This test was written by Michael Kay and is taken from 12*1212f9a0SAndroid Build Coastguard Worker 'XSLT Programmer's Reference' published by Wrox Press Limited in 2000; 13*1212f9a0SAndroid Build Coastguard Worker ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 14*1212f9a0SAndroid Build Coastguard Worker Now updated in the second edition (ISBN 1-861005-06-7), http://www.wrox.com. 15*1212f9a0SAndroid Build Coastguard Worker No part of this book may be reproduced, stored in a retrieval system or transmitted 16*1212f9a0SAndroid Build Coastguard Worker in any form or by any means - electronic, electrostatic, mechanical, photocopying, 17*1212f9a0SAndroid Build Coastguard Worker recording or otherwise - without the prior written permission of the publisher, 18*1212f9a0SAndroid Build Coastguard Worker except in the case of brief quotations embodied in critical articles or reviews. --> 19*1212f9a0SAndroid Build Coastguard Worker <!-- Origin: copy-of/soccer.xml, copy-of/soccer.xsl, Chapter/Page: 4-185, was MK015 before --> 20*1212f9a0SAndroid Build Coastguard Worker 21*1212f9a0SAndroid Build Coastguard Worker<xsl:output method="html" indent="no"/> 22*1212f9a0SAndroid Build Coastguard Worker 23*1212f9a0SAndroid Build Coastguard Worker<xsl:variable name="table-heading"> 24*1212f9a0SAndroid Build Coastguard Worker <tr> 25*1212f9a0SAndroid Build Coastguard Worker <td><b>Date</b></td> 26*1212f9a0SAndroid Build Coastguard Worker <td><b>Home Team</b></td> 27*1212f9a0SAndroid Build Coastguard Worker <td><b>Away Team</b></td> 28*1212f9a0SAndroid Build Coastguard Worker <td><b>Result</b></td> 29*1212f9a0SAndroid Build Coastguard Worker </tr> 30*1212f9a0SAndroid Build Coastguard Worker</xsl:variable> 31*1212f9a0SAndroid Build Coastguard Worker 32*1212f9a0SAndroid Build Coastguard Worker<xsl:template match="/"> 33*1212f9a0SAndroid Build Coastguard Worker <html> 34*1212f9a0SAndroid Build Coastguard Worker <body> 35*1212f9a0SAndroid Build Coastguard Worker <h1>Matches in Group <xsl:value-of select="/*/@group"/></h1> 36*1212f9a0SAndroid Build Coastguard Worker 37*1212f9a0SAndroid Build Coastguard Worker <xsl:for-each select="//match"> 38*1212f9a0SAndroid Build Coastguard Worker 39*1212f9a0SAndroid Build Coastguard Worker <h2><xsl:value-of select="concat(team[1], ' versus ', team[2])"/></h2> 40*1212f9a0SAndroid Build Coastguard Worker 41*1212f9a0SAndroid Build Coastguard Worker <table border="1"> 42*1212f9a0SAndroid Build Coastguard Worker <xsl:copy-of select="$table-heading"/><!-- This is the test! --> 43*1212f9a0SAndroid Build Coastguard Worker <tr> 44*1212f9a0SAndroid Build Coastguard Worker <td><xsl:value-of select="date"/> </td> 45*1212f9a0SAndroid Build Coastguard Worker <td><xsl:value-of select="team[1]"/> </td> 46*1212f9a0SAndroid Build Coastguard Worker <td><xsl:value-of select="team[2]"/> </td> 47*1212f9a0SAndroid Build Coastguard Worker <td><xsl:value-of select="concat(team[1]/@score, '-', team[2]/@score)"/> </td> 48*1212f9a0SAndroid Build Coastguard Worker </tr> 49*1212f9a0SAndroid Build Coastguard Worker </table> 50*1212f9a0SAndroid Build Coastguard Worker </xsl:for-each> 51*1212f9a0SAndroid Build Coastguard Worker </body> 52*1212f9a0SAndroid Build Coastguard Worker </html> 53*1212f9a0SAndroid Build Coastguard Worker</xsl:template> 54*1212f9a0SAndroid Build Coastguard Worker 55*1212f9a0SAndroid Build Coastguard Worker 56*1212f9a0SAndroid Build Coastguard Worker <!-- 57*1212f9a0SAndroid Build Coastguard Worker * Licensed to the Apache Software Foundation (ASF) under one 58*1212f9a0SAndroid Build Coastguard Worker * or more contributor license agreements. See the NOTICE file 59*1212f9a0SAndroid Build Coastguard Worker * distributed with this work for additional information 60*1212f9a0SAndroid Build Coastguard Worker * regarding copyright ownership. The ASF licenses this file 61*1212f9a0SAndroid Build Coastguard Worker * to you under the Apache License, Version 2.0 (the "License"); 62*1212f9a0SAndroid Build Coastguard Worker * you may not use this file except in compliance with the License. 63*1212f9a0SAndroid Build Coastguard Worker * You may obtain a copy of the License at 64*1212f9a0SAndroid Build Coastguard Worker * 65*1212f9a0SAndroid Build Coastguard Worker * http://www.apache.org/licenses/LICENSE-2.0 66*1212f9a0SAndroid Build Coastguard Worker * 67*1212f9a0SAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software 68*1212f9a0SAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS, 69*1212f9a0SAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 70*1212f9a0SAndroid Build Coastguard Worker * See the License for the specific language governing permissions and 71*1212f9a0SAndroid Build Coastguard Worker * limitations under the License. 72*1212f9a0SAndroid Build Coastguard Worker --> 73*1212f9a0SAndroid Build Coastguard Worker 74*1212f9a0SAndroid Build Coastguard Worker</xsl:stylesheet> 75