KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xalan > templates > NamespaceAlias


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 /*
17  * $Id: NamespaceAlias.java,v 1.9 2004/02/16 20:32:32 minchau Exp $
18  */

19 package org.apache.xalan.templates;
20
21 /**
22  * Object to hold an xsl:namespace element.
23  * A stylesheet can use the xsl:namespace-alias element to declare
24  * that one namespace URI is an alias for another namespace URI.
25  * @see <a HREF="http://www.w3.org/TR/xslt#literal-result-element">literal-result-element in XSLT Specification</a>
26  */

27 public class NamespaceAlias extends ElemTemplateElement
28 {
29   
30   /**
31    * Constructor NamespaceAlias
32    *
33    * @param docOrderNumber The document order number
34    *
35    */

36   public NamespaceAlias(int docOrderNumber)
37   {
38     super();
39     m_docOrderNumber = docOrderNumber;
40   }
41
42   /**
43    * The "stylesheet-prefix" attribute.
44    * @serial
45    */

46   private String JavaDoc m_StylesheetPrefix;
47
48   /**
49    * Set the "stylesheet-prefix" attribute.
50    *
51    * @param v non-null prefix value.
52    */

53   public void setStylesheetPrefix(String JavaDoc v)
54   {
55     m_StylesheetPrefix = v;
56   }
57
58   /**
59    * Get the "stylesheet-prefix" attribute.
60    *
61    * @return non-null prefix value.
62    */

63   public String JavaDoc getStylesheetPrefix()
64   {
65     return m_StylesheetPrefix;
66   }
67   
68   /**
69    * The namespace in the stylesheet space.
70    * @serial
71    */

72   private String JavaDoc m_StylesheetNamespace;
73
74   /**
75    * Set the value for the stylesheet namespace.
76    *
77    * @param v non-null prefix value.
78    */

79   public void setStylesheetNamespace(String JavaDoc v)
80   {
81     m_StylesheetNamespace = v;
82   }
83
84   /**
85    * Get the value for the stylesheet namespace.
86    *
87    * @return non-null prefix value.
88    */

89   public String JavaDoc getStylesheetNamespace()
90   {
91     return m_StylesheetNamespace;
92   }
93
94   /**
95    * The "result-prefix" attribute.
96    * @serial
97    */

98   private String JavaDoc m_ResultPrefix;
99
100   /**
101    * Set the "result-prefix" attribute.
102    *
103    * @param v non-null prefix value.
104    */

105   public void setResultPrefix(String JavaDoc v)
106   {
107     m_ResultPrefix = v;
108   }
109
110   /**
111    * Get the "result-prefix" attribute.
112    *
113    * @return non-null prefix value.
114    */

115   public String JavaDoc getResultPrefix()
116   {
117     return m_ResultPrefix;
118   }
119   
120   /**
121    * The result namespace.
122    * @serial
123    */

124   private String JavaDoc m_ResultNamespace;
125
126   /**
127    * Set the result namespace.
128    *
129    * @param v non-null namespace value
130    */

131   public void setResultNamespace(String JavaDoc v)
132   {
133     m_ResultNamespace = v;
134   }
135
136   /**
137    * Get the result namespace value.
138    *
139    * @return non-null namespace value.
140    */

141   public String JavaDoc getResultNamespace()
142   {
143     return m_ResultNamespace;
144   }
145
146   /**
147    * This function is called to recompose() all of the namespace alias properties elements.
148    *
149    * @param root The owning root stylesheet
150    */

151   public void recompose(StylesheetRoot root)
152   {
153     root.recomposeNamespaceAliases(this);
154   }
155
156 }
157
Popular Tags