01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: /* $Id: FootnoteBody.java 554104 2007-07-07 01:07:10Z adelmelle $ */
19:
20: package org.apache.fop.fo.flow;
21:
22: // XML
23: import org.xml.sax.Locator;
24:
25: import org.apache.fop.apps.FOPException;
26: import org.apache.fop.fo.FONode;
27: import org.apache.fop.fo.FObj;
28: import org.apache.fop.fo.PropertyList;
29: import org.apache.fop.fo.ValidationException;
30: import org.apache.fop.fo.properties.CommonAccessibility;
31:
32: /**
33: * Class modelling the fo:footnote-body object.
34: */
35: public class FootnoteBody extends FObj {
36: // The value of properties relevant for fo:footnote-body (commented out for perforance).
37: // private CommonAccessibility commonAccessibility;
38: // End of property values
39:
40: /**
41: * @param parent FONode that is the parent of this object
42: */
43: public FootnoteBody(FONode parent) {
44: super (parent);
45: }
46:
47: /**
48: * @see org.apache.fop.fo.FObj#bind(PropertyList)
49: */
50: public void bind(PropertyList pList) throws FOPException {
51: }
52:
53: /**
54: * @see org.apache.fop.fo.FONode#startOfNode
55: */
56: protected void startOfNode() throws FOPException {
57: getFOEventHandler().startFootnoteBody(this );
58: }
59:
60: /**
61: * Make sure content model satisfied, if so then tell the
62: * FOEventHandler that we are at the end of the flow.
63: * @see org.apache.fop.fo.FONode#endOfNode
64: */
65: protected void endOfNode() throws FOPException {
66: if (firstChild == null) {
67: missingChildElementError("(%block;)+");
68: }
69: getFOEventHandler().endFootnoteBody(this );
70: }
71:
72: /**
73: * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String)
74: * XSL Content Model: (%block;)+
75: */
76: protected void validateChildNode(Locator loc, String nsURI,
77: String localName) throws ValidationException {
78: if (!isBlockItem(nsURI, localName)) {
79: invalidChildError(loc, nsURI, localName);
80: }
81: }
82:
83: /** @see org.apache.fop.fo.FONode#getLocalName() */
84: public String getLocalName() {
85: return "footnote-body";
86: }
87:
88: /**
89: * @see org.apache.fop.fo.FObj#getNameId()
90: */
91: public int getNameId() {
92: return FO_FOOTNOTE_BODY;
93: }
94: }
|