[relaxng-user] Relax NG compact syntax and entities
Bruce D'Arcus
bdarcus at fastmail.fm
Tue Mar 15 10:20:32 ICT 2005
OK, but my question is why would you use entities? What possible
benefit do they provide here? Just name your pattern, and use it. So
if you have now an entity named "someElement", then just do:
someElement = element something { text }
It achieves the same effect, without DTD-related headaches.
Bruce
On Tue, 15 Mar 2005 18:20:12 +0100, "Alessandro Di Bella"
<aldib at fuurou.org> said:
> I'm not sure I understand what you are saying.
>
> Based on what's written on the Relax NG tutorial Appendix A,
> "RELAX NG does not support features of XML DTDs that involve changing the
> infoset of an XML document. In particular, RELAX NG [...] does not allow
> entities to be specified".
>
> The example i showed in my previous email uses parameterised entities
> that are
> provided by the internal DTD. In my opinion the trick works because the
> schema is an XML document and not because it is a Relax NG grammar.
>
> Moreover, as far as I know, the "include" directive allows only other
> external Relax NG grammars to be included and not DTD.
>
> Am I misinterpreting your answer?
>
> Alessandro
>
> On Tuesday 15 March 2005 17:58, Bruce D'Arcus wrote:
> > On Tue, 15 Mar 2005 11:46:47 +0100, "Alessandro Di Bella"
> >
> > <aldib at fuurou.org> said:
> > > Is there a way of doing the same with the compact syntax?
> >
> > The compact syntax is fully equivalent, so sure. And no need to use an
> > entity for this. Just include the external schema and then use whatever
> > patterns you want. I don't remember the precise syntax, but look at the
> > compact syntax tutorial.
> >
> > Bruce
More information about the relaxng-user
mailing list