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

<warning>
<topic>
I'm can see  need for more powerful <any> 
(http://www.w3.org/TR/xmlschema-1/#declare-openness).
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.
</topic>

<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
concluded 
there have to be real need for this, not just something from my 
imagination). 
</discussion>
</warning>

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

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 
them:

<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='BinaryOperator'/>
</element>

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

========
document_written_by_some_completely_different_user.xml:
========
<expect_varying_named_binary_operators>
    <own_ultimately_weird_BinaryOperator>
	    <op1/>
	    <op2/>
    </own_ultimately_weird_BinaryOperator>
</expect_varying_named_binary_operators>

----------------
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