olelo 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +10 -0
- data/.gitmodules +3 -0
- data/Gemfile +3 -0
- data/README.markdown +104 -0
- data/Rakefile +92 -0
- data/bin/olelo +5 -0
- data/config.ru +86 -0
- data/config/aspects.rb +256 -0
- data/config/config.yml.default +154 -0
- data/config/initializers/00-mime_types.rb +29 -0
- data/config/initializers/01-slim.rb +2 -0
- data/config/interwiki.yml +11 -0
- data/doc/AUTHORS +7 -0
- data/doc/LICENSE +22 -0
- data/lib/olelo.rb +39 -0
- data/lib/olelo/application.rb +294 -0
- data/lib/olelo/attributes.rb +285 -0
- data/lib/olelo/config.rb +88 -0
- data/lib/olelo/extensions.rb +252 -0
- data/lib/olelo/helper.rb +290 -0
- data/lib/olelo/hooks.rb +142 -0
- data/lib/olelo/html_safe.rb +29 -0
- data/lib/olelo/initializer.rb +76 -0
- data/lib/olelo/locale.rb +63 -0
- data/lib/olelo/locale.yml +284 -0
- data/lib/olelo/menu.rb +101 -0
- data/lib/olelo/middleware/blacklist.rb +25 -0
- data/lib/olelo/middleware/degrade_mime_type.rb +19 -0
- data/lib/olelo/middleware/flash.rb +97 -0
- data/lib/olelo/middleware/force_encoding.rb +41 -0
- data/lib/olelo/page.rb +266 -0
- data/lib/olelo/patch.rb +311 -0
- data/lib/olelo/plugin.rb +188 -0
- data/lib/olelo/repository.rb +225 -0
- data/lib/olelo/routing.rb +223 -0
- data/lib/olelo/templates.rb +30 -0
- data/lib/olelo/user.rb +132 -0
- data/lib/olelo/util.rb +233 -0
- data/lib/olelo/version.rb +3 -0
- data/lib/olelo/virtualfs.rb +161 -0
- data/lib/rack/olelo_patches.rb +33 -0
- data/lib/rack/relative_redirect.rb +44 -0
- data/lib/rack/static_cache.rb +93 -0
- data/lib/yard/addons.rb +1 -0
- data/lib/yard/addons/hook_handler.rb +25 -0
- data/lib/yard/addons/override_tag.rb +14 -0
- data/lib/yard/addons/route_handler.rb +33 -0
- data/lib/yard/addons/sanitize_anchor.rb +16 -0
- data/olelo.gemspec +31 -0
- data/plugins/aspects/changelog.rb +45 -0
- data/plugins/aspects/documentbrowser.rb +57 -0
- data/plugins/aspects/download.rb +11 -0
- data/plugins/aspects/highlight.rb +8 -0
- data/plugins/aspects/image.rb +41 -0
- data/plugins/aspects/imageinfo.rb +64 -0
- data/plugins/aspects/locale.yml +60 -0
- data/plugins/aspects/main.rb +199 -0
- data/plugins/aspects/pageinfo.rb +37 -0
- data/plugins/aspects/source.rb +6 -0
- data/plugins/aspects/subpages.rb +44 -0
- data/plugins/aspects/text.rb +9 -0
- data/plugins/blog/blog.css +1 -0
- data/plugins/blog/blog.scss +37 -0
- data/plugins/blog/locale.yml +12 -0
- data/plugins/blog/main.rb +85 -0
- data/plugins/editor/locale.yml +18 -0
- data/plugins/editor/markup/main.rb +3 -0
- data/plugins/editor/markup/script.js +10 -0
- data/plugins/editor/markup/script/00-jquery.textselection.js +267 -0
- data/plugins/editor/markup/script/01-olelo.markupeditor.js +116 -0
- data/plugins/editor/markup/script/init.js +10 -0
- data/plugins/editor/preview.rb +52 -0
- data/plugins/editor/recaptcha.rb +56 -0
- data/plugins/filters/creole.rb +37 -0
- data/plugins/filters/disposition.rb +9 -0
- data/plugins/filters/editsection.rb +67 -0
- data/plugins/filters/fix_img_tag.rb +16 -0
- data/plugins/filters/html_wrapper.rb +12 -0
- data/plugins/filters/interwiki.rb +19 -0
- data/plugins/filters/link_classifier.rb +26 -0
- data/plugins/filters/locale.yml +15 -0
- data/plugins/filters/main.rb +202 -0
- data/plugins/filters/markdown_nowiki.rb +15 -0
- data/plugins/filters/numbering.xsl +93 -0
- data/plugins/filters/orgmode.rb +6 -0
- data/plugins/filters/rubypants.rb +6 -0
- data/plugins/filters/s5/main.rb +32 -0
- data/plugins/filters/s5/s5.xsl +118 -0
- data/plugins/filters/tilt.rb +17 -0
- data/plugins/filters/toc.rb +50 -0
- data/plugins/filters/xhtml2latex.xsl +232 -0
- data/plugins/filters/xslt.rb +22 -0
- data/plugins/gallery/gallery.css +1 -0
- data/plugins/gallery/gallery.scss +28 -0
- data/plugins/gallery/main.rb +34 -0
- data/plugins/misc/fancybox/images/blank.gif +0 -0
- data/plugins/misc/fancybox/images/fancy_close.png +0 -0
- data/plugins/misc/fancybox/images/fancy_loading.png +0 -0
- data/plugins/misc/fancybox/images/fancy_nav_left.png +0 -0
- data/plugins/misc/fancybox/images/fancy_nav_right.png +0 -0
- data/plugins/misc/fancybox/images/fancy_shadow_e.png +0 -0
- data/plugins/misc/fancybox/images/fancy_shadow_n.png +0 -0
- data/plugins/misc/fancybox/images/fancy_shadow_ne.png +0 -0
- data/plugins/misc/fancybox/images/fancy_shadow_nw.png +0 -0
- data/plugins/misc/fancybox/images/fancy_shadow_s.png +0 -0
- data/plugins/misc/fancybox/images/fancy_shadow_se.png +0 -0
- data/plugins/misc/fancybox/images/fancy_shadow_sw.png +0 -0
- data/plugins/misc/fancybox/images/fancy_shadow_w.png +0 -0
- data/plugins/misc/fancybox/images/fancy_title_left.png +0 -0
- data/plugins/misc/fancybox/images/fancy_title_main.png +0 -0
- data/plugins/misc/fancybox/images/fancy_title_over.png +0 -0
- data/plugins/misc/fancybox/images/fancy_title_right.png +0 -0
- data/plugins/misc/fancybox/images/fancybox-x.png +0 -0
- data/plugins/misc/fancybox/images/fancybox-y.png +0 -0
- data/plugins/misc/fancybox/images/fancybox.png +0 -0
- data/plugins/misc/fancybox/jquery.fancybox.css +1 -0
- data/plugins/misc/fancybox/jquery.fancybox.scss +323 -0
- data/plugins/misc/fancybox/main.rb +4 -0
- data/plugins/misc/fancybox/script.js +37 -0
- data/plugins/misc/fancybox/script/00-jquery.mousewheel.js +84 -0
- data/plugins/misc/fancybox/script/01-jquery.easing.js +205 -0
- data/plugins/misc/fancybox/script/02-jquery.fancybox.js +1156 -0
- data/plugins/misc/fancybox/script/init.js +18 -0
- data/plugins/misc/system.rb +192 -0
- data/plugins/misc/variables.rb +29 -0
- data/plugins/misc/webdav.rb +45 -0
- data/plugins/repositories/git_grep.rb +69 -0
- data/plugins/repositories/gitrb_repository.rb +204 -0
- data/plugins/repositories/locale.yml +12 -0
- data/plugins/repositories/rugged_repository.rb +454 -0
- data/plugins/security/acl.rb +57 -0
- data/plugins/security/basic_auth.rb +21 -0
- data/plugins/security/locale.yml +21 -0
- data/plugins/security/persistent_login.rb +32 -0
- data/plugins/security/portal.rb +28 -0
- data/plugins/security/private_wiki.rb +24 -0
- data/plugins/security/readonly_wiki.rb +25 -0
- data/plugins/security/stack.rb +20 -0
- data/plugins/security/yamlfile.rb +66 -0
- data/plugins/tags/code.rb +6 -0
- data/plugins/tags/footnotes.rb +35 -0
- data/plugins/tags/gist-embed.css +123 -0
- data/plugins/tags/gist.rb +13 -0
- data/plugins/tags/html.rb +57 -0
- data/plugins/tags/include.rb +20 -0
- data/plugins/tags/main.rb +353 -0
- data/plugins/tags/math.rb +117 -0
- data/plugins/tags/scripting.rb +64 -0
- data/plugins/tags/sort.rb +7 -0
- data/plugins/tags/tabs.rb +20 -0
- data/plugins/treeview/images/collapsed.png +0 -0
- data/plugins/treeview/images/expanded.png +0 -0
- data/plugins/treeview/images/menu.png +0 -0
- data/plugins/treeview/images/tree.png +0 -0
- data/plugins/treeview/images/wait.gif +0 -0
- data/plugins/treeview/main.rb +16 -0
- data/plugins/treeview/script.js +5 -0
- data/plugins/treeview/script/00-jquery.treeview.js +164 -0
- data/plugins/treeview/script/init.js +25 -0
- data/plugins/treeview/treeview.css +1 -0
- data/plugins/treeview/treeview.scss +113 -0
- data/plugins/utils/assets.rb +74 -0
- data/plugins/utils/cache.rb +53 -0
- data/plugins/utils/image_magick.rb +34 -0
- data/plugins/utils/pygments.css +1 -0
- data/plugins/utils/pygments.rb +50 -0
- data/plugins/utils/pygments.scss +83 -0
- data/plugins/utils/semaphore.rb +50 -0
- data/plugins/utils/shell.rb +45 -0
- data/plugins/utils/store.rb +315 -0
- data/plugins/utils/worker.rb +36 -0
- data/plugins/utils/xml.rb +29 -0
- data/static/images/favicon.png +0 -0
- data/static/script.js +267 -0
- data/static/script/00-json2.js +486 -0
- data/static/script/01-jstorage.js +217 -0
- data/static/script/02-jquery.js +9440 -0
- data/static/script/03-jquery.ui.core.js +337 -0
- data/static/script/04-jquery.ui.widget.js +502 -0
- data/static/script/05-jquery.ui.position.js +517 -0
- data/static/script/06-jquery.ui.menu.js +609 -0
- data/static/script/07-jquery.ui.autocomplete.js +601 -0
- data/static/script/08-olelo.i18n.js +37 -0
- data/static/script/09-olelo.unsaved.js +68 -0
- data/static/script/10-olelo.historytable.js +40 -0
- data/static/script/11-olelo.pagination.js +18 -0
- data/static/script/13-olelo.tabwidget.js +57 -0
- data/static/script/14-olelo.timeago.js +70 -0
- data/static/script/15-olelo.underliner.js +31 -0
- data/static/script/16-olelo.ui.combobox.js +32 -0
- data/static/script/init.js +48 -0
- data/static/themes/atlantis/constants.scss +15 -0
- data/static/themes/atlantis/iehacks.scss +38 -0
- data/static/themes/atlantis/images/actions/delete.png +0 -0
- data/static/themes/atlantis/images/actions/edit.png +0 -0
- data/static/themes/atlantis/images/actions/history.png +0 -0
- data/static/themes/atlantis/images/actions/home.png +0 -0
- data/static/themes/atlantis/images/actions/move.png +0 -0
- data/static/themes/atlantis/images/actions/new.png +0 -0
- data/static/themes/atlantis/images/actions/page.png +0 -0
- data/static/themes/atlantis/images/bg/button.png +0 -0
- data/static/themes/atlantis/images/bg/container.png +0 -0
- data/static/themes/atlantis/images/bg/content.png +0 -0
- data/static/themes/atlantis/images/bg/footer.png +0 -0
- data/static/themes/atlantis/images/bg/header.jpg +0 -0
- data/static/themes/atlantis/images/bg/header.orig.jpg +0 -0
- data/static/themes/atlantis/images/bg/header_gray.jpg +0 -0
- data/static/themes/atlantis/images/bug.png +0 -0
- data/static/themes/atlantis/images/filetypes/7z.png +0 -0
- data/static/themes/atlantis/images/filetypes/_archive.png +0 -0
- data/static/themes/atlantis/images/filetypes/_audio.png +0 -0
- data/static/themes/atlantis/images/filetypes/_code.png +0 -0
- data/static/themes/atlantis/images/filetypes/_linux.png +0 -0
- data/static/themes/atlantis/images/filetypes/_picture.png +0 -0
- data/static/themes/atlantis/images/filetypes/_video.png +0 -0
- data/static/themes/atlantis/images/filetypes/bz2.png +0 -0
- data/static/themes/atlantis/images/filetypes/doc.png +0 -0
- data/static/themes/atlantis/images/filetypes/flac.png +0 -0
- data/static/themes/atlantis/images/filetypes/gz.png +0 -0
- data/static/themes/atlantis/images/filetypes/html.png +0 -0
- data/static/themes/atlantis/images/filetypes/java.png +0 -0
- data/static/themes/atlantis/images/filetypes/jpg.png +0 -0
- data/static/themes/atlantis/images/filetypes/midi.png +0 -0
- data/static/themes/atlantis/images/filetypes/mp3.png +0 -0
- data/static/themes/atlantis/images/filetypes/ogg.png +0 -0
- data/static/themes/atlantis/images/filetypes/pdf.png +0 -0
- data/static/themes/atlantis/images/filetypes/php.png +0 -0
- data/static/themes/atlantis/images/filetypes/png.png +0 -0
- data/static/themes/atlantis/images/filetypes/ppt.png +0 -0
- data/static/themes/atlantis/images/filetypes/psd.png +0 -0
- data/static/themes/atlantis/images/filetypes/rar.png +0 -0
- data/static/themes/atlantis/images/filetypes/rb.png +0 -0
- data/static/themes/atlantis/images/filetypes/sh.png +0 -0
- data/static/themes/atlantis/images/filetypes/tar.png +0 -0
- data/static/themes/atlantis/images/filetypes/txt.png +0 -0
- data/static/themes/atlantis/images/filetypes/wma.png +0 -0
- data/static/themes/atlantis/images/filetypes/xls.png +0 -0
- data/static/themes/atlantis/images/filetypes/zip.png +0 -0
- data/static/themes/atlantis/images/folder.png +0 -0
- data/static/themes/atlantis/images/folder_open.png +0 -0
- data/static/themes/atlantis/images/loading.gif +0 -0
- data/static/themes/atlantis/images/loading.xcf +0 -0
- data/static/themes/atlantis/images/not_found.png +0 -0
- data/static/themes/atlantis/images/page.png +0 -0
- data/static/themes/atlantis/images/search.png +0 -0
- data/static/themes/atlantis/layout.scss +115 -0
- data/static/themes/atlantis/menu.scss +99 -0
- data/static/themes/atlantis/print.scss +129 -0
- data/static/themes/atlantis/screen.scss +495 -0
- data/static/themes/atlantis/style.css +3 -0
- data/static/themes/lib/autocomplete.scss +39 -0
- data/static/themes/lib/headlines.scss +10 -0
- data/static/themes/lib/horizontal-list.scss +31 -0
- data/static/themes/lib/patch.scss +88 -0
- data/static/themes/lib/reset.scss +114 -0
- data/static/themes/lib/rounded.scss +46 -0
- data/static/themes/lib/shadow.scss +14 -0
- data/test/config_test.rb +28 -0
- data/test/factory_test.rb +29 -0
- data/test/hash_extensions_test.rb +16 -0
- data/test/helper.rb +38 -0
- data/test/hooks_test.rb +85 -0
- data/test/object_extensions_test.rb +20 -0
- data/test/page_test.rb +168 -0
- data/test/request_test.rb +166 -0
- data/test/string_extensions_test.rb +32 -0
- data/test/templates_test.rb +39 -0
- data/test/util_test.rb +71 -0
- data/views/changes.slim +22 -0
- data/views/compare.slim +8 -0
- data/views/delete.slim +9 -0
- data/views/deleted.slim +2 -0
- data/views/edit.slim +65 -0
- data/views/error.slim +6 -0
- data/views/history.slim +20 -0
- data/views/layout.slim +38 -0
- data/views/login.slim +37 -0
- data/views/move.slim +10 -0
- data/views/not_found.slim +6 -0
- data/views/profile.slim +26 -0
- data/views/show.slim +9 -0
- metadata +488 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
description 'Markdown nowiki filter'
|
|
2
|
+
|
|
3
|
+
Filter.create :markdown_nowiki do |context, content|
|
|
4
|
+
output = ''
|
|
5
|
+
until content.blank?
|
|
6
|
+
case content
|
|
7
|
+
when /(\A( {4}|\t).*)|(\A``.*?``)|(\A`[^`]*`)/
|
|
8
|
+
output << "<notags>#{$&}</notags>"
|
|
9
|
+
when /(\A[^`\n]+)|(\A\n+)/
|
|
10
|
+
output << $&
|
|
11
|
+
end
|
|
12
|
+
content = $'
|
|
13
|
+
end
|
|
14
|
+
output
|
|
15
|
+
end
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!--
|
|
3
|
+
Add headline numbering to XHTML
|
|
4
|
+
-->
|
|
5
|
+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
6
|
+
xmlns:xhtml="http://www.w3.org/1999/xhtml" version="1.0">
|
|
7
|
+
|
|
8
|
+
<xsl:output method="xml"
|
|
9
|
+
version="1.0"
|
|
10
|
+
encoding="UTF-8"
|
|
11
|
+
doctype-public="-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
|
|
12
|
+
doctype-system="http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" indent="yes"/>
|
|
13
|
+
|
|
14
|
+
<xsl:strip-space elements="*"/>
|
|
15
|
+
|
|
16
|
+
<!-- Identity template -->
|
|
17
|
+
<xsl:template match="@*|node()">
|
|
18
|
+
<xsl:copy>
|
|
19
|
+
<xsl:apply-templates select="@*|node()"/>
|
|
20
|
+
</xsl:copy>
|
|
21
|
+
</xsl:template>
|
|
22
|
+
|
|
23
|
+
<xsl:template match="xhtml:h2">
|
|
24
|
+
<xsl:variable name="number">
|
|
25
|
+
<xsl:number count="xhtml:h2" level="any"/>
|
|
26
|
+
</xsl:variable>
|
|
27
|
+
<h2 id="s{$number}">
|
|
28
|
+
<span class="number"><xsl:value-of select="$number"/></span>
|
|
29
|
+
<xsl:text>
|
|
30
|
+
</xsl:text>
|
|
31
|
+
<xsl:apply-templates select="@*|node()"/>
|
|
32
|
+
</h2>
|
|
33
|
+
</xsl:template>
|
|
34
|
+
|
|
35
|
+
<xsl:template match="xhtml:h3">
|
|
36
|
+
<xsl:variable name="number">
|
|
37
|
+
<xsl:number count="xhtml:h2" level="any" format="1."/>
|
|
38
|
+
<xsl:number count="xhtml:h3" from="xhtml:h2" level="any"/>
|
|
39
|
+
</xsl:variable>
|
|
40
|
+
<h3 id="s{$number}">
|
|
41
|
+
<span class="number"><xsl:value-of select="$number"/></span>
|
|
42
|
+
<xsl:text>
|
|
43
|
+
</xsl:text>
|
|
44
|
+
<xsl:apply-templates select="@*|node()"/>
|
|
45
|
+
</h3>
|
|
46
|
+
</xsl:template>
|
|
47
|
+
|
|
48
|
+
<xsl:template match="xhtml:h4">
|
|
49
|
+
<xsl:variable name="number">
|
|
50
|
+
<xsl:number count="xhtml:h2" level="any" format="1."/>
|
|
51
|
+
<xsl:number count="xhtml:h3" from="xhtml:h2" level="any" format="1."/>
|
|
52
|
+
<xsl:number count="xhtml:h4" from="xhtml:h3" level="any"/>
|
|
53
|
+
</xsl:variable>
|
|
54
|
+
<h4 id="s{$number}">
|
|
55
|
+
<span class="number"><xsl:value-of select="$number"/></span>
|
|
56
|
+
<xsl:text>
|
|
57
|
+
</xsl:text>
|
|
58
|
+
<xsl:apply-templates select="@*|node()"/>
|
|
59
|
+
</h4>
|
|
60
|
+
</xsl:template>
|
|
61
|
+
|
|
62
|
+
<xsl:template match="xhtml:h5">
|
|
63
|
+
<xsl:variable name="number">
|
|
64
|
+
<xsl:number count="xhtml:h2" level="any" format="1."/>
|
|
65
|
+
<xsl:number count="xhtml:h3" from="xhtml:h2" level="any" format="1."/>
|
|
66
|
+
<xsl:number count="xhtml:h4" from="xhtml:h3" level="any" format="1."/>
|
|
67
|
+
<xsl:number count="xhtml:h5" from="xhtml:h4" level="any"/>
|
|
68
|
+
</xsl:variable>
|
|
69
|
+
<h5 id="s{$number}">
|
|
70
|
+
<span><xsl:value-of select="$number"/></span>
|
|
71
|
+
<xsl:text>
|
|
72
|
+
</xsl:text>
|
|
73
|
+
<xsl:apply-templates select="@*|node()"/>
|
|
74
|
+
</h5>
|
|
75
|
+
</xsl:template>
|
|
76
|
+
|
|
77
|
+
<xsl:template match="xhtml:h6">
|
|
78
|
+
<xsl:variable name="number">
|
|
79
|
+
<xsl:number count="xhtml:h2" level="any" format="1."/>
|
|
80
|
+
<xsl:number count="xhtml:h3" from="xhtml:h2" level="any" format="1."/>
|
|
81
|
+
<xsl:number count="xhtml:h4" from="xhtml:h3" level="any" format="1."/>
|
|
82
|
+
<xsl:number count="xhtml:h5" from="xhtml:h4" level="any" format="1."/>
|
|
83
|
+
<xsl:number count="xhtml:h6" from="xhtml:h5" level="any"/>
|
|
84
|
+
</xsl:variable>
|
|
85
|
+
<h6 id="s{$number}">
|
|
86
|
+
<span class="number"><xsl:value-of select="$number"/></span>
|
|
87
|
+
<xsl:text>
|
|
88
|
+
</xsl:text>
|
|
89
|
+
<xsl:apply-templates select="@*|node()"/>
|
|
90
|
+
</h6>
|
|
91
|
+
</xsl:template>
|
|
92
|
+
|
|
93
|
+
</xsl:stylesheet>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
description 'XSLT filter which transforms a html page to a S5 presentation'
|
|
2
|
+
dependencies 'filters/xslt', 'utils/assets'
|
|
3
|
+
export_assets 'ui/**/*', 'ui/default/*'
|
|
4
|
+
|
|
5
|
+
Page.attributes do
|
|
6
|
+
group :s5 do
|
|
7
|
+
string :presdate
|
|
8
|
+
string :author
|
|
9
|
+
string :company
|
|
10
|
+
string :theme
|
|
11
|
+
string :transitions
|
|
12
|
+
integer :fadeDuration
|
|
13
|
+
integer :incrDuration
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
class S5 < XSLT
|
|
18
|
+
def configure(options)
|
|
19
|
+
super(options.merge(:stylesheet => 's5/s5.xsl'))
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def params(context)
|
|
23
|
+
themes = Dir.glob(File.join(File.dirname(__FILE__), 'ui', '*')).map {|name| File.basename(name) }
|
|
24
|
+
themes.delete('common')
|
|
25
|
+
themes.delete('default')
|
|
26
|
+
themes.unshift(context.page.attributes['theme'] || 'default')
|
|
27
|
+
super.merge(context.page.attributes['s5'] || {}).
|
|
28
|
+
merge('themes' => themes.join(' '), 's5_path' => build_path('_/assets/filter/s5'))
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
Filter.register :s5, S5
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<xsl:stylesheet version="1.0"
|
|
3
|
+
xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
|
4
|
+
xmlns="http://www.w3.org/1999/xhtml"
|
|
5
|
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
6
|
+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
7
|
+
exclude-result-prefixes="xhtml xsl xs">
|
|
8
|
+
|
|
9
|
+
<xsl:param name="s5_path"/>
|
|
10
|
+
<xsl:param name="title"/>
|
|
11
|
+
<xsl:param name="presdate"/>
|
|
12
|
+
<xsl:param name="author"/>
|
|
13
|
+
<xsl:param name="company"/>
|
|
14
|
+
<xsl:param name="themes"/>
|
|
15
|
+
<xsl:param name="transitions"/>
|
|
16
|
+
<xsl:param name="fadeDuration"/>
|
|
17
|
+
<xsl:param name="incrDuration"/>
|
|
18
|
+
|
|
19
|
+
<xsl:output method="xml"
|
|
20
|
+
version="1.0"
|
|
21
|
+
encoding="UTF-8"
|
|
22
|
+
doctype-public="-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
|
|
23
|
+
doctype-system="http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" indent="yes"/>
|
|
24
|
+
|
|
25
|
+
<xsl:strip-space elements="*"/>
|
|
26
|
+
|
|
27
|
+
<!-- Identity template -->
|
|
28
|
+
<xsl:template match="@*|node()">
|
|
29
|
+
<xsl:copy>
|
|
30
|
+
<xsl:apply-templates select="@*|node()"/>
|
|
31
|
+
</xsl:copy>
|
|
32
|
+
</xsl:template>
|
|
33
|
+
|
|
34
|
+
<xsl:template name="slidecontent">
|
|
35
|
+
<xsl:param name="current"/>
|
|
36
|
+
<xsl:for-each select="child::node()[name() != 'h1' and name() != 'h2' and name() != 'h3' and name() != 'h4' and name() != 'h5' and name() != 'h6' and
|
|
37
|
+
(preceding::xhtml:h1|preceding::xhtml:h2|preceding::xhtml:h3|preceding::xhtml:h4|preceding::xhtml:h5|preceding::xhtml:h6)[last()] = $current]">
|
|
38
|
+
<xsl:copy>
|
|
39
|
+
<xsl:copy-of select="@*"/>
|
|
40
|
+
<xsl:call-template name="slidecontent">
|
|
41
|
+
<xsl:with-param name="current" select="$current"/>
|
|
42
|
+
</xsl:call-template>
|
|
43
|
+
</xsl:copy>
|
|
44
|
+
</xsl:for-each>
|
|
45
|
+
</xsl:template>
|
|
46
|
+
|
|
47
|
+
<xsl:template name="slides">
|
|
48
|
+
<xsl:for-each select="//xhtml:h1|//xhtml:h2|//xhtml:h3|//xhtml:h4|//xhtml:h5|//xhtml:h6">
|
|
49
|
+
<div class="slide">
|
|
50
|
+
<h1><xsl:apply-templates select="@*|node()"/></h1>
|
|
51
|
+
<div class="slidecontent">
|
|
52
|
+
<xsl:variable name="current" select="."/>
|
|
53
|
+
<xsl:for-each select="following-sibling::node()[name() != 'h1' and name() != 'h2' and name() != 'h3' and name() != 'h4' and name() != 'h5' and name() != 'h6' and
|
|
54
|
+
(preceding::xhtml:h1|preceding::xhtml:h2|preceding::xhtml:h3|preceding::xhtml:h4|preceding::xhtml:h5|preceding::xhtml:h6)[last()] = $current]">
|
|
55
|
+
<xsl:copy>
|
|
56
|
+
<xsl:copy-of select="@*"/>
|
|
57
|
+
<xsl:call-template name="slidecontent">
|
|
58
|
+
<xsl:with-param name="current" select="$current"/>
|
|
59
|
+
</xsl:call-template>
|
|
60
|
+
</xsl:copy>
|
|
61
|
+
</xsl:for-each>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</xsl:for-each>
|
|
65
|
+
</xsl:template>
|
|
66
|
+
|
|
67
|
+
<xsl:template match="xhtml:head">
|
|
68
|
+
<xsl:copy>
|
|
69
|
+
<xsl:apply-templates select="@*|node()"/>
|
|
70
|
+
<!-- metadata -->
|
|
71
|
+
<meta name="generator" content="S5"/>
|
|
72
|
+
<meta name="version" content="S5 1.3"/>
|
|
73
|
+
<xsl:if test="$presdate"><meta name="presdate" content="{$presdate}"/></xsl:if>
|
|
74
|
+
<xsl:if test="$author"><meta name="author" content="{$author}"/></xsl:if>
|
|
75
|
+
<xsl:if test="$company"><meta name="company" content="{$company}"/></xsl:if>
|
|
76
|
+
<!-- configuration parameters -->
|
|
77
|
+
<xsl:if test="$transitions"><meta name="transitions" content="{$transitions}"/></xsl:if>
|
|
78
|
+
<xsl:if test="$fadeDuration"><meta name="fadeDuration" content="{$fadeDuration}"/></xsl:if>
|
|
79
|
+
<xsl:if test="$incrDuration"><meta name="incrDuration" content="{$incrDuration}"/></xsl:if>
|
|
80
|
+
<meta name="themes" content="{$themes}"/>
|
|
81
|
+
<xsl:value-of select="concat('<script src="', $s5_path, '/ui/common/jquery.js" type="text/javascript"></script>')"
|
|
82
|
+
disable-output-escaping="yes"/>
|
|
83
|
+
<xsl:value-of select="concat('<script src="', $s5_path, '/ui/common/s5.js" type="text/javascript"></script>')"
|
|
84
|
+
disable-output-escaping="yes"/>
|
|
85
|
+
</xsl:copy>
|
|
86
|
+
</xsl:template>
|
|
87
|
+
|
|
88
|
+
<xsl:template name="first-slide">
|
|
89
|
+
<xsl:for-each select="child::node()[name() != 'h1' and name() != 'h2' and name() != 'h3' and name() != 'h4' and name() != 'h5' and name() != 'h6' and
|
|
90
|
+
not(preceding::xhtml:h1|preceding::xhtml:h2|preceding::xhtml:h3|preceding::xhtml:h4|preceding::xhtml:h5|preceding::xhtml:h6)]">
|
|
91
|
+
<xsl:copy>
|
|
92
|
+
<xsl:copy-of select="@*"/>
|
|
93
|
+
<xsl:call-template name="first-slide"/>
|
|
94
|
+
</xsl:copy>
|
|
95
|
+
</xsl:for-each>
|
|
96
|
+
</xsl:template>
|
|
97
|
+
|
|
98
|
+
<xsl:template match="xhtml:body">
|
|
99
|
+
<xsl:copy>
|
|
100
|
+
<div class="layout">
|
|
101
|
+
<div id="header"></div>
|
|
102
|
+
<div id="footer">
|
|
103
|
+
<h1><xsl:value-of select="$presdate"/></h1>
|
|
104
|
+
<h2><xsl:value-of select="$title"/></h2>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
<div class="presentation">
|
|
108
|
+
<div class="slide">
|
|
109
|
+
<h1><xsl:value-of select="$title"/></h1>
|
|
110
|
+
<xsl:if test="$author!=''"><h2><xsl:value-of select="$author"/></h2></xsl:if>
|
|
111
|
+
<xsl:call-template name="first-slide"/>
|
|
112
|
+
</div>
|
|
113
|
+
<xsl:call-template name="slides"/>
|
|
114
|
+
</div>
|
|
115
|
+
</xsl:copy>
|
|
116
|
+
</xsl:template>
|
|
117
|
+
|
|
118
|
+
</xsl:stylesheet>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
description 'Tilt filter'
|
|
2
|
+
require 'tilt'
|
|
3
|
+
|
|
4
|
+
class TiltFilter < Filter
|
|
5
|
+
def filter(context, content)
|
|
6
|
+
::Tilt[name].new { content }.render
|
|
7
|
+
end
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
[:markdown, :textile, :sass, :scss, :less, :rdoc, :coffee, :mediawiki].each do |name|
|
|
11
|
+
begin
|
|
12
|
+
::Tilt[name].new { '' } # Force initialization of tilt library
|
|
13
|
+
Filter.register(name, TiltFilter)
|
|
14
|
+
rescue Exception => ex
|
|
15
|
+
Olelo.logger.warn "Could not load Tilt filter #{name}"
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
description 'Auto-generated table of contents'
|
|
2
|
+
dependencies 'utils/xml'
|
|
3
|
+
|
|
4
|
+
Page.attributes do
|
|
5
|
+
boolean :toc
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
Filter.create :toc do |context, content|
|
|
9
|
+
return content if !context.page.attributes['toc']
|
|
10
|
+
|
|
11
|
+
doc = XML::Fragment(content)
|
|
12
|
+
toc = ''
|
|
13
|
+
level = 0
|
|
14
|
+
count = [0]
|
|
15
|
+
|
|
16
|
+
elem = doc.css('h1, h2, h3, h4, h5, h6').first
|
|
17
|
+
offset = elem ? elem.name[1..1].to_i - 1 : 0
|
|
18
|
+
|
|
19
|
+
doc.traverse do |child|
|
|
20
|
+
if child.name =~ /^h(\d)$/
|
|
21
|
+
nr = $1.to_i - offset
|
|
22
|
+
if nr > level
|
|
23
|
+
while nr > level
|
|
24
|
+
toc << (level == 0 ? '<ol class="toc">' : '<ol>')
|
|
25
|
+
count[level] = 0
|
|
26
|
+
level += 1
|
|
27
|
+
toc << '<li>' if nr > level
|
|
28
|
+
end
|
|
29
|
+
else
|
|
30
|
+
while nr < level
|
|
31
|
+
level -= 1
|
|
32
|
+
toc << '</li></ol>'
|
|
33
|
+
end
|
|
34
|
+
toc << '</li>'
|
|
35
|
+
end
|
|
36
|
+
count[level-1] += 1
|
|
37
|
+
headline = child.children.first ? child.children.first.inner_text : ''
|
|
38
|
+
section = ['sec', count[0..level-1], headline.strip.gsub(/[^\w]/, '-')].flatten.join('-').downcase
|
|
39
|
+
toc << %{<li class="toc#{level-offset+1}"><a href="##{section}">#{headline}</a>}
|
|
40
|
+
child.inner_html = %{<span class="number" id="#{section}">#{count[0..level-1].join('.')}</span> #{child.inner_html}}
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
while level > 0
|
|
45
|
+
level -= 1
|
|
46
|
+
toc << '</li></ol>'
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
toc + doc.to_xhtml
|
|
50
|
+
end
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!--
|
|
3
|
+
XHTML to LaTeX Stylesheet von Daniel Mendler <mail at daniel-mendler dot de> (2008)
|
|
4
|
+
-->
|
|
5
|
+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
6
|
+
xmlns:xhtml="http://www.w3.org/1999/xhtml" version="1.0"
|
|
7
|
+
xmlns:chr="http://character-table/">
|
|
8
|
+
|
|
9
|
+
<xsl:output method="text"/>
|
|
10
|
+
<xsl:strip-space elements="*"/>
|
|
11
|
+
<xsl:param name="root_path" />
|
|
12
|
+
<xsl:param name="http_host" />
|
|
13
|
+
|
|
14
|
+
<chr:char-table>
|
|
15
|
+
<chr:char val="&" rep="\&" />
|
|
16
|
+
<chr:char val="$" rep="\$" />
|
|
17
|
+
<chr:char val="#" rep="\#" />
|
|
18
|
+
<chr:char val="%" rep="\%" />
|
|
19
|
+
<chr:char val="_" rep="\_" />
|
|
20
|
+
<chr:char val="{" rep="\{" />
|
|
21
|
+
<chr:char val="}" rep="\}" />
|
|
22
|
+
<chr:char val="^" rep="\^" />
|
|
23
|
+
<chr:char val="~" rep="\~" />
|
|
24
|
+
<chr:char val="\" rep="\textbackslash " />
|
|
25
|
+
<chr:char val=""" rep="''" />
|
|
26
|
+
<chr:char val="°" rep="$^{\circ}$" />
|
|
27
|
+
</chr:char-table>
|
|
28
|
+
|
|
29
|
+
<xsl:template name="string-escape">
|
|
30
|
+
<xsl:param name="string" />
|
|
31
|
+
<xsl:param name="table" select="document('')/xsl:stylesheet/chr:char-table" />
|
|
32
|
+
|
|
33
|
+
<xsl:variable name="len" select="string-length($string)" />
|
|
34
|
+
|
|
35
|
+
<xsl:if test="$len > 0">
|
|
36
|
+
<xsl:variable name="chr" select="substring($string, 1, 1)" />
|
|
37
|
+
<xsl:variable name="rep" select="string($table/chr:char[@val = $chr]/@rep)" />
|
|
38
|
+
<xsl:choose>
|
|
39
|
+
<xsl:when test="string($rep) = ''">
|
|
40
|
+
<xsl:value-of select="$chr" />
|
|
41
|
+
</xsl:when>
|
|
42
|
+
<xsl:otherwise>
|
|
43
|
+
<xsl:value-of select="$rep" />
|
|
44
|
+
</xsl:otherwise>
|
|
45
|
+
</xsl:choose>
|
|
46
|
+
|
|
47
|
+
<xsl:call-template name="string-escape">
|
|
48
|
+
<xsl:with-param name="string" select="substring($string, 2, $len div 2)" />
|
|
49
|
+
<xsl:with-param name="table" select="$table" />
|
|
50
|
+
</xsl:call-template>
|
|
51
|
+
|
|
52
|
+
<xsl:call-template name="string-escape">
|
|
53
|
+
<xsl:with-param name="string" select="substring($string, 2 + $len div 2, $len div 2)" />
|
|
54
|
+
<xsl:with-param name="table" select="$table" />
|
|
55
|
+
</xsl:call-template>
|
|
56
|
+
</xsl:if>
|
|
57
|
+
</xsl:template>
|
|
58
|
+
|
|
59
|
+
<xsl:template name="include-image">
|
|
60
|
+
<xsl:param name="src" />
|
|
61
|
+
<xsl:choose>
|
|
62
|
+
<xsl:when test="contains($src, '?')">
|
|
63
|
+
<xsl:text>\includegraphics{</xsl:text><xsl:value-of select="substring-before($src, '?')"/><xsl:text>}</xsl:text>
|
|
64
|
+
</xsl:when>
|
|
65
|
+
<xsl:otherwise>
|
|
66
|
+
<xsl:text>\includegraphics{</xsl:text><xsl:value-of select="$src"/><xsl:text>}</xsl:text>
|
|
67
|
+
</xsl:otherwise>
|
|
68
|
+
</xsl:choose>
|
|
69
|
+
</xsl:template>
|
|
70
|
+
|
|
71
|
+
<xsl:template match="//text()">
|
|
72
|
+
<xsl:call-template name="string-escape">
|
|
73
|
+
<xsl:with-param name="string" select="."/>
|
|
74
|
+
</xsl:call-template>
|
|
75
|
+
</xsl:template>
|
|
76
|
+
|
|
77
|
+
<xsl:template match="xhtml:html">\documentclass[a4paper,10pt]{article}
|
|
78
|
+
\usepackage[utf8]{inputenc}
|
|
79
|
+
\usepackage[ngerman]{babel}
|
|
80
|
+
\usepackage{longtable}
|
|
81
|
+
\usepackage[pdftex]{graphicx}
|
|
82
|
+
\usepackage{float}
|
|
83
|
+
\usepackage[colorlinks=true,urlcolor=blue,linkcolor=blue]{hyperref}
|
|
84
|
+
\usepackage{geometry}
|
|
85
|
+
\geometry{a4paper,left=2cm,right=2cm,top=2cm,bottom=2cm}
|
|
86
|
+
\setlength{\parindent}{0pt}
|
|
87
|
+
\renewcommand{\familydefault}{phv}
|
|
88
|
+
\renewcommand{\rmdefault}{phv}
|
|
89
|
+
\usefont{\encodingdefault}{\familydefault}{\seriesdefault}{\shapedefault}
|
|
90
|
+
\graphicspath{
|
|
91
|
+
{<xsl:value-of select="$root_path"/>}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
\begin{document}
|
|
95
|
+
|
|
96
|
+
<xsl:apply-templates select="xhtml:body"/>\end{document}
|
|
97
|
+
</xsl:template>
|
|
98
|
+
|
|
99
|
+
<xsl:template match="xhtml:h1">
|
|
100
|
+
<xsl:text>\section*{</xsl:text>
|
|
101
|
+
<xsl:apply-templates/>
|
|
102
|
+
<xsl:text>} </xsl:text>
|
|
103
|
+
</xsl:template>
|
|
104
|
+
|
|
105
|
+
<xsl:template match="xhtml:h2">
|
|
106
|
+
<xsl:text>\subsection*{</xsl:text>
|
|
107
|
+
<xsl:apply-templates/>
|
|
108
|
+
<xsl:text>} </xsl:text>
|
|
109
|
+
</xsl:template>
|
|
110
|
+
|
|
111
|
+
<xsl:template match="xhtml:h3">
|
|
112
|
+
<xsl:text>\subsubsection*{</xsl:text>
|
|
113
|
+
<xsl:apply-templates/>
|
|
114
|
+
<xsl:text>} </xsl:text>
|
|
115
|
+
</xsl:template>
|
|
116
|
+
|
|
117
|
+
<xsl:template match="xhtml:br">
|
|
118
|
+
<xsl:text> </xsl:text>
|
|
119
|
+
</xsl:template>
|
|
120
|
+
|
|
121
|
+
<xsl:template match="xhtml:em">
|
|
122
|
+
<xsl:text>{\em </xsl:text>
|
|
123
|
+
<xsl:apply-templates/>
|
|
124
|
+
<xsl:text>}</xsl:text>
|
|
125
|
+
</xsl:template>
|
|
126
|
+
|
|
127
|
+
<xsl:template match="xhtml:img[@class='math']">
|
|
128
|
+
<xsl:text>\begin{equation}</xsl:text>
|
|
129
|
+
<xsl:value-of select="@alt"/>
|
|
130
|
+
<xsl:text>\end{equation}</xsl:text>
|
|
131
|
+
</xsl:template>
|
|
132
|
+
|
|
133
|
+
<xsl:template match="xhtml:table//xhtml:img">
|
|
134
|
+
<xsl:call-template name="include-image">
|
|
135
|
+
<xsl:with-param name="src" select="@src"/>
|
|
136
|
+
</xsl:call-template>
|
|
137
|
+
</xsl:template>
|
|
138
|
+
|
|
139
|
+
<xsl:template match="xhtml:img">
|
|
140
|
+
<xsl:text>\begin{figure}</xsl:text>
|
|
141
|
+
<xsl:text>\centering</xsl:text>
|
|
142
|
+
<xsl:call-template name="include-image">
|
|
143
|
+
<xsl:with-param name="src" select="@src"/>
|
|
144
|
+
</xsl:call-template>
|
|
145
|
+
<xsl:text>\end{figure}</xsl:text>
|
|
146
|
+
</xsl:template>
|
|
147
|
+
|
|
148
|
+
<xsl:template match="xhtml:strong">
|
|
149
|
+
<xsl:text>{\bf </xsl:text>
|
|
150
|
+
<xsl:apply-templates/>
|
|
151
|
+
<xsl:text>}</xsl:text>
|
|
152
|
+
</xsl:template>
|
|
153
|
+
|
|
154
|
+
<xsl:template match="xhtml:p">
|
|
155
|
+
<xsl:text>\par </xsl:text>
|
|
156
|
+
<xsl:apply-templates/>
|
|
157
|
+
<xsl:text> \par </xsl:text>
|
|
158
|
+
</xsl:template>
|
|
159
|
+
|
|
160
|
+
<xsl:template match="xhtml:a">
|
|
161
|
+
<xsl:choose>
|
|
162
|
+
<xsl:when test="starts-with(@href, 'http') or starts-with(@href, 'mailto')">
|
|
163
|
+
<xsl:text>\href{</xsl:text><xsl:value-of select="@href"/>}{<xsl:apply-templates/><xsl:text>}</xsl:text>
|
|
164
|
+
</xsl:when>
|
|
165
|
+
<xsl:otherwise>
|
|
166
|
+
<xsl:text>\href{</xsl:text><xsl:value-of select="concat($http_host, @href)"/>}{<xsl:apply-templates/><xsl:text>}</xsl:text>
|
|
167
|
+
</xsl:otherwise>
|
|
168
|
+
</xsl:choose>
|
|
169
|
+
</xsl:template>
|
|
170
|
+
|
|
171
|
+
<xsl:template match="xhtml:select|xhtml:input"/>
|
|
172
|
+
|
|
173
|
+
<xsl:template match="xhtml:table">
|
|
174
|
+
<xsl:text>\begin{table}[H]</xsl:text>
|
|
175
|
+
<xsl:for-each select="xhtml:caption">
|
|
176
|
+
<xsl:text>\caption{</xsl:text>
|
|
177
|
+
<xsl:apply-templates/>
|
|
178
|
+
<xsl:text>} </xsl:text>
|
|
179
|
+
</xsl:for-each>
|
|
180
|
+
<xsl:text>\begin{longtable}{|</xsl:text>
|
|
181
|
+
<xsl:for-each select="//xhtml:tr[1]/*">
|
|
182
|
+
<xsl:text>l|</xsl:text>
|
|
183
|
+
</xsl:for-each>
|
|
184
|
+
<xsl:text>} </xsl:text>
|
|
185
|
+
<xsl:apply-templates select="*[not(self::xhtml:caption)]"/>
|
|
186
|
+
<xsl:text>\hline </xsl:text>
|
|
187
|
+
<xsl:text>\end{longtable} \end{table} </xsl:text>
|
|
188
|
+
</xsl:template>
|
|
189
|
+
|
|
190
|
+
<xsl:template match="xhtml:thead">
|
|
191
|
+
<xsl:apply-templates/>
|
|
192
|
+
\hline
|
|
193
|
+
</xsl:template>
|
|
194
|
+
|
|
195
|
+
<xsl:template match="xhtml:tr">
|
|
196
|
+
<xsl:text>\hline </xsl:text>
|
|
197
|
+
<xsl:for-each select="*">
|
|
198
|
+
<xsl:if test="@colspan">\multicolumn{<xsl:value-of select="@colspan"/>}{l|}{</xsl:if>
|
|
199
|
+
<xsl:if test="name() = 'th'">{\bf </xsl:if>
|
|
200
|
+
<xsl:apply-templates />
|
|
201
|
+
<xsl:if test="name() = 'th'">}</xsl:if>
|
|
202
|
+
<xsl:if test="@colspan">}</xsl:if>
|
|
203
|
+
<xsl:if test="position() != last()">
|
|
204
|
+
<xsl:text> & </xsl:text>
|
|
205
|
+
</xsl:if>
|
|
206
|
+
</xsl:for-each>
|
|
207
|
+
<xsl:text> \\ </xsl:text>
|
|
208
|
+
</xsl:template>
|
|
209
|
+
|
|
210
|
+
<xsl:template match="xhtml:ul">
|
|
211
|
+
<xsl:text>\begin{itemize} </xsl:text>
|
|
212
|
+
<xsl:for-each select="xhtml:li">
|
|
213
|
+
<xsl:text> \item{</xsl:text>
|
|
214
|
+
<xsl:apply-templates />
|
|
215
|
+
<xsl:text>} </xsl:text>
|
|
216
|
+
</xsl:for-each>
|
|
217
|
+
<xsl:text>\end{itemize} </xsl:text>
|
|
218
|
+
</xsl:template>
|
|
219
|
+
|
|
220
|
+
<xsl:template match="xhtml:ol">
|
|
221
|
+
<xsl:text>\begin{enumerate}
|
|
222
|
+
</xsl:text>
|
|
223
|
+
<xsl:for-each select="xhtml:li">
|
|
224
|
+
<xsl:text>\item </xsl:text>
|
|
225
|
+
<xsl:apply-templates />
|
|
226
|
+
</xsl:for-each>
|
|
227
|
+
<xsl:text>
|
|
228
|
+
\end{enumerate}
|
|
229
|
+
</xsl:text>
|
|
230
|
+
</xsl:template>
|
|
231
|
+
|
|
232
|
+
</xsl:stylesheet>
|