1<?xml version="1.0" encoding="iso-8859-1"?> 2<xsl:stylesheet 3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 4 version="1.0" 5> 6 7 <!-- Test FileName: mk008.xsl --> 8 <!-- Source Attribution: 9 This test was written by Michael Kay and is taken from 10 'XSLT Programmer's Reference' published by Wrox Press Limited in 2000; 11 ISBN 1-861003-12-9; copyright Wrox Press Limited 2000; all rights reserved. 12 Now updated in the second edition (ISBN 1861005067), http://www.wrox.com. 13 No part of this book may be reproduced, stored in a retrieval system or 14 transmitted in any form or by any means - electronic, electrostatic, mechanical, 15 photocopying, recording or otherwise - without the prior written permission of 16 the publisher, except in the case of brief quotations embodied in critical articles or reviews. 17 --> 18 <!-- Example: sample.xml, principal2.xsl (includes date.xsl, copyright.xsl) --> 19 <!-- Chapter/Page: 3-91 --> 20 <!-- Purpose: Importing stylesheets --> 21 22<xsl:import href="./inc/copyright.xsl"/> 23<xsl:variable name="owner">Wrox Press Ltd</xsl:variable> 24<xsl:variable name="date">2001</xsl:variable> 25<!--<xsl:include href="./inc/date.xsl/>--> 26 27<xsl:output method="xml" encoding="iso-8859-1" indent="yes"/> 28<xsl:strip-space elements="*"/> 29 30<xsl:template match="date"> 31 <date><xsl:value-of select="$date"/></date> 32</xsl:template> 33 34<xsl:template match="copyright"> 35 <copyright><xsl:call-template name="copyright"/></copyright> 36</xsl:template> 37 38<xsl:template match="*"> 39 <xsl:copy> 40 <xsl:copy-of select="@*"/> 41 <xsl:apply-templates/> 42 </xsl:copy> 43</xsl:template> 44 45 <!-- 46 * Licensed to the Apache Software Foundation (ASF) under one 47 * or more contributor license agreements. See the NOTICE file 48 * distributed with this work for additional information 49 * regarding copyright ownership. The ASF licenses this file 50 * to you under the Apache License, Version 2.0 (the "License"); 51 * you may not use this file except in compliance with the License. 52 * You may obtain a copy of the License at 53 * 54 * http://www.apache.org/licenses/LICENSE-2.0 55 * 56 * Unless required by applicable law or agreed to in writing, software 57 * distributed under the License is distributed on an "AS IS" BASIS, 58 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 59 * See the License for the specific language governing permissions and 60 * limitations under the License. 61 --> 62 63</xsl:stylesheet> 64