Re: How to determine supported entities

David O'Brien <[email protected]> Thu, 4 Apr 2019 12:23:37 +1000
Newsgroups gmane.text.docbook.misc
Message-ID <[email protected]>
Thanks Bob.

I'll run this by the working group and see what comes back.

David

On 4/4/19 7:31 AM, Bob Stayton wrote:
> Have you considered making the address of common.ent in its parameter
> entity reference a URL referencing a website?  That would make it
> read-only, maintainable in one location, and instantly updated to all users.
> 
> <!ENTITY % common_entities SYSTEM
> "http://redhat.com/somepathto/common.ent" >
> 
> That wouldn't prevent someone from adding entity declarations to their
> XML file to override particular entities, though.
> 
> Bob Stayton
> Sagehill Enterprises
> [email protected]
> 
> On 4/2/2019 4:34 PM, David O'Brien wrote:
>> Is there a way to differentiate between (what I call) "natively
>> supported entities" (&nbsp; &lt; &gt; &trade; and all those) and what we
>> add in .ent files?
>>
>> In our projects we normally have one /Common/common.ent file where we
>> define numerous entities. This is shared across all projects. What we
>> want to do is make sure people don't add to this file, resulting in
>> different versions for different projects. This file, combined with the
>> natively supported entities, would constitute a "whitelist" of entities.
>>
>> We've done something similar with DocBook elements, where we have a
>> whitelist of supported elements (we don't use the entire 4.5 schema) and
>> if our script hits a "black" element it throws a warning. To do the same
>> with entities means we'd have a *very* long whitelist just for the
>> natively supported entities.
>>
>> Perhaps there is a better way?


-- 

David
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEt8foe2pCEdZ4nsfrK9JZN+ky1n8FAlylaqkACgkQK9JZN+ky
1n87rxAArYJ73stZU2NiQrzw2hradTMFzkYJPImCFUg/zQfLhiGzRzLWD3gOaGnc
wpKwnsI+NZ7qT9FMBbYA6VGX5kiKkjdKs9AlVu75WZR2Cnvm03HuvTB4HrNqU+0z
3GDNPR2U83rBH6GfWF0Q73B2MQJ8A3BQyqFwADwT5HtxG9mx4fOgJHBPGI5aZYpK
qkt/ZGF+O4FKMVp2W+5tNoY8A2Byd0JozMRxjq4yIaUx+KAVnqJhu5EVi3dHRpz9
ECWS/4SlpUTzZMvu1y4mu8/83qhlRd15HUyiGEipwnaa+FkYv5lVZwW6xMOb0uvc
8HsV4MX5uIFOzXEmh0J1+eURF6LtUWBJ+uW7K5QVpUQdM2adnoczwyluURp52h7Z
omRqxv1q0S81WGNWiEFPGTKH+jt2AssTWlt1yPjS48UTOEV0o5OmwMq4WF4Y1w/X
gJ35LtURz96BqozlSisOKx1RelC4rVgRXsM2QuyGwOq0SW19CpeapJR7j1UH2bs2
E4H9ddc1M2+sW1CQusEN1lVElZ2QzeQ9JztQpowiBCJ+Ia9Qw/YFPYwPNUEZZLoh
f63r1iShrYXCm7BVl+LcNqYSJwZbGAtpon/+ESt96tJBnm1en+58UQUOn6Ln6D1X
gxNv3Iwx5vJdnXfxjALE0TsgaEI/I7BW134tI/DKxlw5iE3vp9Q=
=DWCP
-----END PGP SIGNATURE-----