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

Value spaces are cool! I wish for a cross-product (aggregate)value spac

  • From: "Costello, Roger L." <costello@mitre.org>
  • To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
  • Date: Thu, 24 Feb 2011 09:22:24 -0500

Value spaces are cool!  I wish for a cross-product (aggregate)value spac
Hi Folks,

Recently I have become excited about value spaces. 

XML Schema enables the creation of value spaces. For example, if I define the "family name" value space as:

---------------------------------------------------------------------------
length: 1 - 100 characters 
consists of the characters: a-z, A-Z, space, hyphen, period, and apostrophe
---------------------------------------------------------------------------

Then I can implement that value space using this simpleType:

    <xs:simpleType name="Family-name">
        <xs:restriction base="xs:string">
            <xs:minLength value="1" />
            <xs:maxLength value="100" />
            <xs:pattern value="[a-zA-Z' \.-]+" />
        </xs:restriction>
    </xs:simpleType>

Having defined the value space, I can then associate any number of labels to it. E.g.,

    <xs:element name="Family-name" type="Family-name" />

    <xs:element name="Surname" type="Family-name" />

    <xs:element name="Last-name" type="Family-name" />

That's cool!


Suppose I also define and implement value spaces for "middle initial" and "given name". 

Let's denote the three value spaces by F, M, G. (F = Family, M = Middle, G = Given)


It would be very cool to create an aggregate "person name" value space. The person name value space is the cross product of F, M, and G:

-----------------------
Person name = F x M x G
-----------------------

Here is an example of a value in the Person-name value space:

("Roger", "L", "Costello")

Then I would like to give a label (many different labels, in fact) to the aggregate value space, and give a label to each component value space.

I don't think it is possible to define aggregate value spaces with XML Schemas. (I hope you will prove me wrong) 

Is there another option (beside XML Schema) for expressing value spaces and aggregate value spaces? Can aggregate value spaces be expressed using Relax NG?

/Roger


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.