1<?xml version="1.0"?> 2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> 3 4 <!-- CaseName: numbering10 --> 5 <!-- Author: David Marston --> 6 <!-- Purpose: Test of format attributes that vary per level. --> 7 <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[2]/item[2]/p[1]/text()[1]" --> 8 <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(number)/ulist[1]/item[2]/p[1]/text()[1]" --> 9 <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/p[2]/text()[5]" --> 10 <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[1]/p[1]/text()[1]" --> 11 <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[2]/p[1]/text()[1]" --> 12 <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[3]/p[1]/text()[1]" --> 13 <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[4]/p[1]/text()[1]" --> 14 <!-- SpecCitation: Rec="XSLT" Version="1.0" type="OASISptr1" place="id(convert)/ulist[1]/item[5]/p[1]/text()[1]" --> 15 <!-- Scenario: operation="standard-XML" --> 16 17<xsl:template match="doc"> 18 <out> 19 <xsl:apply-templates/> 20 </out> 21</xsl:template> 22 23<xsl:template match="title"> 24 <xsl:number level="multiple" 25 count="chapter|section|subsection" 26 format="I.A.1.a. "/> 27 <xsl:value-of select="."/><xsl:text> 28</xsl:text> 29</xsl:template> 30 31<xsl:template match="appendix//title" priority="1"> 32 <xsl:number level="multiple" 33 count="appendix|section|subsection" 34 format="A.1.i.a. "/> 35 <xsl:value-of select="."/><xsl:text> 36</xsl:text> 37</xsl:template> 38 39<xsl:template match="text()"><!-- To suppress empty lines --><xsl:apply-templates/></xsl:template> 40 41 42 <!-- 43 * Licensed to the Apache Software Foundation (ASF) under one 44 * or more contributor license agreements. See the NOTICE file 45 * distributed with this work for additional information 46 * regarding copyright ownership. The ASF licenses this file 47 * to you under the Apache License, Version 2.0 (the "License"); 48 * you may not use this file except in compliance with the License. 49 * You may obtain a copy of the License at 50 * 51 * http://www.apache.org/licenses/LICENSE-2.0 52 * 53 * Unless required by applicable law or agreed to in writing, software 54 * distributed under the License is distributed on an "AS IS" BASIS, 55 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 56 * See the License for the specific language governing permissions and 57 * limitations under the License. 58 --> 59 60</xsl:stylesheet> 61