W3C home > Mailing lists > Public > xmlschema-dev@w3.org > November 2002

Re: Element definition without a predefined element name?

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 09 Nov 2002 10:23:00 +0000
To: Rune Bjørnstad <r.p.bjornstad@student.utwente.nl>
Cc: <xmlschema-dev@w3.org>
Message-ID: <f5by98359ff.fsf@erasmus.inf.ed.ac.uk>

Rune Bjørnstad <r.p.bjornstad@student.utwente.nl> writes:

> I've been reading through the specs. And I can't seem to find the answer
> to my problem. I want to define a schema that validates an XML document
> containing the following construct:
>  
> <someelement attr1='value'>
>           <child1>
>                    <class>some.class.Test1</class>
>                    <process>process_description</process>
>           </child1>
>           <child2>
>                    <class>some.class.Test1</class>
>                    <process>process_description</process>
>           </child>
> </someelement>
>  
> Looks trivial, but here's the catch. I don't want to define the names
> child1, child2 etc. in the schema, but I need them to be of a certain
> complexType. In short: How do I define <someelement> to contain a
> sequence of children, with arbitrary names, but of a fixed complexType?

Not possible, yet, sorry.  We're looking at <xs:any type='...'/> for
Schema 1.1.

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2002, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
 [mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Saturday, 9 November 2002 05:23:02 GMT

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