1<?xml version="1.0"?> 2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" 3 xmlns:someprefix="http://someURI"> 4 5 <!-- FileName: namespace140 --> 6 <!-- Document: http://www.w3.org/TR/xslt --> 7 <!-- DocVersion: 19991116 --> 8 <!-- Section: 11.3 --> 9 <!-- Creator: Santiago Pericas-Geertsen --> 10 <!-- Purpose: Check for AVT on element name when xsl:element has namespace attribute. --> 11 12<xsl:output method="xml" indent="yes" encoding="UTF-8"/> 13 14<xsl:template match="doc"> 15 <out> 16 <!-- Name is literal, no prefix, no namespace: see copy18 --> 17 <!-- Name is literal, no prefix, namespace: see namespace36 --> 18 <!-- Name is literal, prefix, no namespace: see namespace40 --> 19 <!-- Name is literal, prefix, namespace: see namespace56 --> 20 21 <!-- Name is AVT, no prefix, no namespace --> 22 <xsl:element name="{noprefix}"/> 23 24 <!-- Name is AVT, no prefix, namespace --> 25 <xsl:element name="{noprefix}" namespace="http://literalURI"/> 26 27 <!-- Name is AVT, prefix, no namespace --> 28 <xsl:element name="{prefix}"/> 29 <!-- It's just a string in the source tree, but prefix must be declared here in the stylesheet! --> 30 31 <!-- Name is AVT, prefix, namespace --> 32 <xsl:element name="{prefix}" namespace="http://literalURI"/> 33 </out> 34</xsl:template> 35 36 37 <!-- 38 * Licensed to the Apache Software Foundation (ASF) under one 39 * or more contributor license agreements. See the NOTICE file 40 * distributed with this work for additional information 41 * regarding copyright ownership. The ASF licenses this file 42 * to you under the Apache License, Version 2.0 (the "License"); 43 * you may not use this file except in compliance with the License. 44 * You may obtain a copy of the License at 45 * 46 * http://www.apache.org/licenses/LICENSE-2.0 47 * 48 * Unless required by applicable law or agreed to in writing, software 49 * distributed under the License is distributed on an "AS IS" BASIS, 50 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 51 * See the License for the specific language governing permissions and 52 * limitations under the License. 53 --> 54 55</xsl:stylesheet> 56