Wednesday, February 6, 2008

The future of XML

Very interesting article by Elliotte Rusty Harold to understand where today's standards come from and his perception of the future of XML. In his aticle he explains the background and future of XML/DOM/HTML/SGML etc.. Well worth the read.. interestingly he suspect Microsoft will lose its efforts to have OOXML declared an ISO standard in February. Great article looking back at the beginnings and how XML has evolved to what is has today. Makes you wonder how and why it has evolved to where it is today, and what possible outcomes are in the future.

I kinda agree with most of what he says, but I think he should have mentioned something about the SemanticWeb!

Friday, February 1, 2008

Everything you need to know about the Semantic Web

Steve Bratt recently gave an invited talk entitled "World Wide Web Consoritum: Semantic Web and Opportunities for the Oil and Gas Industry" at the "PCA Member Meeting" on Thursday, 31 January 2008, in Houston, Texas, USA. You can take a look at his presentation materials http://www.w3.org/People/Ivan/CorePresentations/ Very useful materials in several formats are available that pretty much cover everything!

While the “Web 1.0” was designed to convey information to human readers, the vision of the Semantic Web (SW) is to make data understandable to machines, too. It derives from W3C director Tim Berners-Lee's vision of the Web as a universal medium for data, information, and knowledge exchange. The Semantic Web Ping Service is a notification service for the semantic web that tracks the creation and modification of RDF based data sources on the Web.

Altova offers a tool for creating Semantic Web documents visually, SemanticWorks. They even also wrote a nice article on their website, "What is the Semantic Web?" If you'd like to see how the tool works, there is a Hands-on RDF with Altova SemanticWorks section from the following page, Introduction to the Semantic Web Vision and Technologies - Part 3 - The Resource Description Framework.


The Semantic Web will improve the connections between knowledge on the web and software.



A very simple summary explaining the semantic web below:


  • Web 1.0 was about connecting-up documents.

  • Web 2.0 is about connecting-up people.

  • The Semantic Web is about connecting-up data.

Source: http://www.oreillynet.com/xml/blog/2006/12/explaining_the_semantic_web_in.html

YouTube - Intro to the Semantic Web http://www.youtube.com/watch?v=OGg8A2zfWKg

Wednesday, January 30, 2008

Using XQuery with Office Documents (ODF and OOXML) in XMLSpy

Both of these standards, (ODF and OOXML), have adopted XML, which means that you can use standard XML tools, like XMLSpy, and AltovaXML to query your office documents! Interestingly XMLSpy doesn't list OpenDocument Format (ODF) file types within the tool. However, I thought I'd see if I could in fact use them in XMLSpy just in case I had a business need for this and figured it outta make things even easier for re-use as Alexander Falk shows us in his latest blog post Content reuse with Open XML and XSLT. In fact it's easy enough to add support for this in the tool. Here are the instructions:

Launch XMLSpy, select Tools\Options, File Types tab, from the menu and click on the "Add new file extension" button, as shown in the image below to add the new file types. In the screen-shot below, I've added ODF word-processing (.odt), spreadsheet (.ods), and presentation (.odp) file extensions and select the ZIP conformant radio button for each.

That's it! Now exit and re-launch the software and open the new file types you just added.


Microsoft's Open XML and ODF are both built on XML foundations, but they're not directly compatible with each other hence the reason for the next 4 paragraphs.

This is old news, (2 years now in fact):

F.E. Open XML Translator enables interoperability with ODF which can be downloaded here, OpenXML/ODF Translator Add-in for Office
The translator can work both ways — to convert an ODF document to OpenXML and vice versa. A full list of all the available supported features is included in the documentation packaged with the converter tool. Other OpenXML/ODF converters for Excel and PowerPoint documents are also in development and are scheduled to be released by November.

The Open XML Translator for Word documents was the first phase of the project. The team has also finished working on translation between ODF and Open XML for spreadsheets written in Microsoft Excel 2007 and presentations developed in Microsoft PowerPoint 2007. Since then they have announce the new releases of the 1.1 version of Word Translator, the 1.0 version of PowerPoint translator and the 1.0 version of Excel translator. OpenXML/ODF Translator Add-in for Office

