01: /*
02: ItsNat Java Web Application Framework
03: Copyright (C) 2007 Innowhere Software Services S.L., Spanish Company
04: Author: Jose Maria Arranz Santamaria
05:
06: This program is free software: you can redistribute it and/or modify
07: it under the terms of the GNU Affero General Public License as published by
08: the Free Software Foundation, either version 3 of the License, or
09: (at your option) any later version. See the GNU Affero General Public
10: License for more details. See the copy of the GNU Affero General Public License
11: included in this program. If not, see <http://www.gnu.org/licenses/>.
12: */
13:
14: package org.itsnat.core.html;
15:
16: import org.itsnat.core.DocFragmentTemplate;
17: import org.itsnat.core.ItsNatDocument;
18: import org.w3c.dom.DocumentFragment;
19:
20: /**
21: * Represents an (X)HTML markup fragment template. Concrete fragments are created
22: * using this template and can be inserted into documents.
23: *
24: * <p>An (X)HTML fragment contains actually two fragments: the <head> content
25: * and the <body> content. The <itsnat:include> element uses the appropriated fragment
26: * automatically, otherwise call the required fragment calling the specific <code>loadDocumentFragmentX</code>
27: * method</p>
28: *
29: * @author Jose Maria Arranz Santamaria
30: */
31: public interface HTMLDocFragmentTemplate extends DocFragmentTemplate {
32: /**
33: * Creates a <code>org.w3c.dom.DocumentFragment</code> using the <head>
34: * content of the markup template.
35: * This <code>DocumentFragment</code> is ready to
36: * be inserted into the specified <code>org.w3c.dom.Document</code>.
37: *
38: * @param docTarget the document used to create the fragment.
39: * @return the document fragment ready to be inserted.
40: */
41: public DocumentFragment loadDocumentFragmentHead(
42: ItsNatDocument docTarget);
43:
44: /**
45: * Creates a <code>org.w3c.dom.DocumentFragment</code> using the <body>
46: * content of the markup template.
47: * This <code>DocumentFragment</code> is ready to
48: * be inserted into the specified <code>org.w3c.dom.Document</code>.
49: *
50: * @param docTarget the document used to create the fragment.
51: * @return the document fragment ready to be inserted.
52: */
53: public DocumentFragment loadDocumentFragmentBody(
54: ItsNatDocument docTarget);
55: }
|