xproc / 3.0-steps

Repository for change requests to the standard step library and for official extension steps
10 stars 7 forks source link

p:ixml step should mark the output as ambiguous #493

Closed innovimax closed 2 years ago

innovimax commented 2 years ago

per https://invisiblexml.org/ixml-specification.html#L7076 it indicates If more than one parse tree describes the input, the processor must serialize one of them. It is not defined how this choice is made, but the resulting parse should be marked as ambiguous by including on the document element of the serialisation the attribute ixml:state="ambiguous", unless the user has activated an option to suppress this attribute. Processors may produce more than one parse tree, but the default mode of operation must serialize exactly one.

it means "Example 4. Parsing an ambiguous grammar" should indicate the ixml:state="ambiguous" on the root elements as followed <letters ixml:state="ambiguous" xmlns:ixml="http://invisiblexml.org/NS"><X>a</X><C><digits>123</digits></C></letters> or <letters ixml:state="ambiguous" xmlns:ixml="http://invisiblexml.org/NS"><X>a</X><A><digits>123</digits></A></letters> or <letters ixml:state="ambiguous" xmlns:ixml="http://invisiblexml.org/NS"><X>a</X><B><digits>123</digits></B></letters>

ndw commented 2 years ago

Yep, just an oversight on my part.

innovimax commented 2 years ago

Since the merge, it appears to be fixed now Thanks !