Altova Mailing List Archives


Re: [xml-dev] Identifying the subcommunity which generated an instancedocument?

From: "Simon St.Laurent" <simonstl@--------.--->
To: xml-dev@-----.---.---
Date: 7/25/2008 4:05:00 PM
I'm sorry - but what's the actual problem here?

I agree that context is good to have, but I'm not sure that these 
examples even really demand it, so long as you write vaguely sane 
processing code.

I recognize that there's lot of incredibly brittle code out there which 
can't cope with the difference between the instances, but that seems to 
me like a vastly bigger problem than something to address by adding a PI 
about subcommunities.

Unless maybe it's a very subtle way of breaking that problem slowly to 
developers.

Strange.

Thanks,
Simon St.Laurent
Mostly retired XML codger
http://simonstl.com/

Costello, Roger L. wrote:
> 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/
> 
> _______________________________________________________________________
> 
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
> 
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@l...
> subscribe: xml-dev-subscribe@l...
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
> 
> 
> !DSPAM:4889fb2797821969219952!
>

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.