Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: How to get enumeration values in alphabetical order

From: noah_mendelsohn@--.---.---
To: "Swayam Vemuri -X \(swvemuri - WIPRO at Cisco\)" <swvemuri@-----.--->
Date: 3/13/2007 5:49:00 AM
I'm not sure what you mean by "getting" enumeration values.  If you want 
to do something like extract them from the schema itself, well schema 
documents are themselves XML documents, so you could run a stylesheet over 
your schema document.  Are you looking for something like:

        <element name="container">
         <sequence>
                <element ref="e" type="someEnumeration" maxOccurs="*"/>
         </sequence>
        </element
 

and to insist that the values of e occur alphabetically.  The answer in 
Schema 1.0 is no, can't do it.  In schema 1.1, the new "Assertions" 
facility would let you put an XPath assertion on the container.  If your 
processor supported a sufficiently broad subset of the XPath language, and 
if your definition of "alphatbetical order" involves a string comparision 
that XPath can easily do, then yes, I think you could enforce that in XML 
Schema 1.1.

Noah

[1] http://www.w3.org/TR/xmlschema11-1/#cAssertions

--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------








"Swayam Vemuri -X \(swvemuri - WIPRO at Cisco\)" <swvemuri@c...>
Sent by: xmlschema-dev-request@w...
03/13/2007 09:26 AM
 
        To:     <xmlschema-dev@w...>
        cc:     (bcc: Noah Mendelsohn/Cambridge/IBM)
        Subject:        How to get enumeration values in alphabetical 
order


Hi,
 
How to get enumeration values in alphabetical order.
Is there any way, pl let me know
 
Thanks
Swayam


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent