Com\’è dura la professione!

31 agosto 2012

Visual comparison between XML Schema files in QXmlEdit

Filed under: Open Source,QT,qxmledit,xml,xsd — lbell @ 21:31
Tags: , , ,

Visualizing a comparison between files is first of all a semantic operation. The comparison of source code of programs usually is done at level of source lines, and the level of concepts, classes and methods in this case, is entirely left to the user. There is no doubt that any line of source code is important, but while in the programming world the abstraction level is always raising, using protocols, interfaces and as last resource, languages better suited for the job, the comparison of variations of different versions is always done at character level.

The comparison of XML files is similar to a source code comparison, given that the information carried by a file are not related to the XML syntax, but to the meaning associated with the particular XML structure.

XML Schema files can be compared at XML elements level, the analogue of the source code comparison, but understanding the difference of the information carried by of the different XSD files is not easy.

The future 8.3 QXmlEdit, now on development trunk, follows another approach, transforming the data into concepts, element, types, and so on, then comparing the concepts. Given that the XML Schema follows a strictly hierarchical model, the reference and the target schema are scanned in parallel for inner contents. Where an element in the reference schema has an equivalent on the target schema, is compared for equality on the basis of the element type and name. If the two values are equals, the element are posed in correlation and any other difference ends in modified items. The comparison continue recursively.

The schema is then presented, using colors that show at a glance only the reference schema, highlighting the changes, showing the information in their context. The key is shift the focus from the comparison as operation, to the variation of the information in the schema context.

Image

Lascia un commento »

Non c'è ancora nessun commento.

RSS feed for comments on this post. TrackBack URI

Lascia un commento

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...

Crea un sito o un blog gratuitamente presso WordPress.com.

%d blogger cliccano Mi Piace per questo: