Xatapult's XML Blog


Joy of the XML container

Filed under: Uncategorized — xatapult @ 14:35

One of the things you frequently have to do when working with real-world XML content is process multiple related XML documents. An example is processing Office Open content (better known as Microsoft Office documents). A single Office Open document (like a .docx file) consists of many closely related XML (and other) documents. All are packed inside the .docx (or .xlsx or .pptx or …) file, that is actually a zip file. A simple but surprisingly effective construction for working with this is to wrap all content in a standardized “XML container” format. This enormously simplifies reading, processing and writing. (more…)



The Discovery of XProc

Filed under: Opinion,Standards and guidelines — xatapult @ 17:03

Over the last couple of years I had ignored XProc as something to process my XML with. There were no special reasons for this neglect. But as we all know, there is only so much time and too many things to do, learn and discover. And we have to earn a living as well, don’t we?

But in the last half of 2013 I was asked by a client to create a complex XML conversion application. Alternative approaches (for me) would have been Cocoon (which seems rather out of fashion) or eXist+XQuery+XSLT (which did not fit the technical environment). So I decided to pick up XProc (on Calabash) and give it a try. (more…)


XQuery functions with side effects – How to handle?

Filed under: How-to,Tips and trics — xatapult @ 14:12

XQuery is the language for working with XML databases. It can also be used as a general purpose language for working with XML.

If you have functions in XQuery with side effects (e.g. updating a log) that return something you don’t want to use, you have a serious problem. This blog explores this and proposes some solutions. (more…)


XML Database Marketing

Filed under: Opinion — xatapult @ 13:06

XML databases are usually marketed as, well, just databases: Applications in which you can store vast amounts of data, combined with mechanisms to index and query the stuff. That sounds logical (given the name of the product category) but is IMHO only half (or even less) the story. After some deep immersion into eXist for several months (and some more shallow experiences with MarkLogic and 28msec), I do think this product category has a much wider application than its name of it implies (more…)


XQuery Namespace Input eq Namespace Output?

Filed under: Opinion,Standards and guidelines — xatapult @ 07:07
Tags: ,

A few month ago I started my first serious programming project using XQuery (on eXist-db). Although the language is easy to master when you already know XPath, it has IMHO a few quirks. Here is, IMHO, the worst (more…)


XSLT types against typos

Filed under: How-to,Tips and trics,Uncategorized — xatapult @ 07:13
Tags: ,

Some tiny typing mistakes in your XSLT stylesheet can cause major headaches. Why? Because they go undetected by the standard static and dynamic error checking mechanisms. Something as simple as writing /Filename where it should be /FileName will only show up if your own test/debug efforts find it and will not be trapped by the XSLT engine. Unless… (more…)


Naming namespaces

Filed under: Opinion,Standards and guidelines — xatapult @ 05:55

Namespaces are inevitable when you work with XML. In the beginning they seem awkward and unnecessary, but after a while you find out that they have a purpose and are actually very useful.

When you start designing your own XML, sooner or later you’ll want your own namespace too. And there an important question arises: How to call your namespace, what name should your namespace have?

There are customs and, as usual, many opinions about this. Let me add mine… (more…)


XML Coding Standards

Filed under: General,Opinion,Standards and guidelines — xatapult @ 10:03
Tags: ,

Looking at the XML that is around, everybody seems to use different standards for element and attribute names. Some people write their elements in all uppercase, like <USERNAME>, some use UpperCamelCase, like <UserName>, or lowerCamelCase, like <userName>. Some standards, like XSLT, use all lowercase, like <xsl:value-of>. There is no uniformity, in contrast to, for instance, Java, where everybody more or less adheres to the same writing and coding rules.

So should we have a standard and what should it look like? Let’s explore. (more…)


Interpreting XML – Dont do it yourself!

Filed under: General — xatapult @ 09:07

In an XML document you can express the same semantics in syntactically very different ways. Which is a difficult way of saying: Watch out, XML documents may look different but can nonetheless mean the same! If you use the right tools to parse and interpret the XML that is not a problem. However, be aware for developers that do not…

This article explores the areas that cause most of the confusion in interpreting XML. (more…)


Schema references

Filed under: How-to — xatapult @ 12:43
Tags: , ,

How do you associate a schema with an XML document? It’s easy but the details also easily forgotten. A summary and a how-to. (more…)

Next Page »

Blog at WordPress.com.