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

Identifying the subcommunity which generated an instance document?

  • From: "Costello, Roger L." <costello@m...>
  • To: <xml-dev@l...>
  • Date: Fri, 25 Jul 2008 11:37:23 -0400

Identifying the subcommunity which generated an instance document?

Hi Folks,

Last week we discussed approaches to creating a single XML vocabulary
that is used by diverse subcommunities[1].

The example we considered was a book community that is comprised of
three subcommunities:

- book sellers
- book distributors
- book printers


Consider this XML instance document:

<?xml version="1.0" encoding="UTF-8"?>
<Book xmlns="http://www.books.org">
    <Title>The Wisdom of Crowds</Title>
    <Author>James Surowiecki</Author>
    <Date>2005</Date>
    <ISBN>0-385-72170-6</ISBN>
    <Publisher>Anchor Books</Publisher>
</Book>

It is generated from someone in the book seller subcommunity.


Now consider this XML instance document:

<?xml version="1.0" encoding="UTF-8"?>
<Book xmlns="http://www.books.org">
    <Title>The Wisdom of Crowds</Title>
    <Author>James Surowiecki</Author>
    <Size>5" x 8"</Size>
    <Weight>15oz</Weight>
    <MailingCost>$3.90</MailingCost>
</Book>

It is generated from someone in the book distributor subcommunity.


Notice that there is no indication within the instance documents of the
subcommunity which generated it.


ASSERTION

Knowing which subcommunity generated an instance document is important
for knowing how to process the instance document.


APPROACHES FOR IDENTIFYING WHICH SUBCOMMUNITY GENERATED AN INSTANCE
DOCUMENT

1. Out-of-band: Provide the data about which subcommunity generated the
instance document out-of-band.

2. Embedded data: Provide the data about which subcommunity generated
the instance document within the instance document.  For example, here
I added a "role" attribute to provide the data:

<?xml version="1.0" encoding="UTF-8"?>
<Book xmlns="http://www.books.org"
      role="book seller">
    <Title>The Wisdom of Crowds</Title>
    <Author>James Surowiecki</Author>
    <Date>2005</Date>
    <ISBN>0-385-72170-6</ISBN>
    <Publisher>Anchor Books</Publisher>
</Book>

3. Processing Instruction: Provide the data about which subcommunity
generated the instance document using a processing instruction.  For
example, here I added a "subcommunity processing instruction" to
provide the data:

<?xml version="1.0" encoding="UTF-8"?>
<?subcommunity role="book seller"?>
<Book xmlns="http://www.books.org">
    <Title>The Wisdom of Crowds</Title>
    <Author>James Surowiecki</Author>
    <Date>2005</Date>
    <ISBN>0-385-72170-6</ISBN>
    <Publisher>Anchor Books</Publisher>
</Book>


QUESTIONS

Are there other approaches than the three listed above?

Which approach do you recommend?

/Roger

[1]
http://www.xfront.com/single-xml-vocabulary-customized-for-sub-communit
ies/


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