However, a few things may be lost in each direction of the conversion so you might want to make sure you check the documentation.

Sun's ODF Plugin for Microsoft Office allows users of Microsoft's product to also open and save ODF (.odt, .ods, and .odp) files in the corresponding Microsoft application. Available for Windows operating systems.

I download some sample documents from SourceForge.net. And here's how they look when opened in XMLSpy.

The complete OpenDocument v1.0 OASIS Standard specification is only available in three Relax-NG schemas. It would be nice to have these specifications as W3C schemas.

Friday, January 25, 2008

A simple way to re-direct schema locations in XMLSpy using XML Catalogs

What are XML Catalogs ?
External identifiers in XML documents refer to resources that have to be accessed for many different purposes. These resources are not necessary available because they are located on a remote machine not reachable with a network connection, because they are identified with a logical name instead of a physical path, etc.
XML Catalogs intend to resolve these identifiers (as well as regular URIs) to accessible URIs.

How to automatically load XSD and DTD relationships within XMLSpy and remove all those crummy absolute and relative paths in your XML documents is simplified through the use of catalogs. Redirecting XMLSpy schema request to specific locations is a snap and works great.. especially in work groups! You can simply make quick changes to the catalog file when versions change and you don't have to update ALL your XML documents. The XML catalog support in Altova products is based on standards on OASIS Catalog Support (subset).

This increases the overall processing speed, enables users to work offline (that is, not connected to a network), and improves the portability of documents (because URIs need be changed in the catalog files only.)

Catalogs:

XMLSpy supports a subset of the OASIS XML catalogs mechanism. The catalog mechanism enables XMLSpy to retrieve commonly used schemas (as well as stylesheets and other files) from local user folders. This increases the overall processing speed, enables users to work offline (that is, not connected to a network), and improves the portability of documents (because URIs need to be changed in the catalog files only.) The catalog mechanism in XMLSpy works as follows:

• XMLSpy loads a file called RootCatalog.xml, which contains a list of catalog files that will be looked up. You can enter as many catalog files to look up, each in a nextCatalog element in RootCatalog.xml.
• The catalog files included in RootCatalog.xml are looked up and the URIs are resolved according to the mappings specified in the catalog files. You should take care not to duplicate mappings, as this could lead to errors.
• Two catalog files are supplied with XMLSpy (in addition to RootCatalog.xml): (i) CoreCatalog.xml (which maps the pre-defined PUBLIC system identifiers of several popular schemas (such as SVG and DocBook) to URIs that point to the locally saved schemas), and (ii) CustomCatalog.xml. (which is a skeleton file in which you can create your own mappings). The files RootCatalog.xml, CoreCatalog.xml, and CustomCatalog.xml are installed in the XMLSpy application folder.The schemas, stylesheets, and other files referenced from CoreCatalog.xml are located in specific subfolders of your XMLSpy application folder.
• The PUBLIC or SYSTEM identifier in the DOCTYPE statement of your XML file will be used for the catalog lookup. For popular schemas, the PUBLIC identifier is usually pre-defined, thus requiring only the URI in the catalog file to be changed when XML documents are used on multiple machines.

When writing your CustomCatalog.xml file (or other custom catalog file), use only the following subset of the OASIS catalog in order for XMLSpy to process the catalog correctly. Each of the elements in the supported subset can take the xml:base attribute, which is used to specify the base URI of that element.


<catalog...>...<public uri="URL of local file" publicid="PublicID of Resource"><system uri="URL of local file" systemid="SystemID of Resource"><rewriteuri rewriteprefix="String to replace StartString" uristartstring="StartString of URI to rewrite"><rewritesystem rewriteprefix="Replacement string to locate resource locally"
systemidstartstring="StartString of SystemID"><uri uri="URL of file identified by filename" name="filename">...</catalog>



