System.Xml.Xsl.XsltOld.Compiler.CreateAttributeAction C# (CSharp) Method

CreateAttributeAction() public method

public CreateAttributeAction ( ) : AttributeAction
return AttributeAction
        public virtual AttributeAction CreateAttributeAction()
        {
            AttributeAction action = new AttributeAction();
            action.Compile(this);
            return action;
        }

Usage Example

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

            if (compiler.Recurse())
            {
                do
                {
                    switch (input.NodeType)
                    {
                        case XPathNodeType.Element:
                            compiler.PushNamespaceScope();

                            string nspace = input.NamespaceURI;
                            string name = input.LocalName;

                            if (Ref.Equal(nspace, input.Atoms.UriXsl) && Ref.Equal(name, input.Atoms.Attribute))
                            {
                                // found attribute so add it
                                AddAction(compiler.CreateAttributeAction());
                            }
                            else
                            {
                                throw compiler.UnexpectedKeyword();
                            }
                            compiler.PopScope();
                            break;

                        case XPathNodeType.Comment:
                        case XPathNodeType.ProcessingInstruction:
                        case XPathNodeType.Whitespace:
                        case XPathNodeType.SignificantWhitespace:
                            break;

                        default:
                            throw XsltException.Create(SR.Xslt_InvalidContents, "attribute-set");
                    }
                }
                while (compiler.Advance());

                compiler.ToParent();
            }
        }
All Usage Examples Of System.Xml.Xsl.XsltOld.Compiler::CreateAttributeAction