Altova Mailing List Archives

Re: XSD restriction to a set of string values

From: PeteOlcott <PeteOlcott@-----.--->
Date: 12/5/2008 8:38:00 AM
On Dec 4, 7:59=A0am, Martin Honnen <> 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
> <xs:schema
> =A0 =A0xmlns:xs=3D"">
> =A0 =A0<xs:element name=3D"root">
> =A0 =A0 =A0<xs:complexType>
> =A0 =A0 =A0 =A0<xs:sequence maxOccurs=3D"unbounded">
> =A0 =A0 =A0 =A0 =A0<xs:element name=3D"foo" type=3D"fooType"/>
> =A0 =A0 =A0 =A0</xs:sequence>
> =A0 =A0 =A0</xs:complexType>
> =A0 =A0</xs:element>
> =A0 =A0<xs:simpleType name=3D"fooType">
> =A0 =A0 =A0<xs:restriction base=3D"xs:string">
> =A0 =A0 =A0 =A0<xs:pattern value=3D"bar|baz"/>
> =A0 =A0 =A0</xs:restriction>
> =A0 =A0</xs:simpleType>
> </xs:schema>
> allows the values 'bar' and 'baz' for the 'foo' element.
> --
> =A0 =A0 =A0 =A0 Martin Honnen --- MVP XML
> =A0 =A0 =A0 =A0

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?


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.