Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Loading dataset from XML with Schema
Message
De
18/03/2010 14:24:15
 
 
À
18/03/2010 10:23:42
Information générale
Forum:
ASP.NET
Catégorie:
XML
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01454990
Message ID:
01455513
Vues:
33
Hi,
That's very odd.
If I remove a 'req_entry' element then the XML will not validate against the schema - ie according to the schema that's not allowed.
Also, AFAICS from reading the W3c specs the correct behaviour is as I mentioned before:

{value constraint} establishes a default or fixed value for an element. If default is specified, and if the element being validated is empty, then the canonical form of the supplied constraint value becomes the schema normalized value of the validated element in the ·post-schema-validation infoset (my italics)

Looks to me as if .Net has decided to define its own behaviour as far as the DataSet goes - and I guess I can see the reasoning - being able to omit elements could drastically reduce the XML size. But that still means that, even though the XML might create a valid DataSet if you attempt to pre-validate it against the defined schema it will fail :-{
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform