This format is in development and is not currently supported!

Here's an XML-based format used elsewhere:

XML Format for Paint-by-Number Puzzles A format devised by Jan Wolter, intended to be universal

However, I've started to design my own XML format (below) so that a future solver will be able to deal with multicoloured and non-rectangular puzzles.

The top-level element <nonogram> has a matrix attribute which specifies the shape of the puzzle and its solution image. It can be:

rect

The image is rectangular, with two banks row (from top to bottom, block sizes listed from left to right) and col (columns from left to right, block sizes listed from top to bottom).

iso

The image is made up of triangles in an isometric grid. The banks are row (from top to bottom, block sizes listed from left to right), tlbr (oblique columns, with block sizes listed from top-left to bottom right, starting with the bottom-leftmost) and trbl (oblique columns, with block sizes listed from top-right to bottom left, starting with the top-leftmost). An additional dim dimension is required, giving the length of the top edge.

The puzzle consists of metadata, tile shapes/colours, and banks of block sizes/colours. Dimensions are derived from the banks, but extra dimensions can be specified. Elements within <nonogram> can be:

<meta>

Each of these specifies metadata for the puzzle, such as the author and title. The same metadata can be provided in multiple languages.

<dim>

Each of these specifies an additional dimension which cannot be determined from the banks.

<palette>

Each palette specifies the appearance of a puzzle in one or more given contexts, specified by this element's sole attribute, contexts. The default context is called complete, and should be used to display a completed puzzle. While solving, a palette for the context partial should be used.

Each cell type is specified by an enclosed <tile> element, which identifies the cell type, shape and foreground/background colours, using the following attributes:

key

This identifies the cell type whose appearance is being specified, and it can have the following values:

?

The appearance of unknown cells is specified by this element.

unset

The appearance of background cells is specified by this element.

the empty string

The appearance of cells of the first solid type is specified by this element.

one of A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z

The appearance of cells of any other solid type is specified by this element.

fg

This specifies the foreground colour, as used by the various symbols, expressed in CSS format, e.g., #000. The default is black.

bg

This specifies the background colour, as used by the various symbols, expressed in CSS format, e.g., #fff. The default is white.

sym

This specifies the symbol to draw, and can be one of the following (solid being the default):

dot

The cell is filled with the background colour, then a dot is printed over it in the foreground colour.

solid

The cell is filled with the foreground colour.

blank

The cell is filled with the background colour.

If any palette leaves some cell types unspecified (except for the unknown cell type), they are defined in all palettes using the earliest definition in the document. The following palettes are assumed by default:

<palette contexts="complete">
  <tile key="" sym="solid" bg="#fff" fg="#000" />  
  <tile sym="blank" bg="#fff" fg="#000" />  
</palette>
<palette contexts="partial">
  <tile key="?" sym="blank" bg="#fff" fg="#000" />
  <tile sym="dot" bg="#fff" fg="#000" />  
</palette>
<bank>

Each bank consists of line data. Each line datum is a comma-/dot-separated list of block data. Each block datum consists of a non-negative integer giving the length of the block, and an optional key (as specified by the <tile> elements) indicating its colour/shape. Given the following declaration:

<tile key="R" fg="#f00" />

…the following datum indicates a block of 3 in the default colour, and 4 in red:

3,4R

Instead of a comma, whitespace separating two block data acts as a line-datum separator.

A length of zero shall only appear on a line datum by itself, and indicates a line with no blocks.

The length can be omitted if it is 1 and a key is specified.

<?xml version="1.1" encoding="UTF-8"?>
<nonogram xmlns="http://www.lancs.ac.uk/~simpsons/TR/nonogram"
         matrix="rect" xml:lang="en">
  <meta name="author">Hirofumi Fujiwara</meta>
  <meta name="title">Dog</meta>

  <bank name="row">
    3
    2,1
    1,1
    1,4
    1,1,1,1

    2,1,1,1
    2,1,1
    1,2
    2,3
    3
  </bank>

  <bank name="col">
    3
    2,1
    2,2
    2,1
    1,2,1

    1,1
    1,4,1
    1,1,2
    3,1
    4
  </bank>
</nonogram>

Ĉi tiu paĝo disponeblas ĉi-lingve, laŭ la agordo de via krozilo.