KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > icl > saxon > style > AbsentExtensionElement


1 package com.icl.saxon.style;
2 import com.icl.saxon.*;
3 import com.icl.saxon.expr.*;
4 import com.icl.saxon.trace.*; // e.g.
5
import javax.xml.transform.*;
6 import org.w3c.dom.Node JavaDoc;
7 import java.io.*;
8
9 /**
10 * This element is a surrogate for an extension element (or indeed an xsl element)
11 * for which no implementation is available.<BR>
12 */

13
14 public class AbsentExtensionElement extends StyleElement {
15
16     /**
17     * Determine whether this type of element is allowed to contain a template-body
18     */

19
20     public boolean mayContainTemplateBody() {
21         return true;
22     }
23
24     public void prepareAttributes() throws TransformerConfigurationException {
25     }
26
27     public void validate() throws TransformerConfigurationException {
28     }
29
30     public void process(Context context) throws TransformerException {
31         if (!(isTopLevel() && forwardsCompatibleModeIsEnabled())) {
32             throw validationError;
33         }
34     }
35 }
36
37 //
38
// The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
39
// you may not use this file except in compliance with the License. You may obtain a copy of the
40
// License at http://www.mozilla.org/MPL/
41
//
42
// Software distributed under the License is distributed on an "AS IS" basis,
43
// WITHOUT WARRANTY OF ANY KIND, either express or implied.
44
// See the License for the specific language governing rights and limitations under the License.
45
//
46
// The Original Code is: all this file.
47
//
48
// The Initial Developer of the Original Code is
49
// Michael Kay of International Computers Limited (mhkay@iclway.co.uk).
50
//
51
// Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
52
//
53
// Contributor(s):
54
// Portions marked "e.g." are from Edwin Glaser (edwin@pannenleiter.de)
55
//
56
Popular Tags