RE: [xdi] XDI Proposal

From
Loren West <>
Date
2004-11-11T01:05:35+00:00
ID
00b601c4c78a$2ffe5d70$6501a8c0@TABLETPC
Thread
RE: [xdi] XDI Proposal
Title: Message

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:] 
Sent: Wednesday, November 10, 2004 
4:44 PM
To: 
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>