Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Condition coding in XML Schema?

Thread Tools

Condition coding in XML Schema?

Posts: n/a
I have an xml file that is validated through an xsd which is sent to
one of our customers. They translate it through xsl, validate it then
send it to another of their contractors. To clean up any errors that
might happen, we are changing our xsd to validate our data according
to the second xsd. However, as you can imagine, some of our xml is
significantly changed in the xsl.

My problem: I have a series of products that need to contain a
discount date, so I have made this:
xs:restriction base="xs:string"
xs:minLength value="1"
xs:maxLength value="12"

However, if the product is variable, it does not have a discount date
value, and therefore the min length can be 0, but only in this case...

Is there a way that I can fix my validation? Should I go back to the
stored procedure to fix this?
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with while condition OR condition Bill W. Ruby 13 05-09-2011 09:42 PM
C# condition for xml Parsing kanjali Software 0 03-28-2008 06:01 AM
Different results parsing a XML file with XML::Simple (XML::Sax vs. XML::Parser) Erik Wasser Perl Misc 5 03-05-2006 10:09 PM
general coding issues - coding style... calmar Python 11 02-21-2006 10:36 AM
Condition outside loop or separate loop for different condition? - Java 12 06-15-2005 08:50 AM