- From: Fredrik Öhrström <oehrstroem@gmail.com>
- Date: Mon, 2 Feb 2026 10:17:16 +0100
- To: Bethan Tovey-Walsh <bytheway@linguacelta.com>
- Cc: ixml <public-ixml@w3.org>
- Message-ID: <CALZT+jBY6ua=1xpwOp8tJWm5zauos2ic1a27K6OJ0AptHke7eg@mail.gmail.com>
> I'm not understanding something here.
> Could you show your iXML grammar and an example of an input that gives an
ambiguous result (and indicate which result is the desired one)?
Hi Bethan!
Here is a greatly simplified grammar that shows the problem:
======= File ex.ixml =======
doc = arrayline+.
arrayline = -'- ', (valonly | kvp).
valonly = ~[#a]*, -#a.
kvp = kcs, val, -#a.
-val = ~[#a]*.
-kcs = @key, -': '.
key = [L;'_']+.
======== File in.yaml ======
- a: 1
- b: 2
- c: 3
And you get with: xmq ex.ixml in.yaml
doc(ixml:state = ambiguous
xmlns:ixml = http://invisiblexml.org/NS)
{
arrayline {
valonly = 'a: 1'
}
arrayline {
valonly = 'b: 2'
}
arrayline {
valonly = 'c: 3'
}
}
And with: markup-blitz ex.ixml in.yaml | xmq
doc(ixml:state = ambiguous
xmlns:ixml = http://invisiblexml.org/NS)
{
arrayline {
kvp(key = a) = 1
}
arrayline {
kvp(key = b) = 2
}
arrayline {
kvp(key = c) = 3
}
}
So the output is ambiguous and xmq and markup-blitz picks different choices
which is fine.
The challenge is to rewrite the valonly rule, to reject the kvp matches so
that the output is
like the markup-blitz output and un-ambiguous.
//Fredrik
Received on Monday, 2 February 2026 09:17:48 UTC