Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#156 xslthl 2.x support

Java extensions
closed
Jirka Kosek
XSL (122)
5
2008-07-23
2008-07-15
Michiel Hendriks
No

I've released an improved version of xslthl today which, amongst other changes, adds support for Xalan and Saxon 8.5+.

To use this updated version the highlighting/common.xsl file needs to be adjusted. Attached is a patch of the required changes to the xsl-ns-1.74 release. The full file can also be found here:
http://xslthl.svn.sourceforge.net/viewvc/\*checkout*/xslthl/trunk/docbook-xsl/highlighting/common.xsl

The construction used makes the stylesheet safe to be used by xalan and the two saxon xslt processors.

An other change that affects docbook-xsl is the removal and addition of some xslthl elements. xslthl:section is removed and xslthl:annotation and xslthl:directive have been added.
All this information is also explained here:
http://xslthl.wiki.sourceforge.net/DocBook+XSL+Updates

Discussion

  •  
    Attachments
  • Logged In: YES
    user_id=317406
    Originator: YES

    Made a little change to the highlighting/common.xsl
    It now includes a default match for the xslthl:* elements so that, when a unknown style is used a warning is issued and it's content is shown as normal (unhighlighted) text.
    File Added: common.xsl.patch

     
  • Jirka Kosek
    Jirka Kosek
    2008-07-18

    Logged In: YES
    user_id=189932
    Originator: NO

    Thanks. New features look really great and I'm working now on integration into stylesheet.

    I have to redesign XSLT part little bit to support things like textdata/@fileref inside programlisting -- content of programlisting have to be processed prior syntax highliting as in original file and not as in your patch.

    However I'm wondering why you are using doccomment for doctype. Why not simple doctype? Do you think that you can change this for consistency?

    And don't worries about freshness of your common.xsl -- I'm grabbing it from XSLTHL repository ;-)

     
  • Jirka Kosek
    Jirka Kosek
    2008-07-18

    • assigned_to: nobody --> kosek
     
  • Logged In: YES
    user_id=317406
    Originator: YES

    The reason why I used 'doccomment' was because I didn't want to add another default style name, specially not one with a low reuse ratio as the doctype has.
    'doccomment' sounded suitable, although, semantically doctype is more an annotation than a comment.

     
  • Logged In: YES
    user_id=317406
    Originator: YES

    FYI, the 'doccomment' style is also used by other highlighter configurations, for example in java where it is used for "/** ... */".

     
  • Jirka Kosek
    Jirka Kosek
    2008-07-22

    Logged In: YES
    user_id=189932
    Originator: NO

    I think that there is really not problem with having one more additional style. It is better then abusing/overloading styles. Moreover !DOCTYPE has nothing to do with documentation.

    I think that you should gratify father of project here and emit separate doctype style for !DOCTYPE. Thanks.

    Jirka

     
  • Logged In: YES
    user_id=317406
    Originator: YES

    the final 2.0 version will use "doctype" as default style for the doctype element

     
  • Jirka Kosek
    Jirka Kosek
    2008-07-23

    Logged In: YES
    user_id=189932
    Originator: NO

    Thanks ;-D

     
  • Jirka Kosek
    Jirka Kosek
    2008-07-23

    • status: open --> closed