Ejemplo n.º 1
0
 public override void Evaluate(XslTransformProcessor p)
 {
     p.SetBusy(this);
     if (this.usedAttributeSets != null)
     {
         for (int i = 0; i < this.usedAttributeSets.Count; i++)
         {
             XmlQualifiedName xmlQualifiedName = (XmlQualifiedName)this.usedAttributeSets[i];
             XslAttributeSet  xslAttributeSet  = p.ResolveAttributeSet(xmlQualifiedName);
             if (xslAttributeSet == null)
             {
                 throw new XsltException("Could not resolve attribute set", null, p.CurrentNode);
             }
             if (p.IsBusy(xslAttributeSet))
             {
                 throw new XsltException("circular dependency", null, p.CurrentNode);
             }
             xslAttributeSet.Evaluate(p);
         }
     }
     for (int j = 0; j < this.attributes.Count; j++)
     {
         ((XslAttribute)this.attributes[j]).Evaluate(p);
     }
     p.SetFree(this);
 }
        public override void Evaluate(XslTransformProcessor p)
        {
            p.SetBusy(this);

            if (usedAttributeSets != null)
            {
                for (int i = 0; i < usedAttributeSets.Count; i++)
                {
                    QName           set = (QName)usedAttributeSets [i];
                    XslAttributeSet s   = p.ResolveAttributeSet(set);
                    if (s == null)
                    {
                        throw new XsltException("Could not resolve attribute set", null, p.CurrentNode);
                    }

                    if (p.IsBusy(s))
                    {
                        throw new XsltException("circular dependency", null, p.CurrentNode);
                    }

                    s.Evaluate(p);
                }
            }

            for (int i = 0; i < attributes.Count; i++)
            {
                ((XslAttribute)attributes [i]).Evaluate(p);
            }

            p.SetFree(this);
        }