I'm receiving an XML message with unknown variable name elements... that is, they are not predefined...

I only know there can be 0 or more of those elements, along with some other that are mandatory...

For example

<root>
    <service>my service</service>
    <resource>my resource</resource>
    <action>update</action>
    <parameters>
      <field1>value1</field1>
      <field2>value2</field2>
      <field3>value3</field3>
    </parameters>
</root>

that is, I don't know what will be passed as "parameters", I only know there will be 0 or more elements with a value, no deeper tag nesting allowed....

I was thinking about something like

<?xml version="1.0" encoding="ISO-8859-1" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:element name="root">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="service" type="xs:string" minOccurs="1" maxOccurs="1" nillable="false"/>
      <xs:element name="resource" type="xs:string" minOccurs="1" maxOccurs="1" nillable="false"/>
      <xs:element name="action" type="xs:string" minOccurs="1" maxOccurs="1" nillable="false"/>
      <xs:element name="parameters">
        <xs:complexType>
          <xs:element name="*" maxOccurs="unbounded">
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

</xs:schema>

of course, the hard part is

<xs:element name="*" maxOccurs="unbounded">

Is it possible to do such a thing?
How can I define an XSD file that validates such a message?

--

I checked the w3c reference at

htt

Edit
Report