W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2000

Is <any> really enough for <any><body>?

From: Aleksi Niemelš <aleksi.niemela@cinnober.com>
Date: Mon, 10 Jan 2000 18:20:21 +0100
Message-ID: <E536C8EE2A1FD31195370008C79FFA1F09B32C@world.cinnober.com>
To: "'XML List'" <xml-dev@ic.ac.uk>, "'xml-schema-comments'" <www-xml-schema-comments@w3c.org>
I'm can see  need for more powerful <any> 
My problem is probably repeated few times on xml-dev or 
http://lists.w3.org/Archives/Public/www-xml-schema-comments/, and 
since I don't know where to discuss about schemas, I'd like to hear 
about better place for this discussion.

<discussion level='beginner'>
Don't kill me. I started with schemas on 
Saturday and I bumped into problem with my first exercise schema (so I
there have to be real need for this, not just something from my 

How to express some constraints on <any> element? As I see it, 
specification doesn't provide any ways for this. (Correct me, 

What is the right way to express such simple thing as "any element 
with child X". 

I'd like to reform rule 1 at 3.5 Wildcards (and rest accordingly):
o Any well-formed XML element item with specified type constraint:
  any tag, any namespace, any attributes, any content, as long 
  as it's well-formed and satisfy specified schema's type constraint.

I can come up with different ways to express same thing:
<any type='Type'/>
<element type='Type'/>
<element name='' type='Type'/>

But since regular expressions are now introduced, I'd love to use 

<element name='*' type='Type'/>
<element name='*' ref="VaryingName1"/>

Allowing references in the consturct is very important!

Maybe star wildcard is just enough, but I can make some real use for 
real patterns too:

<element name='expect_varying_named_binary_operators'>
    <element name='(and|or|own.+BinaryOperator)' 

<type name='BinaryOperator'>
    <element name='*' type='Operand'/>
    <element name='*' type='Operand'/>


In the end I thought a little bit about usability and thought it 
might be better idea to set varying names to different attribute than 
name on <element>-element.

<element match='*'> like in xsl might be best solution.

Any ideas, comments?

     - department of uncensored ideas
Received on Monday, 10 January 2000 12:20:58 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:49:51 UTC