Example #1
0
        private bool FunctionAvailableHelper(XmlQualifiedName name)
        {
            // Is this an XPath or an XSLT function?
            if (QilGenerator.IsFunctionAvailable(name.Name, name.Namespace))
            {
                return(true);
            }

            // Script blocks and extension objects cannot implement neither null nor XSLT namespace
            if (name.Namespace.Length == 0 || name.Namespace == XmlReservedNs.NsXslt)
            {
                return(false);
            }

            // Is this an extension object function?
            if (_runtime.ExternalContext.LateBoundFunctionExists(name.Name, name.Namespace))
            {
                return(true);
            }

            // Is this a script function?
            return(_runtime.EarlyBoundFunctionExists(name.Name, name.Namespace));
        }
Example #2
0
 // Spec: http://www.w3.org/TR/xslt#function-element-available
 public bool ElementAvailable(XmlQualifiedName name)
 {
     return(QilGenerator.IsElementAvailable(name));
 }