W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2001

Re: unnamed elements ? | elements with unknown names | <xsd:element name="*"... ?

From: Eddie Robertsson <eddie@allette.com.au>
Date: Tue, 28 Aug 2001 10:42:22 +1000
Message-ID: <3B8AE8EE.9590E778@allette.com.au>
To: Yves Bresson <Yves.Bresson@linkvest.com>
CC: xmlschema-dev@w3.org
> Does anyone know if it is possible to have something like this:
>
>                 ...
>                 <xsd:sequence>
>                         <xsd:element name="*" minOccurs="0"
> maxOccurs="unbounded">
>                                 <xsd:complexType>
>                                         <xsd:sequence>
>                                                 <xsd:element
> name="info-a" type="xsd:string"/>
>                                                 <xsd:element
> name="info-b" type="xsd:string"/>
>                                         </xsd:sequence>
>                                 </xsd:complexType>
>                         </xsd:element>
>                 </xsd:sequence>
>                 ...
>
> this should allow to verify the document containes elements with UNKNOWN
> names, but all these elements contain precise content (2 elements, one
> named 'info-a', one named 'info-b').

Unfortunately this is not possible in W3C XML Schema. Atleast Schematron [1]
will support these kinds of constraints and there might be other schema
dialects that can do this as well.

Cheers,
/Eddie

[1] http://www.ascc.net/xml/resource/schematron/
Received on Monday, 27 August 2001 20:42:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:23 GMT