예제 #1
0
파일: XPath.cs 프로젝트: orbeon/saxon-he
        /// <summary>
        /// Declare a variable for use by the XPath expression. If the expression
        /// refers to any variables, then they must be declared here, unless the
        /// <c>AllowUndeclaredVariables</c> property has been set to true.
        /// </summary>
        /// <param name="name">The name of the variable, as a <c>QName</c></param>


        public void DeclareVariable(QName name)
        {
            if (cache != null)
            {
                cache.Clear();
            }
            JXPathVariable var = env.declareVariable(name.ToQNameValue());
            //declaredVariables.Add(var);
        }
예제 #2
0
파일: XPath.cs 프로젝트: fidothe/saxon-he
        /// <summary>
        /// Set the value of a variable
        /// </summary>

        public void SetVariable(QName name, XdmValue value)
        {
            int slot = env.getSlotNumber(name.ToQNameValue());

            if (slot == -1)
            {
                throw new ArgumentException("Variable has not been declared: " + name);
            }
            variableValues[slot] = value.Unwrap();
        }
예제 #3
0
파일: XPath.cs 프로젝트: orbeon/saxon-he
        /// <summary>
        /// Declare a variable for use by the XPath expression. If the expression
        /// refers to any variables, then they must be declared here.
        /// </summary>
        /// <param name="name">The name of the variable, as a <c>QName</c></param>


        public void DeclareVariable(QName name)
        {
            JXPathVariable var = env.declareVariable(name.ToQNameValue());

            declaredVariables.Add(var);
        }
예제 #4
0
파일: XPath.cs 프로젝트: nuxleus/saxonica
        /// <summary>
        /// Declare a variable for use by the XPath expression. If the expression
        /// refers to any variables, then they must be declared here, unless the
        /// <c>AllowUndeclaredVariables</c> property has been set to true.
        /// </summary>
        /// <param name="name">The name of the variable, as a <c>QName</c></param>


        public void DeclareVariable(QName name)
        {
            if (cache != null)
            {
                cache.Clear();
            }
            JXPathVariable var = env.declareVariable(name.ToQNameValue());
            //declaredVariables.Add(var);
        }
예제 #5
0
파일: XPath.cs 프로젝트: fidothe/saxon-he
        /// <summary>
        /// Declare a variable for use by the XPath expression. If the expression
        /// refers to any variables, then they must be declared here.
        /// </summary>
        /// <param name="name">The name of the variable, as a <c>QName</c></param>


        public void DeclareVariable(QName name)
        {
            env.declareVariable(name.ToQNameValue());
        }
        /// <summary>
        /// Declare a variable for use by the XPath expression. If the expression
        /// refers to any variables, then they must be declared here.
        /// </summary>
        /// <param name="name">The name of the variable, as a <c>QName</c></param>


        public void DeclareVariable(QName name) {
            env.declareVariable(name.ToQNameValue());
        }
        /// <summary>
        /// Set the value of a variable
        /// </summary>

        public void SetVariable(QName name, XdmValue value) {
            int slot = env.getSlotNumber(name.ToQNameValue());
            if (slot == -1) {
                throw new ArgumentException("Variable has not been declared: " + name);
            }
            variableValues[slot] = value.Unwrap();
        }