Loading ...
Sorry, an error occurred while loading the content.
 

problem with -s switch on Jing?

Expand Messages
  • Tara Athan
    I have run into some problems with implementing an abstract schema where notAllowed is used as a child of an optional element an interleave. As a simple test
    Message 1 of 1 , Apr 4, 2011
      I have run into some problems with implementing an abstract schema where
      "notAllowed" is used as a child of an optional element an interleave. As
      a simple test case, see element A below. The original idea was that the
      "notAllowed" would cause the element it belongs to to fail, but since it
      is optional that part of the pattern would just disappear, unless
      over-ridden.

      This works as planned if the optional pattern itself is abstract (see
      example element D below).

      And the schema below is valid and works properly as a guidance schema in
      the editor.

      start = A | D
      A = element A { B* & C? }
      B = element B { text }
      C = element C { E }
      D = element D { B* & E? }
      E = notAllowed

      I have a highly modular schema, so I run jing -s on it to flatten. This
      also prepares the schema for translation into XSD. But when I do that on
      the schema above, I get

      start = A | D
      A = element A { B* & _1? }
      D = element D { B* }
      B = element B { text }
      _1 = element * { notAllowed }

      which is invalid, because ' element "B" can occur in more than one
      operand of "interleave" '.
      The only reason this happens is because of the element *.
      I would have expected to see

      start = A | D
      A = element A { B* }
      D = element D { B* }
      B = element B { text }

      I think this is a bug - has anyone run into this before?

      Thanks, Tara
    Your message has been successfully submitted and would be delivered to recipients shortly.