blob: e52881493711fb5cd6568b3da670d63eee50ace8 [file] [log] [blame]
nitind958d79a2004-11-23 19:23:00 +00001/*******************************************************************************
amywu923ee602007-04-10 18:32:07 +00002 * Copyright (c) 2004, 2005 IBM Corporation and others.
nitind958d79a2004-11-23 19:23:00 +00003 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
amywu923ee602007-04-10 18:32:07 +00007 *
nitind958d79a2004-11-23 19:23:00 +00008 * Contributors:
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
david_williams56777022005-04-11 06:21:55 +000011package org.eclipse.wst.html.core.internal.contentmodel;
nitind958d79a2004-11-23 19:23:00 +000012
13
14
15import java.util.Arrays;
16
david_williams4ad020f2005-04-18 08:00:30 +000017import org.eclipse.wst.html.core.internal.provisional.HTML40Namespace;
nitind958d79a2004-11-23 19:23:00 +000018
19
20/**
21 * BASE.
22 */
23final class HedBASE extends HedEmpty {
24
25 /**
26 */
27 public HedBASE(ElementCollection collection) {
28 super(HTML40Namespace.ElementName.BASE, collection);
29 // LAYOUT_HIDDEN.
30 // Because, BASE is GROUP_HIDDEN in the C++DOM/DTDParser.cpp.
31 layoutType = LAYOUT_HIDDEN;
32 }
33
34 /**
35 * BASE.
36 * (href %URI; #IMPLIED)
37 * (target %FrameTarget; #IMPLIED)
38 */
39 protected void createAttributeDeclarations() {
40 if (attributes != null)
41 return; // already created.
42 if (attributeCollection == null)
43 return; // fatal
44
45 attributes = new CMNamedNodeMapImpl();
46
47 String[] names = {HTML40Namespace.ATTR_NAME_HREF, HTML40Namespace.ATTR_NAME_TARGET};
48 attributeCollection.getDeclarations(attributes, Arrays.asList(names).iterator());
49 }
amywu923ee602007-04-10 18:32:07 +000050}