Log of /contributions/modules/export_docbook/h2db.xsl
Parent Directory
|
Revision Log
|
Revision Graph
Revision
1.1.4.44 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Mon Sep 22 15:58:41 2008 UTC
(14 months ago)
by
robertDouglass
Branch:
DRUPAL-5
Changes since
1.1.4.43: +87 -61 lines
Diff to
previous 1.1.4.43
, to
branch point 1.1
New feature: <ol class="docbook-procedure"> elements now map to <procedure>. Their <li> elements become steps. Any heading (h2-h6) in an <li> will be the <title> of the step. Substeps are not supported, but nested <ol class="procedure"> is.
Revision
1.1.4.37 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Fri Sep 5 17:03:00 2008 UTC
(14 months, 3 weeks ago)
by
robertDouglass
Branch:
DRUPAL-5
CVS Tags:
DRUPAL-5--1-0-ALPHA2
Changes since
1.1.4.36: +49 -6 lines
Diff to
previous 1.1.4.36
, to
branch point 1.1
HTML and FO targets require different maximum image widths to account for different dpi settings. The XSLT now generates two imagedata elements per actual image. The imagewidth.fo and imagewidth.html variables (passed in by the export_docbook.module) determine the max widths of each. Next step is to make an admin interface for these properties so that they can be set manually.
Revision
1.1.4.33 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Thu Aug 21 19:31:00 2008 UTC
(15 months ago)
by
robertDouglass
Branch:
DRUPAL-5
Changes since
1.1.4.32: +16 -20 lines
Diff to
previous 1.1.4.32
, to
branch point 1.1
The more enlightened handling of text() nodes allows me to take out a whole series of other hacks. Other bugfixes as well. Glossary is broken, with a bad stop-gap hack with hardcoded <para> tags to get the document to validate. Glossary needs more work.
Revision
1.1.4.30 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Wed Aug 20 13:26:35 2008 UTC
(15 months, 1 week ago)
by
robertDouglass
Branch:
DRUPAL-5
Changes since
1.1.4.29: +129 -16 lines
Diff to
previous 1.1.4.29
, to
branch point 1.1
Major experimental addition to the xslt. In XHTML, it is allowed to have free-floating text nodes. Often, what looks like a paragraph of text actually has no <p> tag to speak of, but is a collection of text nodes and other nodes like <em> or <strong>. This is problematic because in DocBook XML they all belong in a <para> tag. But where to put those <para> tags is more complex than 'just wrap the text nodes in <para>'. So the XSLT that I've written looks at text nodes, determines if they are the children of block level elements (as opposed to children of <em>), and then, depending on whether or not there are previous or following siblings, and whether or not those siblings are block level elements, prints [[para]] or [[/para]] in the XML document. This is a hack to get around the fact that you can't print unmatched <para> and </para> elements in XSLT. Finally, back in PHP, the [[para]] placeholders are replaced with <para>.
Revision
1.1.4.24 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Wed Jul 30 18:46:42 2008 UTC
(15 months, 4 weeks ago)
by
robertDouglass
Branch:
DRUPAL-5
Changes since
1.1.4.23: +7 -1 lines
Diff to
previous 1.1.4.23
, to
branch point 1.1
Adding a taxonomy based glossary module. Can play nicely with the Glossary module but they are not related or dependent on each other. Still in proof-of-concept phase with a hardcoded vid = 1.
Revision
1.1.4.23 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Wed Jul 30 10:47:09 2008 UTC
(15 months, 4 weeks ago)
by
robertDouglass
Branch:
DRUPAL-5
Changes since
1.1.4.22: +63 -31 lines
Diff to
previous 1.1.4.22
, to
branch point 1.1
Refactored code to generate indexterms into its own template. This lets me call the template for dfn elements as well, which can be generated by the Glossary module. This (eventually) is going to lead to books with Glossaries and automatically generated indexes based on the glossary terms.
Revision
1.1.4.20 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Wed Jul 30 06:28:21 2008 UTC
(15 months, 4 weeks ago)
by
robertDouglass
Branch:
DRUPAL-5
Changes since
1.1.4.19: +4 -3 lines
Diff to
previous 1.1.4.19
, to
branch point 1.1
The logic for extracting the element type from the class name was too hard (for me) to do in XSLT. Good thing PHP's XSLT package lets you register PHP functions and call them from within the transformation.
Revision
1.1.4.18 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Wed Jul 30 05:36:10 2008 UTC
(15 months, 4 weeks ago)
by
robertDouglass
Branch:
DRUPAL-5
Changes since
1.1.4.17: +32 -58 lines
Diff to
previous 1.1.4.17
, to
branch point 1.1
Unify DIV and SPAN handling. Instead of trying to enumerate all of the possible DocbookXML elements that we might want to include, andy div or span tag with a class name of docbook-foo will create a foo element (there's no checking to make sure foo is a real element\!). The first <h2> becomes the title. Any text not wrapped in an element gets a <para> wrapper.
Revision
1.1.4.16 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Tue Jul 29 19:05:49 2008 UTC
(15 months, 4 weeks ago)
by
robertDouglass
Branch:
DRUPAL-5
Changes since
1.1.4.15: +14 -7 lines
Diff to
previous 1.1.4.15
, to
branch point 1.1
XSLT is groovy. Now sidebar, tip, warning, caution, and note all work the same way:
<div class="docbook-sidebar|docbook-tip|docbook-warning|docbook-caution|docbook-note">
<h2>This is the title</h2>
<p>Text goes here</>
...
</div>
This formation will become a Docbook XML sidebar|tip|warning|caution|note.
If there is an adjacent child <h2> within the div,
that will become the sidebar's title. There should be no text that is an immediate child of the <div>. Text should always be in <p> or other elements.
Revision
1.1.4.15 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Tue Jul 29 16:25:20 2008 UTC
(15 months, 4 weeks ago)
by
robertDouglass
Branch:
DRUPAL-5
Changes since
1.1.4.14: +26 -3 lines
Diff to
previous 1.1.4.14
, to
branch point 1.1
Support for end-of-book indexes. This is a bit of a hack but works well enough for most purposes. To make an end-of-book index you need two things. An <index/> tag somewhere in the book (this now gets added), and <indexterm> elements in the Docbook XML. The trick here is twofold. <indexterm> elements can have <primary>, <secondary> and <tertiary> elements that make nice nested indexes. No HTML element follows this pattern semantically, so there is no 1-1 mapping that can be made. My solution is to use an <ol class="docbook-index"> like this:
<ol class="docbook-index">
<li>Primary term</li>
<li>Secondary term</li>
<li>Tertiary term</li>
</ol>
Of course this shouldn't render in HTML so the current solution will be to render exactly that type of element with that class as display:none. Hope it's a good enough hack for the time being!
Revision
1.1.4.13 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Tue Jul 29 15:32:55 2008 UTC
(15 months, 4 weeks ago)
by
robertDouglass
Branch:
DRUPAL-5
Changes since
1.1.4.12: +39 -8 lines
Diff to
previous 1.1.4.12
, to
branch point 1.1
Footnote support. Use <span class="docbook-footnote">Footnote text here.</span>. Note that if you use <p> tags in the footnote you have to be consistent about it. <span><p>text</p><p>more text</p></span> The one case that won't work well is <span>text<p>more text</p></span>.
Revision
1.1.4.10 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Tue Jul 29 10:57:47 2008 UTC
(15 months, 4 weeks ago)
by
robertDouglass
Branch:
DRUPAL-5
Changes since
1.1.4.9: +0 -1 lines
Diff to
previous 1.1.4.9
, to
branch point 1.1
Inline media objects left the same but normal mediaobjects now get embedded in figure tags. The figure's title gets taken from the alt param of the image. (missed a line of commented code)
Revision
1.1.4.7 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Mon Jul 28 13:55:47 2008 UTC
(16 months ago)
by
robertDouglass
Branch:
DRUPAL-5
Changes since
1.1.4.6: +2 -2 lines
Diff to
previous 1.1.4.6
, to
branch point 1.1
HACK: even though Docbook 4.5 says anchors can be children of just about anything, including chapters, they cause processing errors at the fop layer (fo:inline can't be a child of fo:flow). This hack, to wrap the anchor in a <para> element, needs a better solution, but at least you can generate a PDF from the output XML
Revision
1.1.4.5 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Mon Jul 28 13:18:49 2008 UTC
(16 months ago)
by
robertDouglass
Branch:
DRUPAL-5
Changes since
1.1.4.4: +8 -6 lines
Diff to
previous 1.1.4.4
, to
branch point 1.1
Now named anchor tags in HTML become Docbook anchor tags with an id. However, at least in my fo processing, the linkend property of link tags don't find the id property of the anchor element. This gives me an Unresolved id reference "foo" found. error. Is this a matter of needing to somehow define id as type ID at the XML level? If you know, contact me, plz.
Revision
1.1.4.3 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Mon Jul 28 11:22:27 2008 UTC
(16 months ago)
by
robertDouglass
Branch:
DRUPAL-5
Changes since
1.1.4.2: +76 -73 lines
Diff to
previous 1.1.4.2
, to
branch point 1.1
Rearrange the xslt. Comment out a 'workbench hack' that looked rather specific to the original author's needs and might result in interesting surprises. Otherwise no functional change.
This form allows you to request diffs between any two revisions of this file.
For each of the two "sides" of the diff,
select a symbolic revision name using the selection box, or choose
'Use Text Field' and enter a numeric revision.