Section 7.2  of the spec contains the rules

(group complex)
  groupable(complex( ), complex( ))

(ref)
  <ref name="ln"/> :c complex( )

(group)
  p1 :c ct1      p2 :c ct2      groupable(ct1, ct2)
----------------------------------------------------------------------
  <group> p1 p2 </group> :c max( ct1, ct2 )


(element)
  deref(ln) = <element> nc p </element>      not(p :c ct)
  --------------------------------------------------------------------------
  incorrectSchema()

This prohibits rules like

a = element b { "x", "y"}

However, according to my readin of 7.2,
one get get around this using indirection:

a = element b { x, y}
x = "x"
y = "y"

the point being that the x and y patterns in are complex,
since all refs are complex,
so the above should be a valid schema.

I do not believe that the spec intended to leave such a loophole,
and indeed jing raises the same error for both schema.
However, my reading of the spec says the second version is legal.

There are 3 possibilities:
1. my understanding of 7.2 is wrong
  the most probable, but i'd like to understand why I'm wrong

2. jing is wrong

3. the spec is "wrong"

can someone tell me which it is,
and if it is 1. explain why.

thanks
Daniel

Reply via email to