001 /*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements. See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership. The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the "License");
007 * you may not use this file except in compliance with the License.
008 * You may obtain a copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018 /*
019 * $Id: NamespaceAlias.java 468643 2006-10-28 06:56:03Z minchau $
020 */
021 package org.apache.xalan.templates;
022
023 /**
024 * Object to hold an xsl:namespace element.
025 * A stylesheet can use the xsl:namespace-alias element to declare
026 * that one namespace URI is an alias for another namespace URI.
027 * @see <a href="http://www.w3.org/TR/xslt#literal-result-element">literal-result-element in XSLT Specification</a>
028 */
029 public class NamespaceAlias extends ElemTemplateElement
030 {
031 static final long serialVersionUID = 456173966637810718L;
032
033 /**
034 * Constructor NamespaceAlias
035 *
036 * @param docOrderNumber The document order number
037 *
038 */
039 public NamespaceAlias(int docOrderNumber)
040 {
041 super();
042 m_docOrderNumber = docOrderNumber;
043 }
044
045 /**
046 * The "stylesheet-prefix" attribute.
047 * @serial
048 */
049 private String m_StylesheetPrefix;
050
051 /**
052 * Set the "stylesheet-prefix" attribute.
053 *
054 * @param v non-null prefix value.
055 */
056 public void setStylesheetPrefix(String v)
057 {
058 m_StylesheetPrefix = v;
059 }
060
061 /**
062 * Get the "stylesheet-prefix" attribute.
063 *
064 * @return non-null prefix value.
065 */
066 public String getStylesheetPrefix()
067 {
068 return m_StylesheetPrefix;
069 }
070
071 /**
072 * The namespace in the stylesheet space.
073 * @serial
074 */
075 private String m_StylesheetNamespace;
076
077 /**
078 * Set the value for the stylesheet namespace.
079 *
080 * @param v non-null prefix value.
081 */
082 public void setStylesheetNamespace(String v)
083 {
084 m_StylesheetNamespace = v;
085 }
086
087 /**
088 * Get the value for the stylesheet namespace.
089 *
090 * @return non-null prefix value.
091 */
092 public String getStylesheetNamespace()
093 {
094 return m_StylesheetNamespace;
095 }
096
097 /**
098 * The "result-prefix" attribute.
099 * @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 }