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

Re: [rng-users] Generating _1 = element * { notAllowed } any ideas why?

Expand Messages
  • Tara Athan
    Please see http://code.google.com/p/jing-trang/issues/detail?id=140&colspec=ID%20Type%20Status%20Priority%20Stars%20Module%20Summary which provides a simple
    Message 1 of 13 , Feb 16, 2012
    • 0 Attachment
      Please see

      http://code.google.com/p/jing-trang/issues/detail?id=140&colspec=ID%20Type%20Status%20Priority%20Stars%20Module%20Summary

      which provides a simple example that causes the production of
      _1 = element * { notAllowed }

      As mentioned in a previous e-mail, this is not really a Jing issue, but an issue in the Relax NG spec.
      A workaround could be obtained if there were a fix to

      http://code.google.com/p/jing-trang/issues/detail?id=51&colspec=ID%20Type%20Status%20Priority%20Stars%20Module%20Summary

      which would allow flattening without the extra simplification triggered by jing -s.

      Unfortunately there has not yet been a developer to step up to this task.

      Tara

      Alex Muir wrote:
       

      Yeah as it turns out,,

      _3 = element * { text }
      _4 = element * { xsd:anyURI }
      _5 =
        element * {
          "Collection"
          | "Dataset"
          | "Event"
          | "Image"
          | "MovingImage"
          | "StillImage"
          | "InteractiveResource"
          | "Service"
          | "Software"
          | "Sound"
          | "Text"
          | "PhysicalObject"
        }
      _6 = element * { xsd:language }

      _7 =
        element * - (ns2:* | ns3:*) {
          (attribute * { text }
           | text
           | _7)+
        }

      I'm wondering why these _# names are created?

      I don't find I have this text _1 & _1 ?

      On Thu, Feb 16, 2012 at 2:56 PM, MURATA Makoto <EB2M-MRT@...> wrote:

      If this change does not remove the error message, do you have 

      another occurrence of "element *" elsewhere in your schema?  
      Or, do you have _1 & _1 ?



      --
      Alex Muir
      Program Organizer - University Technology Student Work Experience Building
      University of the Gambia

      http://sites.utg.edu.gm/alex/

      Come visit Gambia enjoy the sun and culture and help out! Software Engineering Lecturers needed!
      Join UTSWEB do local contract work or give a student a contract remotely for slow, cheap and good work http://sites.utg.edu.gm/utsweb/

      Some fantastic African/Canadian Fusion  http://bafila.bandcamp.com/


    • Alex Muir
      Yeah so what s involved to code this. Has anyone spent some time looking into it? ... -- Alex Muir Program Organizer - University Technology Student Work
      Message 2 of 13 , Feb 16, 2012
      • 0 Attachment
        Yeah so what's involved to code this. Has anyone spent some time looking into it?

        On Thu, Feb 16, 2012 at 6:33 PM, Tara Athan <taraathan@...> wrote:
        Unfortunately there has not yet been a developer to step up to this task.



        --
        Alex Muir
        Program Organizer - University Technology Student Work Experience Building
        University of the Gambia

        http://sites.utg.edu.gm/alex/

        Come visit Gambia enjoy the sun and culture and help out! Software Engineering Lecturers needed!
        Join UTSWEB do local contract work or give a student a contract remotely for slow, cheap and good work http://sites.utg.edu.gm/utsweb/

        Some fantastic African/Canadian Fusion  http://bafila.bandcamp.com/

      • Alex Muir
        Something I still don t understand is whether this is a solution that I should use and what is it doing. thanks ... Is this the final recommended fix for the
        Message 3 of 13 , Feb 17, 2012
        • 0 Attachment
          Something I still don't understand is whether this is a solution that I should use and what is it doing.

          thanks

          On Thu, Feb 16, 2012 at 2:24 PM, Alex Muir <alex.g.muir@...> wrote:
          _1 = element conflict { notAllowed }

          Is this the final recommended fix for the problem?

          Regards
          --
          Alex Muir
          Program Organizer - University Technology Student Work Experience Building
          University of the Gambia

          http://sites.utg.edu.gm/alex/

          Come visit Gambia enjoy the sun and culture and help out! Software Engineering Lecturers needed!
          Join UTSWEB do local contract work or give a student a contract remotely for slow, cheap and good work http://sites.utg.edu.gm/utsweb/

          Some fantastic African/Canadian Fusion  http://bafila.bandcamp.com/

        • Tara Athan
          Regarding the replacement of _1 = element * {notAllowed} with _1 = element conflict { notAllowed } to avoid certain error message that arise when _1 is used in
          Message 4 of 13 , Feb 17, 2012
          • 0 Attachment
            Regarding the replacement of
            _1 = element * {notAllowed}
            with
            _1 = element conflict { notAllowed }
            to avoid certain error message that arise when _1 is used in interleave, such as
            A = element A { B* & _1? }
            B = element B { ...}
            


            If the entire content of an element is notAllowed, then the corresponding pattern is equivalent to notAllowed.
            For this effect, it is irrelevant what the name of the element is.
            Therefore the name of the element can be changed to anything that avoids the syntactic conflict caused by the *. hence the recommendation to use
            _1= element conflict {notAllowed}
            That the name is "conflict" is not significant - it could be any name that is not used elsewhere in the grammar.

            This is the preferred solution, instead of
            _1 = notAllowed
            because applying jing -s to the resulting grammar would produce further simplications, with potentially other occurrences of this problem.

            So using
            _1 = element conflict { notAllowed }
            produces a grammar that will not be further modified if jing -s is applied, a property called "idempotency", which is considered a desirable thing.

            Tara


            Alex Muir wrote:
             

            Something I still don't understand is whether this is a solution that I should use and what is it doing.

            thanks

            On Thu, Feb 16, 2012 at 2:24 PM, Alex Muir <alex.g.muir@...> wrote:
            _1 = element conflict { notAllowed }

            Is this the final recommended fix for the problem?

            Regards
            --
            Alex Muir
            Program Organizer - University Technology Student Work Experience Building
            University of the Gambia

            http://sites.utg.edu.gm/alex/

            Come visit Gambia enjoy the sun and culture and help out! Software Engineering Lecturers needed!
            Join UTSWEB do local contract work or give a student a contract remotely for slow, cheap and good work http://sites.utg.edu.gm/utsweb/

            Some fantastic African/Canadian Fusion  http://bafila.bandcamp.com/


          • Alex Muir
            Okay thanks very much,, created a little script to adjust that at the end of the process. Regards ... -- Alex Muir Program Organizer - University Technology
            Message 5 of 13 , Feb 17, 2012
            • 0 Attachment
              Okay thanks very much,, created a little script to adjust that at the end of the process.

              Regards

              On Fri, Feb 17, 2012 at 5:32 PM, Tara Athan <taraathan@...> wrote:
               

              Regarding the replacement of

              _1 = element * {notAllowed}
              with
              _1 = element conflict { notAllowed }
              to avoid certain error message that arise when _1 is used in interleave, such as
              A = element A { B* & _1? }
              B = element B { ...}
              


              If the entire content of an element is notAllowed, then the corresponding pattern is equivalent to notAllowed.
              For this effect, it is irrelevant what the name of the element is.
              Therefore the name of the element can be changed to anything that avoids the syntactic conflict caused by the *. hence the recommendation to use
              _1= element conflict {notAllowed}
              That the name is "conflict" is not significant - it could be any name that is not used elsewhere in the grammar.

              This is the preferred solution, instead of
              _1 = notAllowed
              because applying jing -s to the resulting grammar would produce further simplications, with potentially other occurrences of this problem.

              So using
              _1 = element conflict { notAllowed }
              produces a grammar that will not be further modified if jing -s is applied, a property called "idempotency", which is considered a desirable thing.

              Tara


              Alex Muir wrote:
               

              Something I still don't understand is whether this is a solution that I should use and what is it doing.

              thanks

              On Thu, Feb 16, 2012 at 2:24 PM, Alex Muir <alex.g.muir@...> wrote:
              _1 = element conflict { notAllowed }

              Is this the final recommended fix for the problem?

              Regards
              --
              Alex Muir
              Program Organizer - University Technology Student Work Experience Building
              University of the Gambia

              http://sites.utg.edu.gm/alex/

              Come visit Gambia enjoy the sun and culture and help out! Software Engineering Lecturers needed!
              Join UTSWEB do local contract work or give a student a contract remotely for slow, cheap and good work http://sites.utg.edu.gm/utsweb/

              Some fantastic African/Canadian Fusion  http://bafila.bandcamp.com/





              --
              Alex Muir
              Program Organizer - University Technology Student Work Experience Building
              University of the Gambia

              http://sites.utg.edu.gm/alex/

              Come visit Gambia enjoy the sun and culture and help out! Software Engineering Lecturers needed!
              Join UTSWEB do local contract work or give a student a contract remotely for slow, cheap and good work http://sites.utg.edu.gm/utsweb/

              Some fantastic African/Canadian Fusion  http://bafila.bandcamp.com/

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