[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK: Issues with processing expectations of the proposedannotation element
Dave Pawson <davep@dpawson.freeserve.co.uk> writes: > At 06:15 27/06/2002 -0500, Michael Smith wrote: > > >If we were to add an Annotation element, I think it could be of use > >for the HTML title attribute if a processing application (e.g. the > >DocBook XSL stylesheets) were to just convert all the Annotation > >content to text -- strip out any tags the content might contain, > > You may want that Mike. > I certainly wouldn't. It's not that I want it. What I really would want is for HTML itself to have an Annotation element which would generate pop-up text in visual browsers -- that way we'd have something to map to cleanly. But that's not going to happen any time soon, so the fact that HTML title content is attribute content, not element content, means that HTML titles can't contain any markup -- just plain text. So, if we want to have an DocBook element whose contents can be converted to HTML titles, the only alternatives would seem to be: * for the processing application, instead of issuing a warning, to die with fatal error, like: Error: line XX: Annotation contains element content; exiting or * to create an additional element (in addition to Annotation) with a content model restricted to PCDATA, for the sole purpose of having something that will always convert cleanly to HTML titles or * to restrict the content of Annotation to PCDATA in the DTD I don't think the second alternative is a good idea at all, and though the third would not be the right choice for the standard DTD, if you knew you wanted to consistently render your Annotation content as HTML title content and wanted to avoid the problem of potentially marking up Annotation content and then finding out it just ends up getting stripped by the processing application, you could just used a local DTD customization layer -- an authoring DTD -- that restricted the content model of the Annotation element to PCDATA. > I don't want to mark up content to have it stripped. Nobody else does either, of course. But if the processing application issues warnings, at least you'll know it's happening, and you'll be able to go back to your source and re-edit the contents of your annotations to make sure they don't contain any markup. Like I said, if HTML had a decent annotation element, you wouldn't need to do that. The closest thing it has is the title attribute. So if you used a processing application that gave you the option of converting your annotations to HTML titles, and you wanted to use that option, you'd need to either consciously restrict the content of your annotations to character data in you source documents, or just live with seeing any markup it might contain get stripped out on conversion. --Mike
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC