All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.saxon.style.XSLAnalyzeString Maven / Gradle / Ivy

Go to download

Provides a basic XSLT 2.0 and XQuery 1.0 processor (W3C Recommendations, January 2007). Command line interfaces and implementations of several Java APIs (DOM, XPath, s9api) are also included.

The newest version!
package net.sf.saxon.style;
import net.sf.saxon.Configuration;
import net.sf.saxon.Platform;
import net.sf.saxon.expr.*;
import net.sf.saxon.instruct.AnalyzeString;
import net.sf.saxon.instruct.Executable;
import net.sf.saxon.om.*;
import net.sf.saxon.regex.RegularExpression;
import net.sf.saxon.trans.XPathException;
import net.sf.saxon.type.ItemType;
import net.sf.saxon.value.SequenceType;

/**
* An xsl:analyze-string elements in the stylesheet. New at XSLT 2.0
*/ public class XSLAnalyzeString extends StyleElement { private Expression select; private Expression regex; private Expression flags; private StyleElement matching; private StyleElement nonMatching; private RegularExpression pattern; /** * Determine whether this node is an instruction. * @return true - it is an instruction */ public boolean isInstruction() { return true; } /** * Determine whether this type of element is allowed to contain an xsl:fallback * instruction */ public boolean mayContainFallback() { return true; } /** * Determine the type of item returned by this instruction (only relevant if * it is an instruction). * @return the item type returned */ protected ItemType getReturnedItemType() { return getCommonChildItemType(); } public void prepareAttributes() throws XPathException { String selectAtt = null; String regexAtt = null; String flagsAtt = null; AttributeCollection atts = getAttributeList(); for (int a=0; a




© 2015 - 2025 Weber Informatics LLC | Privacy Policy