Пример #1
0
        /** Re-initializes attributes. */
        public void Reset( Schema schema, XmlElement e )
        {
            XmlAttributeCollection atts = e.Attributes;
            count = atts.Count;

            if( names.Length<count ) {
                // reallocate the buffer
                names = new int[count];
                values = new string[count];
            }

            int j=0;
            for( int i=0; i<count; i++ ) {
                XmlNode att = atts.Item(i);
                if( att.Name=="xmlns" || att.Name.StartsWith("xmlns:") )
                    continue;
                names[j] = schema.GetNameCode( att.NamespaceURI, att.LocalName );
                values[j] = att.Value;
                j++;
            }

            count = j;

            this.context = new XmlElementContext(e);
        }
Пример #2
0
 public DomValidatelet( Schema schema )
 {
     this.Schema = schema;
 }