blob: 992288f2cf85f6a325491cee4298654305c85f07 [file] [log] [blame]
nitind958d79a2004-11-23 19:23:00 +00001/*******************************************************************************
2 * Copyright (c) 2004 IBM Corporation and others.
3 * 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
7 *
8 * Contributors:
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
david_williams56777022005-04-11 06:21:55 +000011package org.eclipse.wst.html.core.internal.contentmodel.chtml;
nitind958d79a2004-11-23 19:23:00 +000012
13
14
15import java.util.Arrays;
16import java.util.Iterator;
17
18/**
19 * BODY.
20 */
21final class HedBODY extends HedFlowContainer {
22
23 private static String[] terminators = {CHTMLNamespace.ElementName.HEAD, CHTMLNamespace.ElementName.BODY, CHTMLNamespace.ElementName.HTML};
24
25 /**
26 */
27 public HedBODY(ElementCollection collection) {
28 super(CHTMLNamespace.ElementName.BODY, collection);
29 layoutType = LAYOUT_BLOCK;
30 omitType = OMIT_BOTH;
31 }
32
33 /**
34 * %attrs;
35 * %bodycolors;
36 * (onload %Script; #IMPLIED)
37 * (onunload %Script; #IMPLIED)
38 * (background %URI; #IMPLIED)
39 * (marginwidth %Pixels; #IMPLIED) ... D205514
40 * (marginheight %Pixels; #IMPLIED) .. D205514
41 * (topmargin, CDATA, #IMPLIED) ...... D205514
42 * (bottommargin, CDATA, #IMPLIED) ... D205514
43 * (leftmargin, CDATA, #IMPLIED) ..... D205514
44 * (rightmargin, CDATA, #IMPLIED) .... D205514
45 */
46 protected void createAttributeDeclarations() {
47 if (attributes != null)
48 return; // already created.
49 if (attributeCollection == null)
50 return; // fatal
51
52 attributes = new CMNamedNodeMapImpl();
53
54 // %attrs;
55 attributeCollection.getAttrs(attributes);
56 // %bodycolors;
57 attributeCollection.getBodycolors(attributes);
58
59 }
60
61 /**
62 * BODY has terminators.
63 * @return java.util.Iterator
64 */
65 protected Iterator getTerminators() {
66 return Arrays.asList(terminators).iterator();
67 }
68}