1 package net.sf.saxon.style; 2 import net.sf.saxon.expr.Expression; 3 import net.sf.saxon.instruct.Executable; 4 import net.sf.saxon.type.ItemType; 5 import net.sf.saxon.om.AttributeCollection; 6 import net.sf.saxon.trans.XPathException; 7 8 import javax.xml.transform.TransformerConfigurationException ; 9 10 14 15 public class XSLMatchingSubstring extends StyleElement { 16 17 22 23 protected ItemType getReturnedItemType() { 24 return getCommonChildItemType(); 25 } 26 27 28 public void prepareAttributes() throws XPathException { 29 AttributeCollection atts = getAttributeList(); 30 for (int a=0; a<atts.getLength(); a++) { 31 int nc = atts.getNameCode(a); 32 checkUnknownAttribute(nc); 33 } 34 } 35 36 40 41 public boolean mayContainSequenceConstructor() { 42 return true; 43 } 44 45 public void validate() throws XPathException { 46 if (!(getParent() instanceof XSLAnalyzeString)) { 47 compileError(getDisplayName() + " must be immediately within xsl:analyze-string", "XTSE0010"); 48 } 49 } 50 51 public Expression compile(Executable exec) throws XPathException { 52 throw new UnsupportedOperationException ("XSLMatchingSubstring#compile() should not be called"); 53 } 54 55 } 56 57 | Popular Tags |