Inheritance: IXPathEnvironment
Exemplo n.º 1
0
        public CompilerResults Compile(object stylesheet, XmlResolver xmlResolver, out QilExpression qil)
        {
            Debug.Assert(stylesheet != null);
            Debug.Assert(PrincipalStylesheet == null, "Compiler cannot be reused");

            new XsltLoader().Load(this, stylesheet, xmlResolver);
            qil = QilGenerator.CompileStylesheet(this);
            return(CompilerResults);
        }
Exemplo n.º 2
0
        public CompilerErrorCollection Compile(object stylesheet, XmlResolver xmlResolver, out QilExpression qil)
        {
            Debug.Assert(stylesheet != null);
            Debug.Assert(Root == null, "Compiler cannot be reused");

            new XsltLoader().Load(this, stylesheet, xmlResolver);
            qil = QilGenerator.CompileStylesheet(this);
            SortErrors();
            return(CompilerErrorColl);
        }
Exemplo n.º 3
0
 private QilNode CompileFunctionAvailable(QilNode name)
 {
     _f.CheckString(name);
     if (name.NodeType == QilNodeType.LiteralString)
     {
         XmlQualifiedName qname = ResolveQNameThrow(/*ignoreDefaultNs:*/ true, name);
         if (EvaluateFuncCalls)
         {
             // Script blocks and extension objects cannot implement neither null nor XSLT namespace
             if (qname.Namespace.Length == 0 || qname.Namespace == XmlReservedNs.NsXslt)
             {
                 return(_f.Boolean(QilGenerator.IsFunctionAvailable(qname.Name, qname.Namespace)));
             }
             // We might precalculate the result for script namespaces as well
         }
         name = _f.QName(qname.Name, qname.Namespace);
     }
     else
     {
         name = ResolveQNameDynamic(/*ignoreDefaultNs:*/ true, name);
     }
     return(_f.InvokeFunctionAvailable(name));
 }