Warning

 

Close
Confirm Action

Are you sure you wish to do this?

Cancel Confirm
AR15.COM
6/8/2004 10:45:28 AM EDT
I'm performing validations on an XML document using an XSD using the MSXML parser.  It works fine and I can return the various validation error messages when the document isn't valid.  However, I need to return a friendly error to an end-user (a non-technical user).

Is there a way to embed a friendly error message in an XSD?  Something where I can turn this...

"The 'vendorPhone' element has an invalid value according to its data type."

Into this...

"Please enter the vendor phone in the following format: (xxx) xxx-xxxx.

Sure, I can capture these errors and use an XSL document to make them friendly, but I'd rather embed them in the XSD.  
6/9/2004 1:49:34 PM EDT
[#1]
Final bump.  Anyone?
6/9/2004 1:51:08 PM EDT
[#2]
What kind of Gun did Pacino use in heat?
6/9/2004 1:55:46 PM EDT
[#3]

<Move Name="Heat">
  <Pacino>
     <Firearm>FN-FNC</Firearm>
  </Pacino>
</Movie>


Next?
6/9/2004 1:59:21 PM EDT
[#4]
Tagged.  I never had to display any errors to the user, only write them to a log (another app picked up the log and displayed the messages).  When I get back to the hotel tonight I'll play around with it and see if I can't come up with some helpful information.
6/9/2004 2:03:00 PM EDT
[#5]

Quoted:
<Move Name="Heat">
  <Pacino>
     <Firearm>FN-FNC</Firearm>
  </Pacino>
</Movie>


Next?



Don't forget "<?xml version="1.0" encoding="UTF-8" ?>" at the top of you document