[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
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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|