OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Why doesn't XML have Bag?

[ Lists Home | Date Index | Thread Index ]
  • From: "Betty L. Harvey" <harvey@eccnet.eccnet.com>
  • To: "Roger L. Costello" <costello@mitre.org>
  • Date: Fri, 26 Mar 1999 08:26:24 -0500 (EST)


Roger:

	I am not sure what you mean by "Bags" but XML supports
any type of list.  It also supports content tables which are
pretty cool:

As an example:

<!ELEMENT list (item+)>
<!ELEMENT item (#PCDATA)>

<list>
        <item>Item1</item>
        <item>Item2</item>
</list>

Example Content Tagged Table

<!ELEMENT part-table (part+)
<!ELEMENT part       (partno, nomen, price,
                      quantity)>
<!ELEMENT (partno | nomen | price | quantity) (#PCDATA)>

<part-table>
	<part id='1'>
		<partno>1</partno>
		<nomen>My Part</nomen>
		<price>$1.00</price>
		<quantity>10</quantity>
	</part>
        <part id='2'>
                <partno>2</partno>
                <nomen>My Part 2</nomen>
                <price>$2.00</price>
                <quantity>20</quantity>
        </part>       
</part-table>

Depending on your application you can do some
pretty interesting things with the parts
list.  You can do the same thing with 
a list if required.

I am not sure if this is what you were looking
for.

Betty

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Betty Harvey                         | Phone: 301-540-8251 FAX: 4268
Electronic Commerce Connection, Inc. | 
13017 Wisteria Drive, P.O. Box 333   | 
Germantown, Md.  20874               |
harvey@eccnet.com                    | Washington,DC SGML/XML Users Grp
URL:  http://www.eccnet.com          | http://www.eccnet.com/sgmlug/
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/  



On Fri, 26 Mar 1999, Roger L. Costello wrote:

> Why doesn't XML support the notion of an unordered list of elements,
> i.e., a Bag?  Perhaps this is a limitation of DTD, not XML?  That is,
> DTDs do not support Bags, but XML has no such inherent limitation?  Does
> DCD support Bags?  /Roger
> 
> 
> xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
> Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
> To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
> (un)subscribe xml-dev
> To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
> subscribe xml-dev-digest
> List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
> 


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

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

Copyright 2001 XML.org. This site is hosted by OASIS