Home > SOA Tips > XML Developer > Using RELAX NG For data integration
SOA Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

XML DEVELOPER

Using RELAX NG For data integration


Ed Tittel
10.10.2007
Rating: -4.50- (out of 5)


Enterprise IT tips and expert advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


In a tip I wrote almost one year ago entitled Relax NG, the XML Schema Alternative, I explained why companies or individuals might want to mess with this powerful schema language, even in the face of a set of formal W3C XML Schema recommendations. These points are as true today as they were when I first wrote them:

  • The language is designed to be simple and easy to learn, which many would observe is not the case for XML Schema.
  • The language includes both an XML syntax and a compact non-XML syntax. It also supports XML namespaces and does not change the information set of any document it touches.
  • It works with XML Schema Datatypes (just as does XML Schema itself) and can draw on the expressive power of that markup language.

To amplify the final bullet item, I'd now like to add that support for Datatypes enables definition and use of plug-in datatype libraries, functionality that is extremely helpful when encountering and accommodating new sources for and types of data for description, definition and processing.

To this litany of reasons for considering RELAX NG, I'd like to add the following additional observations, which together form the central thesis for this tip:

  • RELAX NG is backward compatible all the way to the original XML 1.0 DTD (XML Schema is not). Thus RELAX NG is also quite adept at handling XML documents of all kinds, including DTD and Schema based representations.
  • RELAX NG is unusually adept for use when generating schemas from different data sources, partly because it's more approachable and transparent than XML Schema and because its grammar allows sub-elements to occur in any order within complex types (and thus avoids the need to groom data sets for ordering).
  • RELAX NG works with a variety of development toolsets, including the JAXB libraries in the Java Web Services Developer Pack, oXygen, Jing, Trang and many more. Check out the Software resources at the RELAX NG home page for more information.
  • At its core, a RELAX NG schema specifies a pattern for structure and content in an XML document. Thus a RELAX NG schema identifies a class of XML documents consisting of all XML document instances that match its pattern. This makes it unusually helpful at working with data outputs in XML formats from databases, document management systems and applications (including Office 2007, which now uses XML-based formats as the default file type for all constituent apps).

Ultimately, if you can get at the structure of an XML document programmatically, you can use that access to also construct a RELAX NG schema to represent its pattern. With this capability, you can then manipulate any and all other documents that also match that pattern. Given its programmer-friendly construction and easy-to-understand grammar and syntax, this makes it a powerful addition to the arsenals of those who must take data in and out of XML forms.

About the author

Ed Tittel is a full-time writer and trainer whose interests include XML and development topics, along with IT Certification and information security topics. Among his many XML projects are XML For Dummies, 4th edition, (Wylie, 2005) and the Shaum's Easy Outline of XML (McGraw-Hill, 2004). E-mail Ed at etittel@techtarget.com with comments, questions or suggested topics or tools for review.


Rate this Tip
To rate tips, you must be a member of SearchSOA.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
XML and XML schema
Making sense of data services mashups
XML turns 10
SOA helps save 100-year-old business
Oracle maps heterogeneous data services strategy for SOA
Handling XML with Ajax
Efficient XML draft published
Intel boosts XML for SOA
Paul Fremantle on coding SOA and data integration
WSDL 2.0, new messaging for Web services
XML data integration for SOA goes open source

XML Developer
WSDL 2.0, new messaging for Web services
Efficient XML Interchange tackles data verbosity
XML to DDL imports, synchronizes database schemata
The basics of MathML 3.0
Migrating to XSLT 2.0
What's up with XML 2.0?
Say hello to XPath 2.0
Podcasting software covers many bases
The XML behind podcasting
Web syndication tools for every occasion

Data services for SOA
Java One: Mule architect looks to bring REST to SOA
JavaOne: JBoss on SOA middleware, Java EE and data services
Open source software requires governance, Burton warns
Burton recommends practical Web 2.0
Adopt Google Apps? It depends, Burton analyst says
Making sense of data services mashups
Focus SOA on business value – IBM's LeBlanc
Transportation giant in SOA for the long haul
Online real estate SOA moves into BPEL
Open source vendors focus on SOA coders

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
class diagram  (SearchSOA.com)
Fast Infoset (FI)  (SearchSOA.com)
GeoRSS  (SearchSOA.com)
Keyhole Markup Language  (SearchSOA.com)
RELAX NG  (SearchSOA.com)
state diagram  (SearchSOA.com)
Universal Business Language  (SearchSOA.com)
Vector Markup Language  (SearchSOA.com)
XML pipeline  (SearchSOA.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2001 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts