[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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

  • From: Aleksi Niemelä <aleksi.niemela@c...>
  • To: 'XML List' <xml-dev@i...>, 'xml-schema-comments' <www-xml-schema-comments@w...>
  • Date: Tue, 11 Jan 2000 16:57:01 +0100

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

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ or CD-ROM/ISBN 981-02-3594-1
Please note: New list subscriptions now closed in preparation for transfer to OASIS.


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.

Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.