Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: XSD restriction to a set of string values >Thread Next - Re: XSD restriction to a set of string values Re: XSD restriction to a set of string valuesTo: NULL Date: 12/5/2008 8:15:00 PM On Fri, 5 Dec 2008 08:38:22 -0800 (PST), PeteOlcott <PeteOlcott@g...> wrote: >On Dec 4, 7:59 am, Martin Honnen <mahotr...@yahoo.de> wrote: >> Peter Olcott wrote: >> > I need to know the syntax for restricting a type to a >> > specific set of string values where these string values are >> > not encoded as enumeration types. >> >> You could use a regular expression pattern e.g. this schema >I am trying to make a SOAP interface such that the client can >dynamically reconfigure its graphical user interface with no >programming changes and no recompile required whenever the web >service is updated with new capabilities. Because of this your >suggestion may not work. It would see that you suggestion would at >least require a recompile. > >What I am trying to do may not be possible with pure SOAP, and may >require the SOAP message to have an embedded XML payload. How would >this be specified in a SOAP XSD document? It seems clear that you asked one question, then completely changed the parameters - it's always best to be clear about the complete intent up front, in order not to waste peoples time proposing solutions which don't meet your requirements. In terms of dynamically updating the XSD, I'd at least consider a secondary validation URL which provides the modified rule on the fly e.g the modified rule is dynamically generated from content held in a DB and processed by requesting a specific but variable URL on a web server. XSI include http://www.w3schools.com/schema/el_include.asp (or in SOAP terms, www.---.com) is one way I could see that working Each time the schema is loaded (assuming the parsing code is set to not cache includes) then it should request a fresh copy of the included schema. The included XSD schema elements need not necessarily come from a static file source. The include should presumably specify whatever regex is required. You could potentially also use XSL on a base schema document per request, so it's modified on the fly that way prior to validation being performed using the generated schema. Again you'd want to ensure the validator always requested a fresh instance rather than caching it client side. In PHP (my favourite scripting language) I'd be making SOAP calls with the WSDL_CACHE_NONE parameter set, to ensure a fresh copy of the WSDL was requested for each time the SOAP object was instantiated. HTH Cheers - Neil ------------------------------------------------ Digital Media MVP : 2004-2008 http://mvp.support.microsoft.com/mvpfaqs | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
