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
What's the future of XML?
SOA pattern of the week (#7): policy centralization
Try XML-based Extensible Business Reporting Language (XBRL) for accounting reports
What's new at the W3C
Ganymede: Modeling tools target SOA, UML
Data services mashups emerge for SOA
Making sense of data services mashups
XML turns 10
SOA helps save 100-year-old business
Oracle maps heterogeneous data services strategy for SOA

XML Developer
Use the soapUI software tool to tame WSDL
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

Data services for SOA
SPSS and PMLL
Canonical Schema establishes interoperability: SOA Pattern (Week 6)
Medical imaging group build HL7 messaging hub with InterSystems Ensemble
Using atomicity to gain SOA granularity
Use JavaScript with the iPhone to create smart phone apps
Componentized XML Query tool takes a step forward
Podcast: SearchSOA tips on software architect skills
Services reuse drives ROI for SOA, survey finds
Tibco releases Complex Event Processing (CEP) suite with new rules, query interfaces
MapReduce moves from secret Google goo to enterprise architecture - Part 1

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 infoset  (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.



SOA Trends and Strategy - SOA Education, SOA Development, SOA Implementations
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




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