| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
package net.sf.saxon.style; |
| 9 |
|
| 10 |
import net.sf.saxon.expr.Expression; |
| 11 |
import net.sf.saxon.om.AttributeCollection; |
| 12 |
import net.sf.saxon.trans.XPathException; |
| 13 |
|
| 14 |
public class XSLMergeAction extends StyleElement { |
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
public boolean isInstruction() { |
| 23 |
return false; |
| 24 |
} |
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
public boolean mayContainSequenceConstructor() { |
| 33 |
return true; |
| 34 |
} |
| 35 |
|
| 36 |
@Override |
| 37 |
public Expression compile(Compilation exec, ComponentDeclaration decl) |
| 38 |
throws XPathException { |
| 39 |
Expression content = compileSequenceConstructor(exec, decl, true); |
| 40 |
|
| 41 |
return content; |
| 42 |
|
| 43 |
|
| 44 |
} |
| 45 |
|
| 46 |
@Override |
| 47 |
protected void prepareAttributes() throws XPathException { |
| 48 |
AttributeCollection atts = getAttributeList(); |
| 49 |
|
| 50 |
for (int a = 0; a < atts.getLength(); a++) { |
| 51 |
checkUnknownAttribute(atts.getNodeName(a)); |
| 52 |
} |
| 53 |
|
| 54 |
} |
| 55 |
|
| 56 |
public void validate(ComponentDeclaration decl) throws XPathException { |
| 57 |
if (!(getParent() instanceof XSLMerge)) { |
| 58 |
compileError("xsl:merge-action may appear only as a child of xsl:merge", "XTSE0010"); |
| 59 |
} |
| 60 |
} |
| 61 |
|
| 62 |
} |