28 Aug
2015
28 Aug
'15
1:54 p.m.
On 24/08/15 16:14, Syd Bauman wrote:
If it comes to a separate processing step, I'd prefer a post-processor that detects this and wraps the offending reference in parens. perl -pe 's/(%[A-Za-z][A-Za-z0-9.-]+;),/($1),/g;' < in.dtd > out.dtd
This (or my somewhat simpler version of it) does work, at least for the one dtd I have tried it on so far.
Or, as I said, *all* of 'em. perl -pe 's,%[A-Za-z][A-Za-z0-9.-]+;,($&),g;' < in.dtd > out.dtd
Hitting all of them (however) is definitely not a good idea: it generates a different error in cases where the pe expands to a single gi.