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

 


Help: OASIS Mailing Lists Help | MarkMail Help

xdi message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [xdi] XDI Proposal


Title: Message
My F2F example converted slightly to today's Dave's proposal.
 
Nat


From: Loren West [mailto:loren.west@epok.net]
Sent: Thursday, November 11, 2004 10:03 AM
To: 'Dave McAlpin'; xdi@lists.oasis-open.org
Subject: RE: [xdi] XDI Proposal

I agree with all the rationale behind the dataweb (per Drummond's earlier mail), and believe that this example is successful in fulfilling that vision.
 
As passionate as I am about the dataweb vision, I am also passionate that people MUST NOT change their existing XML in order to achieve that vision.  They MAY want to change it, but they shouldn't be required to change it.
 
This example appears to fulfill the requirements of the Dataweb AND not require that folks change their XML.
 
I've seen how hard people fight against something that doesn't look familiar, and something that makes them change their data structures.
 
If we can fulfill the goals of the dataweb in a familiar, un-obtrusive manner, why choose any other way? 
 
=Loren
 
-----Original Message-----
From: Dave McAlpin [mailto:Dave.McAlpin@epok.net]
Sent: Wednesday, November 10, 2004 4:44 PM
To: xdi@lists.oasis-open.org
Subject: [xdi] XDI Proposal

Examples for discussion on today's call
 
The following is example from the XML Schema Primer.
 
<purchaseOrder orderDate="1999-10-20" ID="_1234">
  <shipTo country="US">
    <name>Alice Smith</name>
    <street>123 Maple Street</street>
    <city>Mill Valley</city>
    <state>CA</state>
    <zip>90952</zip>
  </shipTo>
  <billTo country="US">
    <name>Robert Smith</name>
    <street>8 Oak Avenue</street>
    <city>Old Town</city>
    <state>PA</state>
    <zip>95819</zip>
  </billTo>
  <comment>Hurry, my lawn is going wild<!/comment>
  <items>
    <item partNum="872-AA">
      <productName>Lawnmower</productName>
      <quantity>1</quantity>
      <USPrice>148.95</USPrice>
      <comment>Confirm this is electric</comment>
    </item>
    <item partNum="926-AA">
      <productName>Baby Monitor</productName>
      <quantity>1</quantity>
      <USPrice>39.98</USPrice>
      <shipDate>1999-05-21</shipDate>
    </item>
  </items>
</purchaseOrder>
 
The same XML as an XDI Resource Bundle
 
<xdi:Resource>
  <xdi:Header>
  .
  .
  .
  </xdi:Header>
  <xdi:Data>
    <purchaseOrder orderDate="1999-10-20" ID="_1234">
      <shipTo country="US">
        <name>Alice Smith</name>
        <street>123 Maple Street</street>
        <city>Mill Valley</city>
        <state>CA</state>
        <zip>90952</zip>
      </shipTo>
      <billTo country="US">
        <name>Robert Smith</name>
        <street>8 Oak Avenue</street>
        <city>Old Town</city>
        <state>PA</state>
        <zip>95819</zip>
      </billTo>
      <comment>Hurry, my lawn is going wild<!/comment>
      <items>
        <item partNum="872-AA">
          <productName>Lawnmower</productName>
          <quantity>1</quantity>
          <USPrice>148.95</USPrice>
          <comment>Confirm this is electric</comment>
        </item>
        <item partNum="926-AA">
          <productName>Baby Monitor</productName>
          <quantity>1</quantity>
          <USPrice>39.98</USPrice>
          <shipDate>1999-05-21</shipDate>
        </item>
      </items>
    </purchaseOrder>
  </xdi:Data>
</xdi:Resource>

Same data with meta data to add typing and addressing info to some of the data nodes
 
<xdi:Resource>
  <xdi:Header>
  <xdi:Meta URI="#_1234" XPath="/purchaseOrder">
      <xdi:Address>xri://@w3c/xmlschema/po.xml</xdi:Address>
      <xdi:type>@dictionary/(+purchaseOrder)</xdi:Type>
      <xdi:Meta XPath="/purchaseOrder/shipTo">
        <xdi:Address>!2</xdi:Address>
        <xdi:Type>@dictionary/(+address)</xdi:Type>
        <xdi:Type>@dictionary/(+shippingAddress)</xdi:Type>
      <xdi:Meta>
      <xdi:Meta XPath="/purchaseOrder/billTo">
        <xdi:Address>!3</xdi:Address>
        <xdi:Type>@dictionary/(+address)</xdi:Type>
        <xdi:Type>@dictionary/(+billingAddress)</xdi:Type>
      </xdi:Meta>
      <xdi:Meta XPath="/purchaseOrder/comment">
        <xdi:Address>!4</xdi:Address>
      </xdi:Meta>
      <xdi:Meta XPath="/purchaseOrder/items">
        <xdi:Address>!5</xdi:Address>
        <xdi:Meta XPath="/purchaseOrder/items/item[1]">
          <xdi:Address>!1</xdi:Address>
        </xdi:Meta>
        <xdi:Meta XPath="/purchaseOrder/items/item[2]">
          <xdi:Address>!2</xdi:Address>
        </xdi:Meta>
      </xdi:Meta>
    </xdi:Meta>
  </xdi:Header>
  <xdi:Data>
    <purchaseOrder orderDate="1999-10-20" ID="_1234">
      <shipTo country="US">
        <name>Alice Smith</name>
        <street>123 Maple Street</street>
        <city>Mill Valley</city>
        <state>CA</state>
        <zip>90952</zip>
      </shipTo>
      <billTo country="US">
        <name>Robert Smith</name>
        <street>8 Oak Avenue</street>
        <city>Old Town</city>
        <state>PA</state>
        <zip>95819</zip>
      </billTo>
      <comment>Hurry, my lawn is going wild<!/comment>
      <items>
        <item partNum="872-AA">
          <productName>Lawnmower</productName>
          <quantity>1</quantity>
          <USPrice>148.95</USPrice>
          <comment>Confirm this is electric</comment>
        </item>
        <item partNum="926-AA">
          <productName>Baby Monitor</productName>
          <quantity>1</quantity>
          <USPrice>39.98</USPrice>
          <shipDate>1999-05-21</shipDate>
        </item>
      </items>
    </purchaseOrder>
  </xdi:Data>
</xdi:Resource>

What this says, in effect is, the we wish the XML in the data section looked like this
 
<purchaseOrder orderDate="1999-10-20" ID="_1234">
  <shipTo country="US">
    <name>Alice Smith</name>
    <street>123 Maple Street</street>
    <city>Mill Valley</city>
    <state>CA</state>
    <zip>90952</zip>
    <xdi:Address>!2</xdi:Address>
    <xdi:Type>@dictionary/(+address)</xdi:Type>
    <xdi:Type>@dictionary/(+shippingAddress)</xdi:Type>
  </shipTo>
  <billTo country="US">
    <name>Robert Smith</name>
    <street>8 Oak Avenue</street>
    <city>Old Town</city>
    <state>PA</state>
    <zip>95819</zip>
    <xdi:Address>!3</xdi:Address>
    <xdi:Type>@dictionary/(+address)</xdi:Type>
    <xdi:Type>@dictionary/(+billingAddress)</xdi:Type>
  </billTo>
  <comment>
    Hurry, my lawn is going wild
    <xdi:Address>!4</xdi:Address
  </comment>>
  <items>
    <item partNum="872-AA">
      <productName>Lawnmower</productName>
      <quantity>1</quantity>
      <USPrice>148.95</USPrice>
      <comment>Confirm this is electric</comment>
      <xdi:Address>!1</xdi:Address>
    </item>
    <item partNum="926-AA">
      <productName>Baby Monitor</productName>
      <quantity>1</quantity>
      <USPrice>39.98</USPrice>
      <shipDate>1999-05-21</shipDate>
      <xdi:Address>!2</xdi:Address>
    </item>
    <xdi:Address>!5</xdi:Address>
  </items>
  <xdi:Address>xri://@w3c/xmlschema/po.xml</xdi:Address>
  <xdi:type>@dictionary/(+purchaseOrder)</xdi:Type>
</purchaseOrder>

 
<resource>
	<header >
	    <meta URI="#_1234" XPath="/businessCard">
		<type>+businessCard</type>
		<xri>!!154323:2343:243:44:235:3</xri>
		<xri>@NRI/employee/m2630/(+businessCard)</xri>
		<xri>@NRI/ISD/IFSPD/ASG/(+GM)/(+businessCard)</xri>
		<xri>@NRI/sakimura/(+businessCard)</xri>
		<version>$v.d.2004-10-25</version>
		<usage>@XDIORG/contracts/businesscardusage</usage>
	    </meta>
	</header>
	<data>
	    <businessCard ID="_1234">
		<ref type="@dictionary/(+name)">!!1001:2435:1435234</ref>
		<ref type="@dictionary/(+company.name)">!!1001:245234:1</ref>
		<ref type="@dictionary/(+streetAddress)">!!40392:4323:4344</ref>
		<ref type="@dictionary/(+phone)">!!2324:81:3:5201:0451</ref>
		<ref type="@dictionary/(+fax)">!!2324:81:3:5201:0461</ref>
		<ref type="@dictionary/(+company.web.address)">!!254:334:2223:5434</ref>
		<ref type="@dictionary/(+email)">!!254:334:2224:342</ref>
		<ref type="@dictionary/(+i-name)">!!23423:23:4</ref>
	    </businessCard>
	</data>
</resource>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]