Bug 53132 - Update common.dtd to handle class tags in <code> elements
Update common.dtd to handle class tags in <code> elements
Product: Apache httpd-2
Classification: Unclassified
Component: Documentation
All All
: P2 enhancement (vote)
: ---
Assigned To: HTTP Server Documentation List
Depends on:
  Show dependency tree
Reported: 2012-04-23 09:07 UTC by Daniel Gruno
Modified: 2012-04-24 16:30 UTC (History)
0 users

patch to allow for class tags within code elements (323 bytes, application/octet-stream)
2012-04-23 09:07 UTC, Daniel Gruno

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Gruno 2012-04-23 09:07:02 UTC
Created attachment 28657 [details]
patch to allow for class tags within code elements

I would like to propose we update common.dtd to be able to handle class tags inside <code> elements, so as to enable highlighting support for source code snippets without the build system complaining about undeclared tags. I have included a patch for this purpose, but I'd like some form of okay before committing this to the trunk.

This would, presumably, be accompanied by an update to the style sheet (or, if possible, the addition of a new style sheet that only applies to pages with highlighting, but I'm not sure whether this is possible at the moment)
Comment 1 Nick Kew 2012-04-23 10:20:16 UTC
I think you mean class attributes to the <code> tag.

I don't see how this really enables syntax highlighting, since it only offers capacity to apply a single style to an entire <code> element.  Syntax highlighting beyond the trivial is surely better automated?
Comment 2 Daniel Gruno 2012-04-23 12:52:13 UTC
It doesn't in itself enable syntax highlighting, no, but it would enable me to use styles within a <code> tag without breaking from the DTD, which could then be used to highlight the code and validate the XML at the same time.

So yes, this would be for manual syntax highlighting, which is what I have had to do all along, as no one seems to be able to say "I have a solution, this is how we do it automatically" and actually get it done.
Comment 3 André Malo 2012-04-23 13:26:42 UTC
I hope you don't expect these solutions magically happening within the hour. The topic is just a few days old. Also see my suggestion on the list.
Comment 4 Daniel Gruno 2012-04-23 13:35:40 UTC
No, I don't foresee a magical change during the night, besides I don't have any spare teeth to put under my pillow :)

This is why I proposed the laxer version of common.dtd, so that it would, for the time being, be possible to allow for a manual highlighting instead, until a solution is properly evaluated and constructed at some point. I know full well that these things don't occur over night, and I'm not expecting them to do so either, I was merely being grumpy in my choice of words.
Comment 5 Daniel Gruno 2012-04-24 16:30:45 UTC
Closing, as we're now discussing other measures to deal with this issue :)