XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Value spaces are cool! I wish for a cross-product (aggregate)value space

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]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS