• Home

Logo

Navigation
  • Home
  • Articles
    • Content Writing
    • Design
    • General
    • Internet Marketing
    • Social Media
    • Tools and Tips
    • Usability
    • Web Hosting Articles
  • Tutorials
    • AJAX Tutorials
    • ASP Tutorials
    • C# Tutorials
    • CGI and Perl Tutorials
    • CSS Tutorials
    • Flash Tutorials
    • HTML Tutorials
    • Illustrator Tutorials
    • Java Tutorials
    • JavaScript Tutorials
    • Linux Tutorials
    • Miscellaneous Tutorials
    • MySQL Tutorials
    • Photoshop Tutorials
    • PHP Tutorials
    • Python Tutorials
    • Wireless Tutorials
    • WordPress Tutorials
    • XML Tutorials
  • Scripts
    • AJAX Scripts
    • ASP Scripts
    • ASP.NET Scripts
    • CGI & Perl Scripts
    • Flash Scripts
    • Java Scripts
    • JavaScript Scripts
    • PHP Scripts
    • Python Scripts
    • Remotely Hosted
    • Tools and Utilities
    • XML Scripts
  • Answers
  • Online Services
  • Tools

Tip: Use Data Dictionary Links for XML and Web Services Schemata

By Uche Ogbuji | on Apr 9, 2005 | 0 Comment
XML Tutorials
  • Tweet
  • Share
  • Tweet
  • Share

Wrap-up

By adding semantic links, you have taken simple terms used for XML and Web services schemata (service, synopsis, duration), and placed them in a specific context. This makes it much easier to automatically infer their meaning when deployed within systems, and increases the information value of the corresponding XML documents. As an example, using some such semantic link, you can easily determine that the synopsis element has the same meaning as an element named description in another vocabulary. Professional DBAs emphasize the importance of data dictionaries to frame the terms they use in their schemata. XML developers should be no less diligent.

On a more general note, the value of supporting semantic links is also good reason to be sure that materials in schemata, dictionaries, ontologies, and such can be referenced using simple URLs. If you are working in an initiative for semantic transparency, please be sure that one of your goals is easy access through simple linking.

What exactly is a service anyway?

Imagine that you are a developer working on information systems to manage your organization’s Web services. Your first task is to put together some information for detailing the proposed Web services in the context of the budget requests that you must make to be sure the products get off the ground. You’ll use XML so that you can easily generate reports and views on the information, and so that you can mix together information from several domains effortlessly. Listing 1 is a snippet from a RELAX NG schema that you might construct for this purpose.

Listing 1. Portion of RELAX NG schema for budget information for Web services development



<element name='service'>
<owl:sameClassAs
resource="http://www.daml.org/services/owl-s/1.0/Service.owl#Service"/>
<attribute name='id'/>
<element name='synopsis'>
<owl:samePropertyAs
resource='http://www.w3.org/2000/01/rdf-schema#comment'/>
</element>
<element name='budget-request'>
<attribute name='currency'/>
</element>
<element name='justification'/>
</element>

This snippet does not include the namespace declarations, but the owl prefix is bound to the namespace for OWL Web Ontology Language, http://www.w3.org/2002/07/owl#. OWL is the W3C standard for ontologies, which are documents that provide enough information to share the meanings of a group of concepts. As such, OWL is an excellent way to express semantic links in schemata. Each OWL element is an annotation that expresses a link from the containing RELAX NG definition.

Semantic links in WS descriptions

Because you’ve taken so much care in organizing and presenting your Web services budget requests, you’ve won approval, and now it’s time for implementation. One of the newly-funded services is a calendar and appointment service, and you now need to write the WSDL for it. Of course, you want to be sure that the schema snippets in the WSDL contain semantic links, but you also want to try to sprinkle semantic links into other parts of the description as well. Listing 2 is such a snippet of WSDL, conforming to WSDL 1.1.

Listing 2. Portion of WSDL that includes a semantic link for a message part



<wsdl:message name="get-upcoming-appointments">
<wsdl:part name="requested-duration" element="schema:duration">
<wsdl:documentation>
<owl:sameClassAs
resource="http://www.w3.org/2002/12/cal/ical#duration"/>
</wsdl:documentation>
</wsdl:part>
</wsdl:message>

In defining a message that requests the upcoming appointments from now through a given duration, you establish precision about what you mean by duration when defining that parameter in the request. You do this by referencing the W3C’s suggested expression of the iCalendar standard (RFC 2445) as a formal ontology. You place this link in a wsdl:documentation element, which is not ideal since this element is usually reserved for human-readable documentation. You want to do this because of constraints in the WSDL specification, which like WXS restricts the places where foreign elements (called “extensibility element”) can be placed. The model for extensibility is still being developed for WSDL 2.0. I hope the working group decides to loosen unnecessary restrictions before they’re done (never mind for now the fact that it seems the idea of message part is being overhauled for 2.0).

Tip: Use Data Dictionary Links for XML and Web Services Schemata

Leaving anchors for the meanings in XML nodes

When designing XML and Web services schemata you will often (and ideally) reuse data elements defined in pre-existing standards. When you do, it is extremely useful to include links to such standards, providing precise data dictionary references. In so doing, you make processing and maintenance easier to automate. This tip illustrates this practice.

In my Thinking XML column, I frequently focus on how various industries are working toward semantic transparency , which is the shared meaning of at least the framework of what is communicated in an XML document. Either the industries do so by creating complete document formats along with the semantics of all the elements, attributes, and content, or they define terms and concepts discretely and individually, independently of the documents in which they would appear. I call these approaches top-down and bottom-up , respectively, and very active communities provide useful material on each.

If you develop XML schemas for your own use or for public use, the usual sage advice is to be sure that you aren’t carelessly duplicating existing work. But even if you’re truly in new territory, or have good reason not to simply reuse existing languages, try as much as possible to lean on existing initiatives towards semantic transparency. This is best whether you are developing an XML format for private usage, or as a shared or public resource. You can borrow naming conventions and perhaps even schema snippets from existing vocabularies, but a less common technique for building on the work of others is to incorporate what I call semantic links into your own schemata — special links to existing standards that define the syntactic constructs you define in your schema. This provides for a particularly rich form of data dictionaries for XML schemata. In this tip, I show how to work such links into your schemata.

Resources

• Learn about OWL Web Ontology Language at the Web Ontology Working Group home page. OWL is founded upon RDF Schema , which can be used as a general vocabulary for descriptions of resources.

• If you use Web services, check out OWL-S , which is a very rigorous ontology of Web services and service-oriented architecture (SOA).

• Check out RDF Calendar , the W3C’s extensive effort to create an ontology and framework for schedule and calendar information based on iCalendar (RFC 2445) .

• See Uche Ogbuji’s Thinking XML columns, which discuss issues of semantic transparency and knowledge management using XML. In particular, see ” Semantic anchors for XML ” ( developerWorks , October 2003) in which he explores initiatives that provide suitable anchors for semantic links.

• Find a broad array of articles, columns, tutorials, and tips on these two popular technologies at the developerWorks XML and SOA and Web services zones. While you’re at it, subscribe to the developerWorks Web services/XML Tips newsletter .

• Browse a wide range of XML-related titles at the developerWorks Developer Bookstore .

• Learn how you can become an IBM Certified Developer in XML and related technologies .

Share this story:
  • tweet

Author Description

Uche Ogbuji is a consultant and co-founder of Fourthought Inc., a software vendor and consultancy specializing in XML solutions for enterprise knowledge management. Fourthought develops 4Suite, an open source platform for XML, RDF, and knowledge-management applications. Mr. Ogbuji is also a lead developer of the Versa RDF query language. He is a computer engineer and writer born in Nigeria, living and working in Boulder, Colorado, USA. You can contact Mr. Ogbuji at uche.ogbuji@fourthought.com.

No Responses to “Tip: Use Data Dictionary Links for XML and Web Services Schemata”

You must be logged in to post a comment.

Connect With Us

RSSSubscribe 0Followers 492Likes
  • Popular
  • Recent
  • Comments
  • Creating Energy Spheres in Photoshop

    Apr 15, 2008 - 96 Comments
  • Easy Screen Scraping in PHP with the Simple HTML DOM Library

    Aug 6, 2008 - 20 Comments
  • Calculating date difference more precisely in PHP

    Mar 7, 2008 - 13 Comments
  • When Does Hosting Your Website in the Cloud Make Sense?

    Oct 8, 2010 - 2 Comments
  • Fun with the Microsoft Managed Extensibility Framework Part 2

    Oct 6, 2010 - 0 Comment
  • Fun with the Microsoft Managed Extensibility Framework Part 1

    Sep 22, 2010 - 0 Comment
  • Website Management on the go with the iPad

    I appreciated your post, but I was looking for something I didn't...
    November 24, 2012 - drmoderator
  • Creating Energy Spheres in Photoshop

    I'm a little stuck down here especially at the step of creating the...
    November 23, 2012 - sarah
  • Running background processes in PHP

    Can you give an example? As see it, you can use this only when you...
    November 16, 2012 - Shaked Klein Orbach
Developer Resources
  • Tutorial Directory
  • Learn HTML
  • Learn PHP
  • Learn CSS
  • Learn AJAX
  • Learn JavaScript
  • Learn Pear
  • White Papers
  • Resources
    • NetVisits Web Directory
    • Realtor Pixels
    • Answers On The Run
    • Ask A Geek
  • Recent Posts

    • When Does Hosting Your Website in the Cloud Make Sense?
    • Fun with the Microsoft Managed Extensibility Framework Part 2
    • Fun with the Microsoft Managed Extensibility Framework Part 1
    • Website Management on the go with the iPad
    • Code Contracts in C# 4.0 – Part 1

    Calendar

    May 2013
    M T W T F S S
    « Oct    
     12345
    6789101112
    13141516171819
    20212223242526
    2728293031  

    Recent Comments

    • drmoderator on Website Management on the go with the iPad
    • sarah on Creating Energy Spheres in Photoshop
    • Shaked Klein Orbach on Running background processes in PHP
    • Thomas Cuvillier on How To Upload Files Using PHP
    • rizal aditya on Extracting text from Word Documents via PHP and COM
    • Home
    © 2003 - 2013 DeveloperTutorials.com. All Rights Reserved. Privacy Policy.