Search the web
Sign In
New User? Sign Up
rest-discuss · REST Discussion Mailing List
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Adding hyperlink to data.   Message List  
Reply | Forward Message #13104 of 14021 |
I'm curious as to others' experience in wrapping data with hyperlinks.

In my case, I am to write a gateway that provides access to documents
of a XML schema that does not have facility for linking. Here's an
example document:

<shipping_manifest id="9883">
<destination>
<customer id="82"><name>a name</name><address>an
address</address></customer>
</destination>
<shipped_items>
<item id="102"><description>FlashLight FL-100</description>
<item id="382"><description>Lantern LA-221</description>
</shipped_items>
</shipping_manifest>

I do not want and am not allowed to change the schema because it may
break existing clients.

So I decided to create a new schema that wraps around the existing
one. It will allow links to be specified for any element in the
wrapped document. Example below.

How would you approach this problem?


YS


<hyperlinked_document>
<wrapped_document>
<shipping_manifest id="9883">
<destination>
<customer id="82"><name>a name</name><address>an
address</address></customer>
</destination>
<shipped_items>
<item id="102"><description>FlashLight FL-100</description>
<item id="382"><description>Lantern LA-221</description>
</shipped_items>
</shipping_manifest>
</wrapped_document>
<links xmlns:xlink="http://www.w3.org/1999/xlink">
<link
xpath="/hyperlinked_document/wrapped_document/shipping_manifest[@id='9893']"
xlink:title="Current Document"
xlink:type="simple"
xlink:role="http://gateway/linkprops/self"
xlink:href="http://gateway/wrapped/shipping_manifest/9883"/>
<link
xpath="/hyperlinked_document/wrapped_document/shipping_manifest[@id='9893']"
xlink:title="Shipping Manifest #9893"
xlink:type="simple"
xlink:role="http://gateway/linkprops/shipping_manifest"
xlink:href="http://gateway/wrapped/shipping_manifest/9883"/>
<link
xpath="/hyperlinked_document/wrapped_document/shipping_manifest[@id='9893']/dest\
ination/customer[@id='82']"
xlink:title="customer #82"
xlink:type="simple"
xlink:role="http://gateway/linkprops/customer"
xlink:href="http://gateway/wrapped/customer/82"/>
<link
xpath="/hyperlinked_document/wrapped_document/shipping_manifest[@id='9893']/ship\
ped_items/item[@id='102']"
xlink:title="item #102"
xlink:type="simple"
xlink:role="http://gateway/linkprops/item"
xlink:href="http://gateway/wrapped/item/102"/>
<link
xpath="/hyperlinked_document/wrapped_document/shipping_manifest[@id='9893']/ship\
ped_items/item[@id='382']"
xlink:title="item #382"
xlink:type="simple"
xlink:role="http://gateway/linkprops/item"
xlink:href="http://gateway/wrapped/item/382"/>
</links>
</hyperlinked_document>



Tue Jul 7, 2009 9:31 pm

gnome_g
Offline Offline
Send Email Send Email

Forward
Message #13104 of 14021 |
Expand Messages Author Sort by Date

I'm curious as to others' experience in wrapping data with hyperlinks. In my case, I am to write a gateway that provides access to documents of a XML schema...
Yohanes Santoso
gnome_g
Offline Send Email
Jul 7, 2009
9:36 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help