1<?xml version="1.0"?> 2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> 3 <!-- FileName: OutputSettingsXML.xsl --> 4 <!-- Purpose: Legal XML output for use with OutputSettingsTest.java --> 5 6<!-- Include various XSLT spec xsl:output attrs --> 7<xsl:output method="xml" 8 doctype-public="this-is-doctype-public" 9 doctype-system="this-is-doctype-system" 10 cdata-section-elements="cdataHere" 11 indent="yes" /> 12 13<xsl:template match="/"> 14 <out> 15 <xsl:apply-templates/> 16 </out> 17</xsl:template> 18 19<xsl:template match="html-tag"> 20 <header> 21 <xsl:element name="title"><xsl:value-of select="head-tag/title-tag/@text"/></xsl:element> 22 <xsl:text>xsl:text within head tag</xsl:text> 23 </header> 24 <document> 25 <xsl:apply-templates select="body-tag"/> 26 <xsl:text disable-output-escaping="yes"><p>fake 'p' element</p></xsl:text> 27 <!-- all xml elements below, just for fun --> 28 <entities>" & < ></entities> 29 </document> 30</xsl:template> 31 32<xsl:template match="body-tag"> 33 <xsl:apply-templates select="p-tag | ul-tag"/> 34</xsl:template> 35 36<xsl:template match="p-tag"> 37 <xsl:element name="p"> 38 <xsl:value-of select="."/> 39 </xsl:element> 40</xsl:template> 41 42<xsl:template match="ul-tag"> 43 <ul> 44 <xsl:copy-of select="."/> 45 </ul> 46</xsl:template> 47 48 <!-- 49 * Licensed to the Apache Software Foundation (ASF) under one 50 * or more contributor license agreements. See the NOTICE file 51 * distributed with this work for additional information 52 * regarding copyright ownership. The ASF licenses this file 53 * to you under the Apache License, Version 2.0 (the "License"); 54 * you may not use this file except in compliance with the License. 55 * You may obtain a copy of the License at 56 * 57 * http://www.apache.org/licenses/LICENSE-2.0 58 * 59 * Unless required by applicable law or agreed to in writing, software 60 * distributed under the License is distributed on an "AS IS" BASIS, 61 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 62 * See the License for the specific language governing permissions and 63 * limitations under the License. 64 --> 65 66</xsl:stylesheet> 67