1<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> 2 3<xsl:output indent="yes"/> 4 5 <!-- FileName: attribset41 --> 6 <!-- Document: http://www.w3.org/TR/xslt --> <!-- DocVersion: 19991116 --> 7 <!-- Section: 7.1.4 Named Attribute Sets --> 8 <!-- Creator: Morten Jorgensen --> 9 <!-- Purpose: Test inheritance of attribute sets. A literal result element 10 is referring an attribute set that is defined by two separate 11 <xsl:attribute-set.../> elements with the same name. Both 12 these elements have a use-attribute-sets attribute, which 13 means that we have a single attribute set that inherits from 14 two other attribute sets. --> 15 16<xsl:template match="/"> 17 <out xsl:use-attribute-sets="child"> 18 <xsl:attribute name="location">Wonderland</xsl:attribute> 19 </out> 20</xsl:template> 21 22<xsl:attribute-set name="child" use-attribute-sets="rabbit"> 23 <xsl:attribute name="follow">yellowbrickroad</xsl:attribute> 24</xsl:attribute-set> 25 26<xsl:attribute-set name="child" use-attribute-sets="alice"> 27 <xsl:attribute name="wife">thumbelina</xsl:attribute> 28</xsl:attribute-set> 29 30<xsl:attribute-set name="rabbit"> 31 <xsl:attribute name="rabbithole">deep</xsl:attribute> 32</xsl:attribute-set> 33 34<xsl:attribute-set name="alice"> 35 <xsl:attribute name="Alice">intoxicated</xsl:attribute> 36</xsl:attribute-set> 37 38 39 <!-- 40 * Licensed to the Apache Software Foundation (ASF) under one 41 * or more contributor license agreements. See the NOTICE file 42 * distributed with this work for additional information 43 * regarding copyright ownership. The ASF licenses this file 44 * to you under the Apache License, Version 2.0 (the "License"); 45 * you may not use this file except in compliance with the License. 46 * You may obtain a copy of the License at 47 * 48 * http://www.apache.org/licenses/LICENSE-2.0 49 * 50 * Unless required by applicable law or agreed to in writing, software 51 * distributed under the License is distributed on an "AS IS" BASIS, 52 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 53 * See the License for the specific language governing permissions and 54 * limitations under the License. 55 --> 56 57</xsl:stylesheet> 58