1<?xml version="1.0"?> 2<?xml-stylesheet media="xxx" type="text/xsl" href="nonexist.xsl"?> 3<?xml-stylesheet media="yyy" type="text/xsl" href="foo.xsl"?> 4<?xml-stylesheet media="zzz" type="text/xsl" href="#style1"?> 5<?xml-stylesheet media="xyz" alternate="yes" type="text/xsl" href="mediaembed08.xsl"?> 6 7<doc> 8<head> 9<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 10 version="1.0" id="style1"> 11 12 <!-- FileName: embed08 --> 13 <!-- Document: http://www.w3.org/TR/xslt --> 14 <!-- DocVersion: 19991116 --> 15 <!-- Section: 2.7 Embedding Stylesheets --> 16 <!-- Creator: Paul Dick --> 17 <!-- Purpose: Test the media attribute and -MEDIA command-line option. --> 18 <!-- Can be invoked four ways; media="xxx" is an error case. --> 19 20<xsl:key name="test" match="para" use="@id"/> 21 22 <xsl:template match="/"> 23 <out> 24 Ye ha comming to you from the xml file! 25 <xsl:value-of select="doc/body/para"/> 26 <xsl:value-of select="key('test','foey')"/> 27 </out> 28 </xsl:template> 29 30 <!-- 31 * Licensed to the Apache Software Foundation (ASF) under one 32 * or more contributor license agreements. See the NOTICE file 33 * distributed with this work for additional information 34 * regarding copyright ownership. The ASF licenses this file 35 * to you under the Apache License, Version 2.0 (the "License"); 36 * you may not use this file except in compliance with the License. 37 * You may obtain a copy of the License at 38 * 39 * http://www.apache.org/licenses/LICENSE-2.0 40 * 41 * Unless required by applicable law or agreed to in writing, software 42 * distributed under the License is distributed on an "AS IS" BASIS, 43 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 44 * See the License for the specific language governing permissions and 45 * limitations under the License. 46 --> 47 48 49</xsl:stylesheet> 50</head> 51<body> 52<para id="foo"> 53Hello 54</para> 55<para id="foey"> 56Goodbye 57</para> 58</body> 59</doc> 60