| 1 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 2 | // Copyright (c) 2018 Saxonica Limited. |
| 3 | // This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. |
| 4 | // If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 5 | // This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. |
| 6 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 7 | |
| 8 | package net.sf.saxon.style; |
| 9 | |
| 10 | /** |
| 11 | * Abstract class representing an extension instruction |
| 12 | */ |
| 13 | |
| 14 | public abstract class ExtensionInstruction extends StyleElement { |
| 15 | |
| 16 | /** |
| 17 | * Determine whether this node is an instruction. |
| 18 | * |
| 19 | * @return true - it is an instruction |
| 20 | */ |
| 21 | |
| 22 | public final boolean isInstruction() { |
| 23 | return true; |
| 24 | } |
| 25 | |
| 26 | /** |
| 27 | * Determine whether this type of element is allowed to contain an xsl:fallback |
| 28 | * instruction. Note that this is only relevant if the element is an instruction. |
| 29 | * |
| 30 | * @return true: this element (assuming it is an instruction) may contain an xsl:fallback |
| 31 | * child instruction, which is ignored if the element is recognized. |
| 32 | */ |
| 33 | |
| 34 | public final boolean mayContainFallback() { |
| 35 | return true; |
| 36 | } |
| 37 | |
| 38 | } |