| 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 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
public class XSLMatchingSubstring extends StyleElement { |
| 20 |
|
| 21 |
|
| 22 |
public void prepareAttributes() throws XPathException { |
| 23 |
AttributeCollection atts = getAttributeList(); |
| 24 |
for (int a = 0; a < atts.getLength(); a++) { |
| 25 |
checkUnknownAttribute(atts.getNodeName(a)); |
| 26 |
} |
| 27 |
} |
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
public boolean mayContainSequenceConstructor() { |
| 36 |
return true; |
| 37 |
} |
| 38 |
|
| 39 |
public void validate(ComponentDeclaration decl) throws XPathException { |
| 40 |
if (!(getParent() instanceof XSLAnalyzeString)) { |
| 41 |
compileError(getDisplayName() + " must be immediately within xsl:analyze-string", "XTSE0010"); |
| 42 |
} |
| 43 |
} |
| 44 |
|
| 45 |
|
| 46 |
public Expression compile(Compilation exec, ComponentDeclaration decl) throws XPathException { |
| 47 |
throw new UnsupportedOperationException("XSLMatchingSubstring#compile() should not be called"); |
| 48 |
} |
| 49 |
|
| 50 |
} |
| 51 |
|