Re: Tidy request

On Sat, 3 Jul 1999, Jelks Cabaniss wrote:

> A lot of the authoring tools automatically generate, for
> example, <I> and <B> in place of <em> and <strong> (MS FrontPage
> 98 generated the latter, but FP2000 has reverted to the former
> -- with no option to change or set it).  It would be handy if
> there were a "replace-elements" option to obviate the need for
> Perl, XSL, or a text editor's search-and-replace function.  
> Something like:
> 
> 	replace-elements: i, em; b, strong

An interesting idea, although I guess I would prefer a slightly
different syntax, e.g.

   replace-tags: i/em, b/strong

using "tags" rather than elements for consistency with other
property names and , for list item separators also for consistency
with other properties.

> PS.  I suppose it would have to be attribute-aware, though.  
> Given an XML input fragment of
> 
> 	<foo bar="5" />
> 
> and a config file containing
> 
> 	new-empty-tags: foo
> 	replace-elements: foo, zot
> 
> the result fragment should come out as
> 
> 	<zot bar="5" />
> 
> 
> Would this be difficult to implement?

No. The only question would be how it interacts with the clean
operations. My preference would be to do this separately before
the clean operations are applied.

Regards,

-- Dave Raggett <dsr@w3.org> http://www.w3.org/People/Raggett
phone: +44 122 578 2984 (or 2521) +44 385 320 444 (gsm mobile)
World Wide Web Consortium (on assignment from HP Labs)

Received on Wednesday, 7 July 1999 05:06:55 UTC