System.Xml.Xsl.XsltOld.NavigatorInput.MoveToNextAttribute C# (CSharp) Method

MoveToNextAttribute() private method

private MoveToNextAttribute ( ) : bool
return bool
        internal  bool MoveToNextAttribute() {
            AssertInput();
            return _Navigator.MoveToNextAttribute();
        }
        internal  bool MoveToFirstNamespace() {

Usage Example

Ejemplo n.º 1
0
        private void AddScript(Compiler compiler)
        {
            NavigatorInput input = compiler.Input;

            ScriptingLanguage lang = ScriptingLanguage.JScript;
            string            implementsNamespace = null;

            if (input.MoveToFirstAttribute())
            {
                do
                {
                    if (input.LocalName == input.Atoms.Language)
                    {
                        string langName = input.Value;
                        if (
                            string.Equals(langName, "jscript", StringComparison.OrdinalIgnoreCase) ||
                            string.Equals(langName, "javascript", StringComparison.OrdinalIgnoreCase)
                            )
                        {
                            lang = ScriptingLanguage.JScript;
                        }
                        else if (
                            string.Equals(langName, "c#", StringComparison.OrdinalIgnoreCase) ||
                            string.Equals(langName, "csharp", StringComparison.OrdinalIgnoreCase)
                            )
                        {
                            lang = ScriptingLanguage.CSharp;
                        }
#if !FEATURE_PAL // visualbasic
                        else if (
                            string.Equals(langName, "vb", StringComparison.OrdinalIgnoreCase) ||
                            string.Equals(langName, "visualbasic", StringComparison.OrdinalIgnoreCase)
                            )
                        {
                            lang = ScriptingLanguage.VisualBasic;
                        }
#endif // !FEATURE_PAL
                        else
                        {
                            throw XsltException.Create(SR.Xslt_ScriptInvalidLanguage, langName);
                        }
                    }
                    else if (input.LocalName == input.Atoms.ImplementsPrefix)
                    {
                        if (!PrefixQName.ValidatePrefix(input.Value))
                        {
                            throw XsltException.Create(SR.Xslt_InvalidAttrValue, input.LocalName, input.Value);
                        }
                        implementsNamespace = compiler.ResolveXmlNamespace(input.Value);
                    }
                }while (input.MoveToNextAttribute());
                input.ToParent();
            }
            if (implementsNamespace == null)
            {
                throw XsltException.Create(SR.Xslt_MissingAttribute, input.Atoms.ImplementsPrefix);
            }
            if (!input.Recurse() || input.NodeType != XPathNodeType.Text)
            {
                throw XsltException.Create(SR.Xslt_ScriptEmpty);
            }
            compiler.AddScript(input.Value, lang, implementsNamespace, input.BaseURI, input.LineNumber);
            input.ToParent();
        }
All Usage Examples Of System.Xml.Xsl.XsltOld.NavigatorInput::MoveToNextAttribute