getting there but not there yet (aka setting up basic workflow)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

getting there but not there yet (aka setting up basic workflow)

James Howison
This is probably a xbiblio-user question but that doesn't seem to exist
yet ;)

I am working my way through Bruce's "Bleeding Edge" Instructions.  
Please forgive my latex-isms as that's where I'm coming from.  I've
never written an XSL transform---I'm basically new to xml.

I have (thanks to Bruce's workflow description)
http://tinyurl.com/59ebs

1.  A document that is in docbook-ng format (validates and transforms
ok using oXygen's docbook HTML and PDF) (well actually that is thanks
to Norman's beta of the new docbook book)
2.  A bibliography in MODS format (used bib2xml) stored in an eXist
database on localhost called 'mods'
3.  The citeproc source
4.  A transformation scenario set-up in oXygen using the
citeproc/xsl/document/dbng-xhtml.xsl sheet for the "XSL URL" using
Saxon8.1B with a parameter citation-style of author-year.
(BTW is there a way to 'export' and 'import' transformation scenarios
for oXygen?)

I'm far from sure what I'm doing (for example I started running that
transformation on the mods file!).

In the docbook file I have citations set up like this:

<citation><biblioref linkend="DISCIDhowto"/></citation>

(Which I picked up (of all places from the header graphic on the
citeproc homepage ;).)

and the 'mods' database running on localhost has a MODS record with
that identifier

Now where and how do I specify that I
a) want a Bibliography in the document (I guess that's something to do
with <Bibliography> which should go at the bottom of the docbook file?)
b) that it should use the references in the mods collection in the
eXist database (I think that's the default so maybe I don't have to
change that ...)

Basic questions I know ;)

Other questions:
1.  The css files didn't get created (screen.css etc).  Am I meant to
create those and add them into the transformation scenario, or are
there defaults that are specified by the xsl (or the csls?)
2.  The file was looking for images in ../images which I didn't
specifiy at all... (I used this  <imagedata
fileref="graphics/MusicMetadataLookup.pdf" format="PDF"/>) which should
(I think) be ./graphics from the folder that the original docbook file
is in.
3.  PDF images didn't get converted to something html'y (well PDFs work
on OSX but nowhere else AFAIK.  Is that something that would be
specified in the XSL transformations?
4.  What's the relationship between the bibliomixed type stuff
mentioned on this page:
http://docbook.org/tdg5/en/html/bibliography.html and citeproc?

Hmmm.  I think that's it for now ;)  I'm going to blog this up once I
get it working.

--James
US Cell: +1 315 395 4056
Full Contact Details on VCard:
http://freelancepropaganda.com/jameshowison.vcf



Reply | Threaded
Open this post in threaded view
|

Re: getting there but not there yet (aka setting up basic workflow)

Bruce D'Arcus

On Feb 18, 2005, at 10:04 PM, James Howison wrote:

> Now where and how do I specify that I
> a) want a Bibliography in the document (I guess that's something to do
> with <Bibliography> which should go at the bottom of the docbook
> file?)

It *could*, but I handle that in the document stylesheet, so it's
automatic.  See "dbng-xhtml.xsl", where you have this template:

   <xsl:template match="/">
     <html>
       <head>
         <title>
           <xsl:value-of select="$title"/>
         </title>
         <meta name="generator" content="CiteProc XSL Stylesheets
v{$VERSION}"/>
         <link rel="stylesheet" href="forprint.css" type="text/css"
media="print"/>
         <link rel="stylesheet" href="screen.css" type="text/css"
media="screen"/>
       </head>
       <body>
         <div id="content">
           <div id="main-content">
             <div class="label">
               <xsl:value-of select="db:*/@label" />
             </div>
             <xsl:apply-templates/>
             <xsl:if test="//db:footnote">
               <div id="notes">
                 <h3>Notes:</h3>
                 <xsl:apply-templates select="//db:footnote"
mode="footnote-list" />
               </div>
             </xsl:if>
             <div id="bibliography">
               <h3>References</h3>
               <xsl:call-template name="bib:format-bibliography">
                 <xsl:with-param name="output-format" select="'xhtml'"/>
               </xsl:call-template>
             </div>
           </div>
         </div>
       </body>
     </html>
   </xsl:template>

The bibliography template then handles rendering for the bibliography
(for example, the section text).

> b) that it should use the references in the mods collection in the
> eXist database (I think that's the default so maybe I don't have to
> change that ...)

Right. I store my MODS records as individual documents, using the -s
option in bibutils to get those files.

> Basic questions I know ;)

That's fine; the documentation is thin now, and more aimed at
developers.

> Other questions:
> 1.  The css files didn't get created (screen.css etc).  Am I meant to
> create those and add them into the transformation scenario, or are
> there defaults that are specified by the xsl (or the csls?)

No, sorry.  I should include that in the damned samples directory, but
just forgot.  See attached.

> 2.  The file was looking for images in ../images which I didn't
> specifiy at all... (I used this  <imagedata
> fileref="graphics/MusicMetadataLookup.pdf" format="PDF"/>) which
> should (I think) be ./graphics from the folder that the original
> docbook file is in.

Again, feel free to create a new dbng-xhtml.xsl file and modify as you
wish.  This sort of configuration is handled there; in templates like
this:

   <xsl:template match="db:imageobject">
     <img src="../images/{db:imagedata/@fileref}" alt="{../../db:title}"
/>
     <p class="caption">
       <xsl:value-of select="../../db:title" />
     </p>
   </xsl:template>

> 3.  PDF images didn't get converted to something html'y (well PDFs
> work on OSX but nowhere else AFAIK.  Is that something that would be
> specified in the XSL transformations?

No, you'll have to handle conversion on your own.  All XSLT does is
work with XML.

> 4.  What's the relationship between the bibliomixed type stuff
> mentioned on this page:
> http://docbook.org/tdg5/en/html/bibliography.html and citeproc?

Nothing.  I completely cut out all the DocBook bib stuff, and instead
use my own (internal) intermediate representation, which is sort of a
cross between xhtml and fo.

Bruce




screen.css (872 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: getting there but not there yet (aka setting up basic workflow)

Bruce D'Arcus
In reply to this post by James Howison
On Feb 18, 2005, at 10:04 PM, James Howison wrote:

> (BTW is there a way to 'export' and 'import' transformation scenarios
> for oXygen?)

Options > export transformation scenario.

Bruce