1<?xml version="1.0"?> 2<xsl:stylesheet version="1.1" 3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 4 5 <!-- FileName: ver08 --> 6 <!-- Document: http://www.w3.org/TR/xslt --> 7 <!-- DocVersion: 19991116 --> 8 <!-- Section: 15 Fallback --> 9 <!-- Author: Joanne Tong --> 10 <!-- Purpose: Test fallback for unsupported xsl elements 11 , fallback for top-level-elements, and more than one 12 fallback child --> 13 <!-- related to bugs 23089 and 23706 --> 14 15 <xsl:foo /><!-- should ignore --> 16 17 <xsl:bar><!-- should ignore --> 18 <xsl:fallback> 19 <doh /> 20 </xsl:fallback> 21 </xsl:bar> 22 23 <xsl:template match="in"> 24 <xsl:import-table HREF="blah.asp" name="sample"> 25 <doh><!-- should ignore --> 26 <xsl:value-of select="notok" /> 27 </doh> 28 <xsl:fallback> 29 <out1> 30 <xsl:value-of select="ok" /> 31 </out1> 32 <xsl:import-table> 33 <xsl:fallback> 34 <out2> 35 <xsl:value-of select="ok" /> 36 </out2> 37 </xsl:fallback> 38 <xsl:fallback> 39 <out3> 40 <xsl:value-of select="ok" /> 41 </out3> 42 </xsl:fallback> 43 </xsl:import-table> 44 <xsl:fallback><!-- should ignore --> 45 <doh /> 46 </xsl:fallback> 47 </xsl:fallback> 48 </xsl:import-table> 49 <xsl:if test="false()"> 50 <xsl:import-table /><!-- should not throw error --> 51 </xsl:if> 52 </xsl:template> 53 54 <xsl:template match="/"> 55 <out> 56 <xsl:apply-templates /> 57 </out> 58 </xsl:template> 59 60 61 <!-- 62 * Licensed to the Apache Software Foundation (ASF) under one 63 * or more contributor license agreements. See the NOTICE file 64 * distributed with this work for additional information 65 * regarding copyright ownership. The ASF licenses this file 66 * to you under the Apache License, Version 2.0 (the "License"); 67 * you may not use this file except in compliance with the License. 68 * You may obtain a copy of the License at 69 * 70 * http://www.apache.org/licenses/LICENSE-2.0 71 * 72 * Unless required by applicable law or agreed to in writing, software 73 * distributed under the License is distributed on an "AS IS" BASIS, 74 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 75 * See the License for the specific language governing permissions and 76 * limitations under the License. 77 --> 78 79</xsl:stylesheet> 80