| 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 | import net.sf.saxon.expr.Expression; |
| 11 | import net.sf.saxon.expr.instruct.OnNonEmptyExpr; |
| 12 | import net.sf.saxon.trans.XPathException; |
| 13 | |
| 14 | |
| 15 | /** |
| 16 | * An xsl:on-non-empty element in the stylesheet. The rules are identical to xsl:sequence |
| 17 | */ |
| 18 | |
| 19 | public final class XSLOnNonEmpty extends XSLSequence { |
| 20 | |
| 21 | @Override |
| 22 | public Expression compile(Compilation exec, ComponentDeclaration decl) throws XPathException { |
| 23 | Expression e = super.compile(exec, decl); |
| 24 | return new OnNonEmptyExpr(e); |
| 25 | } |
| 26 | |
| 27 | } |
| 28 | |
| 29 |