This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Microsoft XML > February 2004 > do i need to write my own validator?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author do i need to write my own validator?
Ryan

2004-02-24, 2:29 am

I have a very complex XDR schema that uses namespaces:

xmlns="urn:schemas-microsoft-com:xml-data"
xmlns:b="urn:schemas-microsoft-com:BizTalkServer"
xmlns:d="urn:schemas-microsoft-com:datatypes"

Do I need to build a custom validator in order to validate XML documents
against this schema? How does the XML parser know how to validate against
the extra namespaces?

For example, schemas-microsoft-com:datatypes allows for attributes such as
maxLength, minLength, etc. If my XML document contains a value that doesn't
meet these criteria, then the document should not be valid.

The "schemas-microsoft-com:BizTalkServer" is even more custom, allowing for
such things as a "FieldInfo" element with "format" attributes that specifiy
the exact format for dates and times. I'm pretty sure XmlValidatingReader
doesn't check for these special validations.


If I do have to build my own validator, does anyone have some samples I can
look at? Is there an easy way to do this?


Thanks, Ryan



Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews