| 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.expr.instruct.WherePopulated; |
| 12 |
import net.sf.saxon.om.AttributeCollection; |
| 13 |
import net.sf.saxon.trans.XPathException; |
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
public final class XSLWherePopulated extends StyleElement { |
| 21 |
|
| 22 |
private Expression select; |
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
public boolean isInstruction() { |
| 31 |
return true; |
| 32 |
} |
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
public boolean mayContainSequenceConstructor() { |
| 41 |
return true; |
| 42 |
} |
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
public boolean mayContainFallback() { |
| 50 |
return true; |
| 51 |
} |
| 52 |
|
| 53 |
public void prepareAttributes() throws XPathException { |
| 54 |
|
| 55 |
AttributeCollection atts = getAttributeList(); |
| 56 |
|
| 57 |
for (int a = 0; a < atts.getLength(); a++) { |
| 58 |
checkUnknownAttribute(atts.getNodeName(a)); |
| 59 |
} |
| 60 |
} |
| 61 |
|
| 62 |
public void validate(ComponentDeclaration decl) throws XPathException { |
| 63 |
|
| 64 |
} |
| 65 |
|
| 66 |
|
| 67 |
public Expression compile(Compilation exec, ComponentDeclaration decl) throws XPathException { |
| 68 |
if (select == null) { |
| 69 |
select = compileSequenceConstructor(exec, decl, false); |
| 70 |
} |
| 71 |
return new WherePopulated(select); |
| 72 |
} |
| 73 |
|
| 74 |
} |