1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 /* 19 * $Id: NamespaceAlias.java 468643 2006-10-28 06:56:03Z minchau $ 20 */ 21 package org.apache.xalan.templates; 22 23 /** 24 * Object to hold an xsl:namespace element. 25 * A stylesheet can use the xsl:namespace-alias element to declare 26 * that one namespace URI is an alias for another namespace URI. 27 * @see <a href="http://www.w3.org/TR/xslt#literal-result-element">literal-result-element in XSLT Specification</a> 28 */ 29 public class NamespaceAlias extends ElemTemplateElement 30 { 31 static final long serialVersionUID = 456173966637810718L; 32 33 /** 34 * Constructor NamespaceAlias 35 * 36 * @param docOrderNumber The document order number 37 * 38 */ 39 public NamespaceAlias(int docOrderNumber) 40 { 41 super(); 42 m_docOrderNumber = docOrderNumber; 43 } 44 45 /** 46 * The "stylesheet-prefix" attribute. 47 * @serial 48 */ 49 private String m_StylesheetPrefix; 50 51 /** 52 * Set the "stylesheet-prefix" attribute. 53 * 54 * @param v non-null prefix value. 55 */ 56 public void setStylesheetPrefix(String v) 57 { 58 m_StylesheetPrefix = v; 59 } 60 61 /** 62 * Get the "stylesheet-prefix" attribute. 63 * 64 * @return non-null prefix value. 65 */ 66 public String getStylesheetPrefix() 67 { 68 return m_StylesheetPrefix; 69 } 70 71 /** 72 * The namespace in the stylesheet space. 73 * @serial 74 */ 75 private String m_StylesheetNamespace; 76 77 /** 78 * Set the value for the stylesheet namespace. 79 * 80 * @param v non-null prefix value. 81 */ 82 public void setStylesheetNamespace(String v) 83 { 84 m_StylesheetNamespace = v; 85 } 86 87 /** 88 * Get the value for the stylesheet namespace. 89 * 90 * @return non-null prefix value. 91 */ 92 public String getStylesheetNamespace() 93 { 94 return m_StylesheetNamespace; 95 } 96 97 /** 98 * The "result-prefix" attribute. 99 * @serial 100 */ 101 private String m_ResultPrefix; 102 103 /** 104 * Set the "result-prefix" attribute. 105 * 106 * @param v non-null prefix value. 107 */ 108 public void setResultPrefix(String v) 109 { 110 m_ResultPrefix = v; 111 } 112 113 /** 114 * Get the "result-prefix" attribute. 115 * 116 * @return non-null prefix value. 117 */ 118 public String getResultPrefix() 119 { 120 return m_ResultPrefix; 121 } 122 123 /** 124 * The result namespace. 125 * @serial 126 */ 127 private String m_ResultNamespace; 128 129 /** 130 * Set the result namespace. 131 * 132 * @param v non-null namespace value 133 */ 134 public void setResultNamespace(String v) 135 { 136 m_ResultNamespace = v; 137 } 138 139 /** 140 * Get the result namespace value. 141 * 142 * @return non-null namespace value. 143 */ 144 public String getResultNamespace() 145 { 146 return m_ResultNamespace; 147 } 148 149 /** 150 * This function is called to recompose() all of the namespace alias properties elements. 151 * 152 * @param root The owning root stylesheet 153 */ 154 public void recompose(StylesheetRoot root) 155 { 156 root.recomposeNamespaceAliases(this); 157 } 158 159 } 160