Re: [xml-dev] Brain teaser: how to use XML to describe a data formatthat contains illegal XML characters?
Hi Folks,
This is kind of a neat problem.
The technology called DFDL (Data Format Description Language) is used to describe data formats, both text and binary data formats. DFDL builds on top of XML Schema-XML Schema "hosts" DFDL in a way similar to how XSLT "hosts" XPath.
Some data formats that we want to describe contain characters that are not allowed in XML, which means they are not allowed in XML Schema since XML Schema is XML. For example, we might want to use DFDL to describe a binary data format that contains null-terminated strings. The null symbol (hex 0) is not allowed in XML, so how do we describe the data format?
It turns out that this situation is pretty routine in designing data
formats and programming languages. You often need to have a way of
representing something, using a format or language, which is not allowed
in the literal characters or components of that language.