I was curious and decided to download the spec from here:
http://www.ecma-international.org/activities/XML%20Paper%20Specification/XPS%20Standard%20WD%201.1.pdf
and was less afraid than when I first looked at OOXML. The names are nice and readable.
However, there are some strange issues with this.
Look at page 409, " Abbreviated Geometry Syntax Algorithm"
There, you will see some strange pseudo-Basic language algorithm
First of all it uses labels extensively. and it uses it because it doesnt have a form of a for loop.
:
label_2:
Read coordinate pair X,Y
Let CURRENTPOINT.X = X
Let CURRENTPOINT.Y = Y
Add CURRENTPOINT.X,CURRENTPOINT.Y to end
if ( next character is not a letter )
{
GOTO label_2
}
}
else if ( CH == 'h' )
{
Create new PolyLineSegment S
Add S to CURRENTPATHFIGURE
label_3:
Read relative coordinate value DX
Let CURRENTPOINT.X = CURRENTPOINT.X + DX
Add CURRENTPOINT.X,CURRENTPOINT.Y to end
if ( next character is not a letter )
{
GOTO label_3
}
}
Its quite bizarre.
Then have a look at some mean beasts of regex patterns for "Abbreviated Geometry grammar for PatGeometry.Figures" on page 394:
<xs:pattern value="( ?(M|m)( ?((\-|\+)?(([0-9]+(\.[0-9]+)?)|(\.[0-
9]+))((e|E)(\-|\+)?[0-9]+)?)( ?, ?)((\-|\+)?(([0-9]+(\.[0-9]+)?)|(\.[0-9]+))((e|E)(\-
|\+)?[0-9]+)?)))(( ?(M|m)( ?((\-|\+)?(([0-9]+(\.[0-9]+)?)|(\.[0-9]+))((e|E)(\-|\+)?[0-
9]+)?)( ?, ?)((\-|\+)?(([0-9]+(\.[0-9]+)?)|(\.[0-9]+))((e|E)(\-|\+)?[0-9]+)?)))|(
?(L|l)( ?((\-|\+)?(([0-9]+(\.[0-9]+)?)|(\.[0-9]+))((e|E)(\-|\+)?[0-9]+)?)( ?, ?)((\-
|\+)?(([0-9]+(\.[0-9]+)?)|(\.[0-9]+))((e|E)(\-|\+)?[0-9]+)?))( ((\-|\+)?(([0-9]+(\.[0-
9]+)?)|(\.[0-9]+))((e|E)(\-|\+)?[0-9]+)?)( ?, ?)((\-|\+)?(([0-9]+(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-|\+)?(([0-
9]+(\.[0-9]+)?)|(\.[0-9]+))((e|E)(\-|\+)?[0-9]+)?)( ?, ?)((\-|\+)?(([0-9]+(\.[0-
9]+)?)|(\.[0-9]+))((e|E)(\-|\+)?[0-9]+)?) ((\-|\+)?(([0-9]+(\.[0-9]+)?)|(\.[0-
9]+))((e|E)(\-|\+)?[0-9]+)?) [0-1] [0-1] ((\-|\+)?(([0-9]+(\.[0-9]+)?)|(\.[0-
9]+))((e|E)(\-|\+)?[0-9]+)?)( ?, ?)((\-|\+)?(([0-9]+(\.[0-9]+)?)|(\.[0-9]+))((e|E)(\-
|\+)?[0-9]+)?))( ((\-|\+)?(([0-9]+(\.[0-9]+)?)|(\.[0-9]+))((e|E)(\-|\+)?[0-9]+)?)( ?,
?)((\-|\+)?(([0-9]+(\.[0-9]+)?)|(\.[0-9]+))((e|E)(\-|\+)?[0-9]+)?) ((\-|\+)?(([0-
9]+(\.[0-9]+)?)|(\.[0-9]+))((e|E)(\-|\+)?[0-9]+)?) [0-1] [0-1] ((\-|\+)?(([0-9]+(\.[0-
9]+)?)|(\.[0-9]+))((e|E)(\-|\+)?[0-9]+)?)( ?, ?)((\-|\+)?(([0-9]+(\.[0-9]+)?)|(\.[0-
9]+))((e|E)(\-|\+)?[0-9]+)?))*)|( ?(Z|z)))*" />
Overall, it definitely looks alot better than OOXML, but then again, that doesnt say much.
yk.