Please note:

• Although the DTDs for the official W3C XML Schemas are provided and referenced from the CoreCatalog.xml, they cannot validate your XML files against either of these schemas. They are included to provide entry helper info for editing purposes should you wish to create files according to these older recommendations. Also see next point.
• If you create a custom file extension for a particular schema (for example, the .myhtml extension for (HTML) files that are to be valid according to the HTML DTD), then you can enable intelligent editing for files with these extensions by adding a line of text to CustomCatalog.xml. For the example extension mentioned, you should add the element
 <?xml:namespace prefix = spy /><spy:fileexthelper uri="schemas/xhtml/xhtml1-transitional.dtd" ext="myhtml"> 
as a child of the <catalog> element. This would enable intelligent editing (auto-completion, entry helpers, etc) of .myhtml files in XMLSpy according to the XHTML 1.0 Transitional DTD.

<?xml:namespace prefix = spy /><spy:fileexthelper ext="myhtml" uri="schemas/xhtml/xhtml1-transitional.dtd">

• For more information on catalogs, see the XML Catalogs specification. Source: http://www.altova.com/manual2008/XMLSpy/spyprofessional/index.html?validate.htm

UModel, StyleVision, and Authentic also supports the same OASIS catalog files as XMLSpy.

Friday, January 18, 2008

New (long-overdue) release of XSV available

XSV 3.1 [1] is released. This is a long-overdue rebuild and release of a version which hasn't actually changed for quite a few months.
All installers are now up-to-date: Windoz executable, .deb, .rpm and source versions.
The web form [2] is also now running this version.
The major changes since the last public release are
* Corner cases for nested numeric exponents are handled correctly
* XSV no longer requires PyLTXML (our fast Python/C XML parser), will
run without it, provided you have PyXML installed [3] (it _really_
s*cks that Python does not ship with an SAX parser which supports
namespace prefixes!)
ht
[1] http://www.ltg.ed.ac.uk/~ht/xsv-status.html
[2] http://www.w3.org/2001/03/webdata/xsv
[3] http://sourceforge.net/project/showfiles.php?group_id=6473&package_id=6541&release_id=286213

Source:XML-Dev

XSV (XML Schema Validator) is an open source (GPLed) schema-aware processor which implements standards defined by XML Schema Part 1: Structures and XML Schema Part 2: DataTypes. XSV was developed at the Language Technology Group of the Human Communication Research Centre in the Division of Informatics at the University of Edinburgh, with support the World Wide Web Consortium (W3C). It is widely accepted in the XML Schema development community as being the official reference implementation for the XML Schema language.

UML Jokes

Someone is running a competition to find the best joke told using only UML, and the first prize is a laptop. Here's a pretty funny one submitted by my colleague, A duck walks into a bar


Can you think of a joke that could be expressed using UML? If you need an easy to use tool to create your diagrams, UModel is the simple, cost-effective way to draw on UML.


Here's a screen-shot of how the project appears in UModel.




A good place to find some jokes for your diagrams.

Some developers swear by UML, some hate it. If you're in the former camp (or in the latter, but forced by corporate policy to use UML anyhow), you'll want a tool that allows you to easily construct UML diagrams. Altova UModel offers a good mix of features, including round-trip engineering for Java, C#, and Visual Basic .NET source code and binary files, and generates UML diagrams to facilitate analysis, enhancement, or reuse at a very reasonable cost.

UModel has been around for a few years and have added many new features with each release which are all listed here.

Wednesday, January 9, 2008

XBRL Tutorial

KPMG has been deeply involved in the design and development of the XBRL standard since its inception.

Here's an excellent tutorial.

Just be aware that this tutorial material applies to XBRL 2.0, not the current 2.1 standard. The early conceptual chapters remain valid, but some of the material later is badly outdated.

XBRL 2.1 is the current specification and the schemas along with the XBRL 2.1 documents can be downloaded here.

XMLSpy can be used to edit and validate the schemas along with the documents.