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

How to create an XML language that is the intersection of two XMLlanguag

  • From: "Costello, Roger L." <costello@mitre.org>
  • To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
  • Date: Mon, 30 Dec 2013 22:00:43 +0000

How to create an XML language that is the intersection of two XMLlanguag
Hi Folks,

Suppose person #1 creates an XML language for Books:

    <xs:element name="Books">
        ...
    </xs:element>

Person #2 creates an XML language for Magazines: 
    
    <xs:element name="Magazines">
        ...
    </xs:element>

Now, person #3 can reuse them to create an XML language that is the union of Books and Magazines: 
    
    <xs:element name="BookStore">
        <xs:complexType>
            <xs:choice>
                <xs:element ref="Books" />
                <xs:element ref="Magazines" />
            </xs:choice>
        </xs:complexType>
    </xs:element>

Neat! We can create an XML language that is the union of two XML languages, without any changes to them.

What about intersection, can we create an XML language that is the intersection of two XML languages?

Suppose person #4 creates an XML language consisting of a mixture of an arbitrary number of <A> and <B> elements: 
    
    <xs:group name="As-and-Bs">
        <xs:sequence maxOccurs="unbounded">
            <xs:element name="A" minOccurs="0"> ... </xs:element>
            <xs:element name="B" minOccurs="0"> ... </xs:element>
        </xs:sequence>
    </xs:group>

Person #5 creates an XML language consisting of a mixture of an arbitrary number of <B> and <C> elements: 
    
    <xs:group name="Bs-and-Cs">
        <xs:sequence maxOccurs="unbounded">
            <xs:element name="B" minOccurs="0"> ... </xs:element>
            <xs:element name="C" minOccurs="0"> ... </xs:element>
        </xs:sequence>
    </xs:group>

Now, person #6 wants to reuse them to create an XML language that is the intersection of the two languages. 

How would person #6 create this intersection language (without any change to the As-and-Bs language or the Bs-and-Cs language)?

/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.