Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to define default value in XSD schema?
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Title:
How to define default value in XSD schema?
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01280851
Message ID:
01280851
Views:
72
I don't know if this is possible but I would like to define a default value in case the value of an element in XML is empty.

Here is an example.

XML file has an element MYVALUE as
<MYVALUE>2</MYVALUE>
In XSD file this element has type INT. But if the element MYVALUE has nothing as in
<MYVALUE></MYVALUE>
Error occurs (unable to parse or something to that effect).

It would be nice if in the XSD file I could specify that in case the element is empty put value 0. And therefore, prevent an error from occuring. Can it be done?

Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Next
Reply
Map
View

Click here to load this message in the networking platform