1 /*
2 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
3 * @LastModified: Oct 2017
4 */
5 /*
6 * Licensed to the Apache Software Foundation (ASF) under one or more
7 * contributor license agreements. See the NOTICE file distributed with
8 * this work for additional information regarding copyright ownership.
9 * The ASF licenses this file to You under the Apache License, Version 2.0
10 * (the "License"); you may not use this file except in compliance with
11 * the License. You may obtain a copy of the License at
12 *
13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 */
21
22 package com.sun.org.apache.xerces.internal.util;
23
24 import com.sun.org.apache.xerces.internal.xni.NamespaceContext;
25 import java.util.ArrayList;
26 import java.util.Enumeration;
27 import java.util.Iterator;
28 import java.util.List;
29 import java.util.NoSuchElementException;
30
31 /**
32 * Namespace support for XML document handlers. This class doesn't
33 * perform any error checking and assumes that all strings passed
34 * as arguments to methods are unique symbols. The SymbolTable class
35 * can be used for this purpose.
36 *
37 * @author Andy Clark, IBM
38 *
39 */
40 public class NamespaceSupport implements NamespaceContext {
41
42 //
43 // Data
44 //
45
46 /**
47 * Namespace binding information. This array is composed of a
48 * series of tuples containing the namespace binding information:
49 * <prefix, uri>. The default size can be set to anything
50 * as long as it is a power of 2 greater than 1.
51 *
52 * @see #fNamespaceSize
53 * @see #fContext
54 */
55 protected String[] fNamespace = new String[16 * 2];
56
57 /** The top of the namespace information array. */
58 protected int fNamespaceSize;
|
1 /*
2 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
3 */
4 /*
5 * Licensed to the Apache Software Foundation (ASF) under one or more
6 * contributor license agreements. See the NOTICE file distributed with
7 * this work for additional information regarding copyright ownership.
8 * The ASF licenses this file to You under the Apache License, Version 2.0
9 * (the "License"); you may not use this file except in compliance with
10 * the License. You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20
21 package com.sun.org.apache.xerces.internal.util;
22
23 import com.sun.org.apache.xerces.internal.xni.NamespaceContext;
24 import java.util.ArrayList;
25 import java.util.Enumeration;
26 import java.util.Iterator;
27 import java.util.List;
28 import java.util.NoSuchElementException;
29
30 /**
31 * Namespace support for XML document handlers. This class doesn't
32 * perform any error checking and assumes that all strings passed
33 * as arguments to methods are unique symbols. The SymbolTable class
34 * can be used for this purpose.
35 *
36 * @author Andy Clark, IBM
37 *
38 * @LastModified: Oct 2017
39 */
40 public class NamespaceSupport implements NamespaceContext {
41
42 //
43 // Data
44 //
45
46 /**
47 * Namespace binding information. This array is composed of a
48 * series of tuples containing the namespace binding information:
49 * <prefix, uri>. The default size can be set to anything
50 * as long as it is a power of 2 greater than 1.
51 *
52 * @see #fNamespaceSize
53 * @see #fContext
54 */
55 protected String[] fNamespace = new String[16 * 2];
56
57 /** The top of the namespace information array. */
58 protected int fNamespaceSize;
|