[relaxng-user] RELAX NG and system entities

Michael Smith smith at xml-doc.org
Sun Nov 21 01:24:48 ICT 2004


Matthew Burgess <matthew at linuxfromscratch.org> writes:

> Hi folks,
> 
> From what I can gather, being a complete newbie to RELAX NG, system 
> entities aren't usable with RELAX NG (and schema languages in general).
> 
> In our current DTD setup, we are able to share common data between 
> multiple documents like so:
> 
> Each document has the following at the top:
> 
> ---
> <!DOCTYPE myDoctype SYSTEM "myDoctype.dtd" [
> <!ENTITY % general_entities SYSTEM "general.ent">
> 
> %general_entities;
> %package_entities;
> ]>
> ---

You can do can keep your doc instances as is and your RELAX NG
validator will resolve the entities just any DTD-based validator would.
RELAX NG validator will read the internal subset.

> So I really have two questions:
> 
> 1) How do you guys share common data items between your XML documents 
> when using RELAX NG?

See above

> 2) Has anyone used EDML?  How successful has that use been?  Is it, as I 
> think, applicable to our needs of sharing data between multiple XML 
> documents?

I don't think there are any implementations of EDML. It's just a
draft proposal. There are also other ideas floating around about
how to do internal subset-less entities. Basic idea is just to use
names with namespace-prefixes, have your environment set up to
resolve those in some way (grab from net or resolve URI to
some copy stored locally)

> The main concern I have is the explicit support it would 
> seem to require from XML parsers.

Seems like it wouldn't require any support at all in existing
parsers if you had a special tool for resolving entity refs --
just run that and pipe the output to your validator or XSL engine.
Making such a tool is easy. You could make one now to process EDML
syntax or whatever syntax you wanted to use.

Hard part is getting everyone to agree on a standard syntax to use.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2419 bytes
Desc: not available
Url : http://relaxng.org/pipermail/relaxng-user/attachments/20041121/52eb149d/smime.bin


More information about the relaxng-user mailing list