[relaxng-user] recursion with an except.
Alex Peshkov
peshkov at renderx.com
Wed Feb 25 21:48:50 ICT 2004
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:peshkov at renderx.com
RenderX
-------------- next part --------------
A non-text attachment was scrubbed...
Name: inlines.rnc
Type: application/octet-stream
Size: 241 bytes
Desc: not available
Url : http://relaxng.org/pipermail/relaxng-user/attachments/20040225/9ac86d51/inlines.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: para.rnc
Type: application/octet-stream
Size: 538 bytes
Desc: not available
Url : http://relaxng.org/pipermail/relaxng-user/attachments/20040225/9ac86d51/para.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.xml
Type: application/xml
Size: 265 bytes
Desc: not available
Url : http://relaxng.org/pipermail/relaxng-user/attachments/20040225/9ac86d51/test.rdf
More information about the relaxng-user
mailing list