Re[2]: recursion with an except.

Alex Peshkov <[email protected]> Wed, 25 Feb 2004 21:48:50 +0300
Newsgroups gmane.text.xml.relaxng.general
Organization RenderX
Message-ID <[email protected]>
Hello, David.

DProu>     You just can't do it this way in RelaxNG. <ref/> is an 
DProu>     empty element (you can see appropriate message issued by 
DProu>     jing).

DProu> Yes, it did seem like  a logical pattern though.
DProu>   Use that definition, with this exception!

Well, I found it quite appealing too. However it may be not so
straightforward from the point of view of the theory in the base
of RelaxNG or have some implementation reasoning behind it, so we
better wait for one of the gurus to comment on this  :-)

DProu>     The only possible solution I can think of is to 
DProu>     redefine content of the definition using a trick with 
DProu>     inclusion of separate grammar:

DProu> I'll study that Alex.... thanks.

After thinking about it once more I decided that this trick should be
used in a different way. Please find a simple example attached (I'm
using a compact syntax since it's a way faster to write/read).
In this sample I suppose that all elements are not empty and can't
have descendants of the same type. I believe it is close to your
original goal.

DProu>   Regards DaveP

Best regards,
Alexander Peshkov                             mailto:[email protected]
RenderX

_______________________________________________
relaxng-user mailing list
[email protected]
http://relaxng.org/mailman/listinfo/relaxng-user
inlines.rnc (application/octet-stream, 241 B) - not displayed
para.rnc (application/octet-stream, 538 B) - not displayed
test.xml (application/xml, 265 B)
<?xml version="1.0"?>
<para>
  qwerty
  <em>
    <strong>
      <dfn>
        <!-- This <em> element will be rejected -->
        <em>uiop</em>
        asdf
      </dfn>
      ghjkl
      <dfn>
        zxcv
      </dfn>
    </strong>
  </em>
</para>