Esempio n. 1
0
        public static TiposBaseXsd Parse(string nombre)
        {
            TiposBaseXsd restriccion = null;

            if (listaTiposBase.ContainsKey(nombre))
            {
                restriccion = listaTiposBase[nombre];
            }
            return(restriccion);
        }
Esempio n. 2
0
        public RestriccionXsd(XmlElement xmlElement) : this()
        {
            try {
                string tipoBase = TiposBaseXsd.Parse(xmlElement.Attributes["base"].Value);


                //sacar restricciones
                foreach (XmlNode restriccion in xmlElement.ChildNodes)
                {
                    Añadir(Restricciones.Parse(restriccion.Name), restriccion.Attributes["value"].Value);
                }
            } catch {
                throw new XsdException("El nodo no es de un restriccionXsd valido");
            }
        }
Esempio n. 3
0
 public AtributoXsd(XmlNode source)
 {
     try {
         nombre = source.Attributes["name"].Value;
         tipo   = TiposBaseXsd.Parse(source.Attributes["type"].Value);
     } catch {
         if (source["ref"] == null)
         {
             throw new XsdException("El nodo no es de un atributoXsd valido");
         }
         else
         {
             nombre = source["ref"].Value;
         }
     }
     valorFijo       = source.Attributes["fixed"] != null ? source.Attributes["fixed"].Value : null;
     valorPorDefecto = source.Attributes["default"] != null ? source.Attributes["default"].Value : null;
 }
Esempio n. 4
0
 public AtributoXsd(string nombre, TiposBaseXsd tipoBase, UsoAtributo uso)
 {
     Nombre   = nombre;
     TipoBase = tipoBase;
     Uso      = uso;
 }
Esempio n. 5
0
 public AtributoXsd(string nombre, TiposBaseXsd tipoBase)
     : this(nombre, tipoBase, UsoAtributo.optional)
 {
 }
Esempio n. 6
0
 public RestriccionXsd(TiposBaseXsd tipo)
 {
     tipoBaseRestriccion = tipo;
     restricciones       = new LlistaOrdenada <Restricciones, string>();
     elementosEnumerados = new Llista <string>();
 }