System.Xml.Xsl.XsltOld.UseAttributeSetsAction.Compile C# (CSharp) Method

Compile() private method

private Compile ( Compiler compiler ) : void
compiler Compiler
return void
        internal override void Compile(Compiler compiler) {
            Debug.Assert(Keywords.Equals(compiler.Input.LocalName, compiler.Atoms.UseAttributeSets));
            this.useString = compiler.Input.Value;

            Debug.Assert(this.useAttributeSets == null);

            if (this.useString.Length == 0) {
                // Split creates empty node is spliting empty string
                this.useAttributeSets = new XmlQualifiedName[0];
                return;
            }

            string[] qnames = XmlConvert.SplitString(this.useString);

            try {
                this.useAttributeSets = new XmlQualifiedName[qnames.Length]; {
                    for (int i = 0; i < qnames.Length; i++) {
                        this.useAttributeSets[i] = compiler.CreateXPathQName(qnames[i]);
                    }
                }
            }
            catch (XsltException) {
                if (!compiler.ForwardCompatibility) {
                    // Rethrow the exception if we're not in forwards-compatible mode
                    throw;
                }
                // Ignore the whole list in forwards-compatible mode
                this.useAttributeSets = new XmlQualifiedName[0];
            }
        }

Usage Example

Ejemplo n.º 1
0
        public virtual UseAttributeSetsAction CreateUseAttributeSetsAction()
        {
            UseAttributeSetsAction action = new UseAttributeSetsAction();

            action.Compile(this);
            return(action);
        }
All Usage Examples Of System.Xml.Xsl.XsltOld.UseAttributeSetsAction::Compile
UseAttributeSetsAction