Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - Re: How to get enumeration values in alphabetical order >Thread Next - How can I call mandatory part of XML..... RE: How to get enumeration values in alphabetical orderTo: <noah_mendelsohn@--.---.--->, "Michael Kay" <mike@--------.---> Date: 3/14/2007 12:44:00 AM Oh! That's an interesting piece of info.
Thanks a lot Noah and Mike for your responses.
Well What I was looking for is if I write a schema wherein while writing
The enumerations, the values are not in alphabetical order, I thought
they appear
As it is when I instantiate the schema Or it will come in sorted order ?
Thanks,
Swayam
________________________________
From: noah_mendelsohn@u... [mailto:noah_mendelsohn@u...]
Sent: Tuesday, March 13, 2007 7:19 PM
To: Swayam Vemuri -X (swvemuri - WIPRO at Cisco)
Cc: xmlschema-dev@w...; xmlschema-dev-request@w...
Subject: Re: How to get enumeration values in alphabetical order
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
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
