OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: [docbook 4.3] the syntax of code listings


4.3b2 adds a an attribute "language" to linespecific.attrib.

I think the attribute should be called "syntax", or there should be 
attributes "language" and "syntax".

If an application processing DocBook can find out which syntax is used 
in code snippets or listings it can do syntax markup and syntax 
highlighting. [use case]

Sets of languages share on syntax. For example: the DBX and SVG 
languages are written using the XML syntax. The syntax highlighter might 
handle XML but not SVG, so I need to be able to specify syntax="XML".

Other languages can be written in several syntaxes, Relax NG for example 
has two syntaxes.
So when the app sees
<programlisting language="RNG">[...]</programlisting>
it still doesn't know which syntax is used, and can't do syntax 
highlighting or any other action based on the syntax.

I think an attribute "syntax" should also be added to element "code".


[use case]
role="XML" is (ab)used until there is syntax="XML"


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]