Exemplo 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);
        }
Exemplo n.º 3
0
		public void Merge (XslAttributeSet s)
		{
			attributes.AddRange (s.attributes);
			
			foreach (QName q in s.usedAttributeSets)
				if (!usedAttributeSets.Contains (q))
					usedAttributeSets.Add (q);
		}
Exemplo n.º 4
0
 public void Merge(XslAttributeSet s)
 {
     this.attributes.AddRange(s.attributes);
     foreach (object obj in s.usedAttributeSets)
     {
         XmlQualifiedName xmlQualifiedName = (XmlQualifiedName)obj;
         if (!this.usedAttributeSets.Contains(xmlQualifiedName))
         {
             this.usedAttributeSets.Add(xmlQualifiedName);
         }
     }
 }
        public void Merge(XslAttributeSet s)
        {
            attributes.AddRange(s.attributes);

            foreach (QName q in s.usedAttributeSets)
            {
                if (!usedAttributeSets.Contains(q))
                {
                    usedAttributeSets.Add(q);
                }
            }
        }
Exemplo n.º 6
0
        public void AddAttributeSet(XslAttributeSet set)
        {
            XslAttributeSet xslAttributeSet = this.attrSets[set.Name] as XslAttributeSet;

            if (xslAttributeSet != null)
            {
                xslAttributeSet.Merge(set);
                this.attrSets[set.Name] = xslAttributeSet;
            }
            else
            {
                this.attrSets[set.Name] = set;
            }
        }
Exemplo n.º 7
0
        public void AddAttributeSet(XslAttributeSet set)
        {
            XslAttributeSet existing = attrSets [set.Name] as XslAttributeSet;

            // The latter set will have higher priority
            if (existing != null)
            {
                existing.Merge(set);
                attrSets [set.Name] = existing;
            }
            else
            {
                attrSets [set.Name] = set;
            }
        }
Exemplo n.º 8
0
		public void AddAttributeSet (XslAttributeSet set)
		{
			XslAttributeSet existing = attrSets [set.Name] as XslAttributeSet;
			// The latter set will have higher priority
			if (existing != null) {
				existing.Merge (set);
				attrSets [set.Name] = existing;
			}
			else
				attrSets [set.Name] = set;
		}