• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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: XMLNSDecl.java 468643 2006-10-28 06:56:03Z minchau $
20  */
21 package org.apache.xalan.templates;
22 
23 /**
24  * Represents an xmlns declaration
25  */
26 public class XMLNSDecl
27         implements java.io.Serializable // 20001009 jkess
28 {
29     static final long serialVersionUID = 6710237366877605097L;
30 
31   /**
32    * Constructor XMLNSDecl
33    *
34    * @param prefix non-null reference to prefix, using "" for default namespace.
35    * @param uri non-null reference to namespace URI.
36    * @param isExcluded true if this namespace declaration should normally be excluded.
37    */
XMLNSDecl(String prefix, String uri, boolean isExcluded)38   public XMLNSDecl(String prefix, String uri, boolean isExcluded)
39   {
40 
41     m_prefix = prefix;
42     m_uri = uri;
43     m_isExcluded = isExcluded;
44   }
45 
46   /** non-null reference to prefix, using "" for default namespace.
47    *  @serial */
48   private String m_prefix;
49 
50   /**
51    * Return the prefix.
52    * @return The prefix that is associated with this URI, or null
53    * if the XMLNSDecl is declaring the default namespace.
54    */
getPrefix()55   public String getPrefix()
56   {
57     return m_prefix;
58   }
59 
60   /** non-null reference to namespace URI.
61    *  @serial  */
62   private String m_uri;
63 
64   /**
65    * Return the URI.
66    * @return The URI that is associated with this declaration.
67    */
getURI()68   public String getURI()
69   {
70     return m_uri;
71   }
72 
73   /** true if this namespace declaration should normally be excluded.
74    *  @serial  */
75   private boolean m_isExcluded;
76 
77   /**
78    * Tell if this declaration should be excluded from the
79    * result namespace.
80    *
81    * @return true if this namespace declaration should normally be excluded.
82    */
getIsExcluded()83   public boolean getIsExcluded()
84   {
85     return m_isExcluded;
86   }
87 }
88